:root {
    --bg-dark: #121212;
    --bg-panel: rgba(18, 18, 18, 0.9);
    --bg-panel-solid: #1a1a1a;
    --bg-hover: rgba(253, 164, 175, 0.1);
    --bg-active: rgba(253, 164, 175, 0.15);

    --accent: #FDA4AF;
    --accent-dim: rgba(253, 164, 175, 0.4);
    --accent-glow: rgba(253, 164, 175, 0.3);

    --text-main: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.7);
    --text-dark: rgba(255, 255, 255, 0.4);

    --border: rgba(255, 255, 255, 0.1);
    --border-light: rgba(255, 255, 255, 0.15);
    --shadow: rgba(0, 0, 0, 0.5);

    --danger: #ff4a4a;
    --success: #4aff7a;
    --warning: #ffb84a;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    background-image: radial-gradient(ellipse at top, #1a1215 0%, #121212 100%);
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    letter-spacing: 1px;
}

.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-dim { color: var(--text-dim); }

.hidden {
    display: none !important;
}

/* ==================== LOGIN SCREEN ==================== */
#login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    z-index: 9999;
}

.login-container {
    text-align: center;
    padding: 40px;
    background: var(--bg-panel);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 380px;
}

.login-container .atom {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
}

.login-container h1 {
    font-size: 20px;
    margin-bottom: 5px;
    letter-spacing: 2px;
}

.login-container p {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 25px;
}

#login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#login-form input {
    padding: 12px 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#login-form input:focus {
    border-color: var(--accent);
}

#login-form input::placeholder {
    color: var(--text-dark);
}

.error-msg {
    color: var(--danger);
    font-size: 12px;
    margin-top: 10px;
    min-height: 16px;
}

/* ==================== LOADING SCREEN ==================== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.98);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

#loading-screen h1 {
    margin-bottom: 10px;
    font-size: 22px;
}

#loading-screen p {
    margin-bottom: 40px;
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 3px;
}

.progress-bar-container {
    width: 280px;
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    transition: width 0.15s linear;
}

/* ==================== ATOM ANIMATION ==================== */
.atom {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.nucleus {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--accent);
}

.orbit {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid var(--accent-glow);
    border-radius: 50%;
    animation: spin linear infinite;
}

.orbit-1 { animation-duration: 3s; transform: rotateX(65deg); }
.orbit-2 { animation-duration: 4s; transform: rotateX(65deg) rotateY(60deg); }
.orbit-3 { animation-duration: 5s; transform: rotateX(65deg) rotateY(120deg); }

.electron {
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: var(--text-main);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--text-main);
}

@keyframes spin {
    100% { transform: rotateX(65deg) rotate(360deg); }
}

.orbit-2 { animation-name: spin2; }
@keyframes spin2 {
    0% { transform: rotateX(65deg) rotateY(60deg) rotate(0deg); }
    100% { transform: rotateX(65deg) rotateY(60deg) rotate(360deg); }
}

.orbit-3 { animation-name: spin3; }
@keyframes spin3 {
    0% { transform: rotateX(65deg) rotateY(120deg) rotate(0deg); }
    100% { transform: rotateX(65deg) rotateY(120deg) rotate(360deg); }
}

/* Small Atom */
.atom.sm { width: 40px; height: 40px; margin: 0 auto 12px; }
.nucleus.sm-n { width: 10px; height: 10px; }
.electron.sm-e { width: 4px; height: 4px; top: -2px; }

/* ==================== MAIN APP LAYOUT ==================== */
#app {
    display: flex;
    height: 100vh;
    padding: 15px;
    gap: 15px;
}

.sidebar {
    width: 240px;
    background: var(--bg-panel);
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 15px 0;
}

.content-area {
    flex: 1;
    background: var(--bg-panel);
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-y: auto;
}

/* Sidebar Header */
.sidebar-header {
    text-align: center;
    padding: 10px 0;
    margin-bottom: 15px;
}

.sidebar-header h2 {
    font-size: 14px;
    letter-spacing: 2px;
}

.sidebar-header .version {
    font-size: 10px;
    color: var(--text-dim);
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 0 15px;
}

/* Navigation */
.nav-links {
    list-style: none;
    margin-top: 15px;
    flex: 1;
}

