:root {
    --primary: #00ff73;
    --primary-dim: rgba(0, 255, 115, 0.1);
    --bg: #000000;
    --card: #0a0a0a;
    --card-hover: #121212;
    --border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-dim: #a1a1aa;
    --danger: #f31260;
    --radius: 16px;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding: 2rem;
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 1200px;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.logo-section h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-section span {
    color: var(--primary);
}

/* Card Style */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Form Section */
.gen-box {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dim);
}

input {
    background: #18181b;
    border: 2px solid transparent;
    border-radius: 12px;
    color: white;
    padding: 10px 14px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    background: #121212;
}

button {
    background: var(--primary);
    color: black;
    border: none;
    border-radius: 12px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

button.secondary {
    background: #27272a;
    color: white;
}

button.danger {
    background: transparent;
    color: var(--danger);
}

button.danger:hover {
    background: rgba(243, 18, 96, 0.1);
}

/* Table */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 12px;
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

tr:hover td {
    background: var(--card-hover);
}

.key-badge {
    background: var(--primary-dim);
    color: var(--primary);
    padding: 4px 8px;
    border-radius: 8px;
    font-family: monospace;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background: #0a0a0a;
    border: 1px solid var(--border);
    border-radius: 24px;
    width: 90%;
    max-width: 600px;
    padding: 2rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.machine-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

.machine-info div:first-child { font-weight: 700; }
.machine-info div:last-child { font-size: 0.8rem; color: var(--text-dim); }

/* Utility */
.chip {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    background: #27272a;
}

.chip.active { background: var(--primary-dim); color: var(--primary); }

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}

.machine-mini-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.machine-mini-card {
    padding: 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.machine-mini-card:hover {
    border-color: var(--primary);
    background: rgba(0,255,115,0.05);
}

@media (max-width: 768px) {
    .header { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .gen-box { flex-direction: column; align-items: stretch; }
    .input-wrapper { width: 100%; }
}
