:root {
    --bg-color: #0f1015;
    --card-bg: rgba(22, 23, 31, 0.7);
    --border-color: rgba(255, 255, 255, 0.05);
    --text-main: #ffffff;
    --text-muted: #8b8d96;
    --accent: #70a1ff;
    --danger: #ff4757;
    --success: #2ed573;
    --warning: #ffa502;
    --input-bg: rgba(0, 0, 0, 0.3);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    background-image: radial-gradient(circle at top right, rgba(112, 161, 255, 0.1), transparent 40%),
                      radial-gradient(circle at bottom left, rgba(46, 213, 115, 0.05), transparent 40%);
}

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: url('logo.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
    filter: drop-shadow(0 0 20px rgba(112, 161, 255, 0.5));
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(46, 213, 115, 0.2);
    border: 1px solid rgba(46, 213, 115, 0.4);
    color: var(--success);
    padding: 12px 24px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transform: translateX(150%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 9999;
    box-shadow: 0 0 15px rgba(46, 213, 115, 0.2);
}

.toast.show {
    transform: translateX(0);
}

/* Authentication Containers */
.container {
    width: 100%;
    height: 100vh;
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.container.active {
    display: flex;
}

#auth-container {
    align-items: center;
    justify-content: center;
}

.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: slideUp 0.4s ease-out;
}

.glow-text {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--accent);
    text-shadow: 0 0 15px rgba(112, 161, 255, 0.5);
    letter-spacing: 2px;
}

.question-text {
    margin-bottom: 20px;
    font-size: 16px;
    color: var(--text-muted);
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group input, .input-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    resize: none;
}

.input-group input:focus, .input-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(112, 161, 255, 0.2);
}

.btn-glow {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #70a1ff 0%, #1e90ff 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(112, 161, 255, 0.4);
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(112, 161, 255, 0.6);
}

.btn-dark {
    padding: 10px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-dark:hover {
    background: rgba(255,255,255,0.05);
}

.btn-sm {
    width: auto;
    padding: 10px 16px;
}

.error-msg {
    color: var(--danger);
    font-size: 13px;
    margin-top: 15px;
    min-height: 20px;
    text-shadow: 0 0 5px rgba(255, 71, 87, 0.4);
}

/* Dashboard Layout */
#dashboard-container {
    flex-direction: row;
    height: 100vh;
    width: 100%;
}

.sidebar {
    width: 250px;
    background: var(--card-bg);
    border-right: 1px solid var(--border-color);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
}

.logo-text {
    margin-bottom: 40px;
    font-size: 22px;
}

.nav-links {
    list-style: none;
    flex: 1;
}

.nav-links li {
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links li:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
}

.nav-links li.active {
    background: rgba(112, 161, 255, 0.1);
    color: var(--accent);
    border-left: 3px solid var(--accent);
}

.btn-logout {
    margin-top: auto;
    padding: 12px;
    background: rgba(255, 71, 87, 0.1);
    color: var(--danger);
    border: 1px solid rgba(255, 71, 87, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-logout:hover {
    background: rgba(255, 71, 87, 0.2);
}

.main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.view-section {
    display: none;
    animation: fadeIn 0.4s ease;
}
.view-section.active {
    display: block;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.gen-box {
    display: flex;
    gap: 10px;
}

.gen-box select {
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px;
    border-radius: 8px;
    outline: none;
}

/* Table */
.table-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
}

td {
    font-size: 14px;
}

.key-text {
    background: rgba(112, 161, 255, 0.1);
    color: var(--accent);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
}

.hwid-text {
    color: var(--text-muted);
    font-family: monospace;
    font-size: 12px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.status-active { background: rgba(46, 213, 115, 0.1); color: var(--success); }
.status-banned { background: rgba(255, 71, 87, 0.1); color: var(--danger); }

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    margin-right: 10px;
    transition: all 0.2s;
}
.btn-ban { color: var(--warning); }
.btn-reset { color: var(--accent); }
.btn-del { color: var(--danger); }
.action-btn:hover { transform: scale(1.1); filter: brightness(1.2); }

/* Settings */
.settings-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-top: 20px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.setting-item h3 { font-size: 18px; margin-bottom: 8px; }
.setting-item p { font-size: 14px; color: var(--text-muted); max-width: 600px;}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--input-bg);
  border: 1px solid var(--border-color);
  transition: .4s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 20px; width: 20px;
  left: 3px; bottom: 3px;
  background-color: var(--text-muted);
  transition: .4s;
}
input:checked + .slider { background-color: rgba(255, 71, 87, 0.2); border-color: var(--danger); }
input:checked + .slider:before { transform: translateX(22px); background-color: var(--danger); box-shadow: 0 0 10px var(--danger); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* Animations & Media Queries */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) {
    #dashboard-container { flex-direction: column; }
    .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); padding: 15px; flex-direction: row; align-items: center; justify-content: space-between;}
    .logo-text { margin-bottom: 0; font-size: 18px; }
    .nav-links { display: flex; margin-bottom: 0; margin-right: 15px; }
    .nav-links li { padding: 8px 12px; margin-bottom: 0; }
    .btn-logout { margin-top: 0; padding: 8px 12px; }
    .main-content { padding: 15px; }
    .header-actions { flex-direction: column; gap: 15px; }
}