.nav-item {
    cursor: pointer;
    margin: 4px 10px;
    border-radius: 6px;
    position: relative;
    transition: background 0.2s;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-dim);
    transition: color 0.2s;
}

.nav-item:hover {
    background: var(--bg-hover);
}

.nav-item.active {
    background: var(--bg-active);
}

.nav-item.active .nav-content {
    color: var(--accent);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

/* Sidebar Footer */
.sidebar-footer {
    padding-top: 15px;
    margin-top: auto;
}

.account-info {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    gap: 12px;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 2px solid var(--accent);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.avatar-head {
    width: 10px;
    height: 10px;
    background: var(--text-main);
    border-radius: 50%;
    margin-bottom: 2px;
}

.avatar-body {
    width: 18px;
    height: 10px;
    background: var(--text-main);
    border-radius: 8px 8px 0 0;
}

.account-details {
    display: flex;
    flex-direction: column;
}

.username { font-size: 12px; font-weight: 600; }
.status { font-size: 10px; color: var(--accent); }

.btn-logout {
    margin-left: auto;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

/* Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.topbar h3 {
    font-size: 12px;
    color: var(--text-dim);
    font-weight: 500;
}

.time {
    font-family: monospace;
    font-size: 12px;
    color: var(--accent);
    background: var(--bg-active);
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid var(--border-light);
}

/* Pages */
.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

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

.page-header {
    margin-bottom: 20px;
}

.page-header h2 {
    font-size: 20px;
    margin-bottom: 4px;
}

.page-header p {
    font-size: 12px;
    color: var(--text-dim);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-active);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.stat-card h4 {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    font-family: monospace;
}

/* Grid Layout */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Cards */
.card {
    background: var(--bg-active);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
}

.card-header {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 12px;
}

.card-body {
    padding: 15px;
}

/* Form Elements */
.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 11px;
    color: var(--text-dim);
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-main);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--accent);
}

/* Buttons */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
}

.btn-primary {
    background: var(--accent);
    color: #000;
}

.btn-primary:hover {
    background: #ffb8c0;
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-main);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--bg-panel-solid);
    border-color: var(--text-dim);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

.btn-full { width: 100%; }
.btn-small { padding: 6px 10px; font-size: 11px; }

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

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table th {
    text-align: left;
    padding: 10px;
    color: var(--text-dim);
    font-weight: 500;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    text-transform: uppercase;
}

.data-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border);
}

.data-table tr:hover {
    background: var(--bg-hover);
}

.data-table code {
    background: var(--bg-dark);
    padding: 3px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 11px;
}

.data-table .hwid {
    color: var(--accent);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-unused { background: var(--border); color: var(--text-main); }
.status-active { background: rgba(74, 255, 122, 0.2); color: var(--success); }
.status-expired { background: rgba(255, 184, 74, 0.2); color: var(--warning); }
.status-banned { background: rgba(255, 74, 74, 0.2); color: var(--danger); }

/* Lists */
.activity-list {
    list-style: none;
}

.activity-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.activity-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-time {
    display: block;
    font-size: 10px;
    color: var(--accent);
    font-family: monospace;
    margin-bottom: 3px;
}

.activity-desc {
    font-size: 12px;
}

.activity-desc strong {
    color: var(--accent);
}

/* Ban List */
.ban-list {
    list-style: none;
}

.ban-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: var(--bg-dark);
    border-radius: 6px;
    margin-bottom: 8px;
}

.ban-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ban-info code {
    font-size: 11px;
    color: var(--danger);
}

.ban-reason {
    font-size: 11px;
    color: var(--text-dim);
}

.ban-date {
    font-size: 10px;
    color: var(--text-dark);
}

/* Log Action */
.log-action {
    background: var(--bg-active);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

/* Notifications */
#notifications-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
}

.notification {
    background: var(--bg-panel-solid);
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    animation: slideIn 0.3s ease;
}

.notification.error { border-color: var(--danger); }
.notification.success { border-color: var(--success); }

@keyframes slideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.notification.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-10px); }
}

/* Placeholder */
.placeholder-text {
    color: var(--text-dark);
    font-size: 12px;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    #app { flex-direction: column; padding: 10px; }
    .sidebar { width: 100%; }
    .grid-2 { grid-template-columns: 1fr; }
}
