@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    /* Simple Modern Palette (Staff/Admin) */
    --void-dark: #121212;
    /* Material Dark Background */
    --card-bg: #1e1e1e;
    --sidebar-bg: #181818;
    /* Sidebar specific */
    /* Surface color */
    --primary: #00f7ff;
    /* Lunar Cyan (Brand) */
    --secondary: #ff0055;
    /* Accent Pink */
    --text-main: #ffffff;
    --text-muted: #b0b0b0;
    --border-color: #333333;

    /* 3D Depth */
    --depth: 4px;
    --header-height: 70px;
    --sidebar-width: 260px;
}

body {
    background-color: var(--void-dark);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Removed Star Animation for Professional Cleanliness */
body::before {
    display: none;
}

/* --- LAYOUT STRUCTURE (New) --- */
.app-container {
    display: flex;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
}

.sidebar-brand {
    color: var(--text-main);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sidebar-brand span {
    color: var(--secondary);
}

.sidebar-menu {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.menu-item:hover,
.menu-item.active {
    background: rgba(255, 255, 255, 0.03);
    color: var(--primary);
    border-left-color: var(--primary);
}

.menu-item i {
    width: 24px;
    margin-right: 10px;
    font-size: 1.1rem;
}

.menu-category {
    padding: 20px 25px 10px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 1px;
    font-weight: 700;
}

/* MAIN CONTENT AREA */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    transition: margin-left 0.3s ease, width 0.3s ease;
}

/* TOP HEADER */
.top-header {
    height: var(--header-height);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 900;
}

.header-left {
    display: flex;
    align-items: center;
}

.sidebar-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
}

.sidebar-toggle:hover {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

.header-title {
    margin-left: 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.header-user-info {
    text-align: right;
    display: none;
    /* Hidden on very small screens */
}

@media (min-width: 768px) {
    .header-user-info {
        display: block;
    }
}

.header-user-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
}

.header-user-role {
    font-size: 0.75rem;
    color: var(--primary);
}

/* DASHBOARD CONTENT */
.content-wrapper {
    padding: 30px;
}

/* REUSING CARD STYLES BUT ADJUSTED */
.dashboard-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    height: 100%;
    /* Fill height */
    box-sizing: border-box;
}

.dashboard-card i {
    font-size: 2.5rem;
    color: var(--primary);
    transition: transform 0.2s;
    margin-bottom: 5px;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(0, 247, 255, 0.1);
}

.dashboard-card span {
    font-size: 1.1rem;
    font-weight: 600;
}

/* GRID ADJUSTMENTS */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* MOBILE RESPONSIVE */
.mobile-close-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    margin-left: auto;
    /* Push to right */
}

.mobile-brand {
    display: none;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
    margin-left: 15px;
    letter-spacing: 1px;
}

.mobile-brand span {
    color: var(--secondary);
}

@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        /* Hidden by default on mobile */
        box-shadow: 4px 0 15px rgba(0, 0, 0, 0.5);
    }

    .mobile-close-btn {
        display: block;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    /* Mobile Open State */
    .app-container.sidebar-mobile-open .sidebar {
        transform: translateX(0);
    }

    /* Overlay effect mainly achieved by z-index and shadow, 
       but we can add a backdrop if needed. For now simpler is better. */

    .header-title {
        display: none;
        /* Hide 'Dashboard' title on mobile to save space */
    }

    .mobile-brand {
        display: block;
    }

    .header-user-info {
        display: none;
    }

    .sidebar-header {
        justify-content: space-between;
        /* Allow close button to fit */
    }
}

/* Collapsed State (Desktop Toggle) */
@media (min-width: 992px) {
    .app-container.collapsed .sidebar {
        width: 80px;
    }

    .app-container.collapsed .main-content {
        margin-left: 80px;
        width: calc(100% - 80px);
    }

    .app-container.collapsed .sidebar-brand,
    .app-container.collapsed .menu-item span,
    .app-container.collapsed .menu-category {
        display: none;
    }

    .app-container.collapsed .sidebar-menu {
        text-align: center;
    }

    .app-container.collapsed .menu-item {
        justify-content: center;
        padding: 20px 0;
    }

    .app-container.collapsed .menu-item i {
        margin-right: 0;
        font-size: 1.4rem;
    }

    .mobile-close-btn {
        display: none !important;
    }
}

/* --- OTHER EXISTING STYLES (Preserved) --- */
.container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
    margin: 40px auto;
    /* Centered for login/other pages */
}

.card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    text-align: center;
}

h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-main);
    letter-spacing: 0.5px;
    text-align: center;
}

h2,
h3 {
    margin-bottom: 25px;
    color: var(--primary);
    font-weight: 400;
    font-size: 1rem;
    opacity: 0.9;
}

p {
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 24px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.1s;
    width: 100%;
    box-sizing: border-box;
    margin-top: 10px;
    font-size: 0.9rem;
}

.btn-submit,
.btn-discord {
    background: var(--secondary);
    color: white;
    box-shadow: 0 var(--depth) 0 #990033;
}

.btn-submit:hover,
.btn-discord:hover {
    background: #ff1a66;
    transform: translateY(-2px);
    box-shadow: 0 calc(var(--depth) + 2px) 0 #990033;
}

.btn-submit:active,
.btn-discord:active {
    transform: translateY(var(--depth));
    box-shadow: none;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.btn-outline:hover {
    border-color: var(--text-main);
    color: var(--text-main);
}

.btn-primary {
    background: var(--primary);
    color: #000;
}

.btn-primary:hover {
    background: #00d5dd;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85em;
    color: var(--text-muted);
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px;
    background: #2a2a2a;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: #333;
}

/* Alerts */
.alert {
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 6px;
    text-align: left;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(255, 0, 85, 0.1);
    color: #ff80aa;
    border: 1px solid rgba(255, 0, 85, 0.2);
}

.alert-success {
    background: rgba(0, 247, 255, 0.1);
    color: #80fbff;
    border: 1px solid rgba(0, 247, 255, 0.2);
}

/* Tables & Tabs */
.tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.tab-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.tab-btn:hover {
    border-color: var(--text-main);
    color: var(--text-main);
}

.tab-btn.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.3);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.table-container {
    overflow-x: auto;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-main);
    font-size: 0.95rem;
}

th,
td {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.status-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-alive {
    background: rgba(0, 230, 118, 0.1);
    color: #69f0ae;
    border: 1px solid rgba(0, 230, 118, 0.2);
}

.status-eliminated {
    background: rgba(255, 82, 82, 0.1);
    color: #ff5252;
    border: 1px solid rgba(255, 82, 82, 0.2);
}

/* MODAL / POPUP STYLES */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: var(--secondary);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

.modal-close:hover {
    transform: scale(1.1);
}

.video-wrapper video {
    width: 100%;
    border-radius: 8px;
    max-height: 70vh;
}