:root {
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --card-glass: rgba(30, 41, 59, 0.7);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.4);
    --accent-hover: #7c3aed;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    margin: 0;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Background Effects */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background:
        radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(56, 189, 248, 0.15) 0%, transparent 40%);
    pointer-events: none;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 15px 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid var(--border-glass);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #c084fc, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 30px;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border: none;
    transition: 0.2s;
    white-space: nowrap;
    justify-content: center;
    height: 38px;
    box-sizing: border-box;
}

.btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover {
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: none;
}

.cta-btn {
    background: var(--accent);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, background 0.2s;
}

.cta-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    color: white !important;
}

/* Modal Styles (Centralized) */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-box {
    background: #1e293b;
    padding: 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 450px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

/* Beautiful Icon Circle (Matches Upgrade Modal) */
.modal-icon-circle {
    width: 70px !important;
    height: 70px !important;
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px auto;
    font-size: 2rem !important;
    flex-shrink: 0;
}

.modal-title {
    color: white;
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 0;
}

.modal-body {
    color: #94a3b8;
    margin-bottom: 30px;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-actions .btn {
    flex: 1;
    padding: 12px 25px;
    font-size: 1rem;
    justify-content: center;
}

/* Text Utility */
.text-gradient {
    background: linear-gradient(to right, #c084fc, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge {
    background: var(--accent);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
    margin-left: 5px;
}

.badge-success {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.badge-warning {
    background: rgba(250, 204, 21, 0.2);
    color: #facc15;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 100px auto 40px auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

/* Footer */
footer {
    text-align: center;
    padding: 60px 20px 40px;
    border-top: 1px solid var(--border-glass);
    color: var(--text-secondary);
    margin-top: auto;
    /* Push to bottom */
    padding-top: 80px;
    position: relative;
    z-index: 10;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 20px;
        flex-wrap: wrap;
    }

    .nav-links a {
        margin-left: 0;
    }
}

/* Admin Panel Specifics */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid #334155;
    overflow-x: auto;
}

.tab {
    padding: 12px 24px;
    color: #94a3b8;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    font-weight: 600;
    white-space: nowrap;
}

.tab:hover {
    color: #e2e8f0;
}

.tab.active {
    color: #8b5cf6;
    border-bottom-color: #8b5cf6;
}

.content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.box {
    background: #1e293b;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #334155;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.table-container {
    background: #1e293b;
    border-radius: 12px;
    border: 1px solid #334155;
    overflow: hidden;
    max-width: 100%;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    background: #0f172a;
    color: #94a3b8;
    font-weight: 600;
}

.form-label {
    display: block;
    margin-top: 15px;
    color: #94a3b8;
    margin-bottom: 5px;
}

.form-input {
    width: 100%;
    padding: 10px;
    background: #0f172a;
    border: 1px solid #334155;
    color: white;
    border-radius: 6px;
    box-sizing: border-box;
}

/* Admin Table Overrides */
.admin-table td,
.admin-table th {
    padding: 12px 15px;
    vertical-align: middle;
}

.admin-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 768px) {
    .tabs {
        padding-bottom: 5px;
    }

    .box {
        padding: 15px;
    }

    th,
    td {
        padding: 10px;
        font-size: 0.9em;
    }
}

/* Modal Icons */
.icon-warning {
    background: rgba(245, 158, 11, 0.1) !important;
    color: #f59e0b !important;
}

.icon-purple {
    background: rgba(139, 92, 246, 0.1) !important;
    color: #8b5cf6 !important;
}

.icon-success {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #10b981 !important;
}

.icon-danger {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #ef4444 !important;
}