:root {
    --bg-color: #0a0b10;
    --card-bg: rgba(20, 24, 30, 0.7);
    --card-border: rgba(88, 166, 255, 0.2);
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --accent-blue: #00f0ff;
    /* Cyber blue */
    --accent-glow: rgba(0, 240, 255, 0.15);
    --accent-gold: #fbca04;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* High-Impact Tactical Background */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        /* Grid Pattern */
        linear-gradient(rgba(30, 35, 45, 0.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 35, 45, 0.5) 1px, transparent 1px),
        /* Radial Glow from center */
        radial-gradient(circle at 50% 50%, rgba(10, 15, 25, 0) 0%, rgba(5, 5, 10, 0.9) 100%);
    background-size: 50px 50px, 50px 50px, 100% 100%;
    /* Subtle Scanline Effect */
    box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.9);
}

.background-overlay::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.15),
            rgba(0, 0, 0, 0.15) 1px,
            transparent 1px,
            transparent 2px);
    pointer-events: none;
}

/* Header Styles with Tech/Glass feel */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background: rgba(10, 11, 16, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    flex: 0 0 100px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.1));
}

.logo {
    height: 80px;
    width: auto;
    object-fit: contain;
}

.title-container {
    text-align: center;
    flex-grow: 1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.title-container h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(180deg, #fff 0%, #a5b4fc 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.title-container h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 0 10px var(--accent-glow);
}

/* Dashboard Grid */
.dashboard-container {
    flex: 1;
    padding: 4rem;
    max-width: 1800px;
    margin: 0 auto;
    width: 100%;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    width: 100%;
}

.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--accent-blue);
    font-family: monospace;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* High-Tech Card Styles */
.card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    /* Sharper corners for tactical look */
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* "Corner Brackets" effect using pseudo-elements */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid transparent;
    transition: all 0.3s;
    pointer-events: none;
    z-index: 2;
}

.card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
    border-color: var(--accent-blue);
    background: rgba(20, 24, 30, 0.9);
}

.card:hover::before {
    border: 1px solid var(--accent-blue);
    box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.1);
}

.card-image-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #0d1016;
    overflow: hidden;
    position: relative;
    border-bottom: 2px solid var(--accent-blue);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: sepia(20%) contrast(1.1) saturate(0.8);
    /* Cinematic look */
}

.card:hover .card-image {
    transform: scale(1.1);
    filter: sepia(0%) contrast(1.1) saturate(1.1);
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(20, 24, 30, 0) 0%, rgba(0, 0, 0, 0.4) 100%);
    position: relative;
}

.card-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover .card-content::after {
    opacity: 1;
}

.card-title {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    line-height: 1.4;
    transition: color 0.3s;
}

.card:hover .card-title {
    color: var(--accent-blue);
    text-shadow: 0 0 8px var(--accent-blue);
}

/* Fallback for missing images */
.placeholder-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #11151c;
    color: var(--text-secondary);
    font-family: monospace;
    font-size: 2rem;
    border: 1px dashed #333;
}

/* Footer */
.main-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    /* text-transform: uppercase; Removed to allow lowercase copyright */
    letter-spacing: 2px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .title-container h1 {
        font-size: 1.8rem;
    }

    .title-container h2 {
        font-size: 1rem;
    }

    .logo {
        height: 60px;
    }
}

@media (max-width: 768px) {
    .main-header {
        position: relative;
        /* Scrolls with page, doesn't block view */
        flex-direction: row;
        /* Keep elements side-by-side */
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        padding: 1rem 0.5rem;
        height: auto;
    }

    .logo-container {
        /* Hide logos on mobile if desired, or keep them small */
        /* display: none; */
        /* keeping them but creating a row for them */
        order: 1;
        /* Logos on top? */
        width: auto;
        margin: 0;
    }

    .logo-container.left,
    .logo-container.right {
        display: block;
        /* Show logos again */
        flex: 0 0 50px;
        /* Fixed small width for logos */
    }

    .logo {
        height: 50px;
        /* Small logos for mobile */
        width: 100%;
        object-fit: contain;
    }

    .title-container {
        flex: 1;
        /* Title takes remaining space */
        order: 0;
    }

    .title-container h1 {
        font-size: 0.9rem;
        /* Smaller font to fit */
        margin-bottom: 0.1rem;
        line-height: 1.2;
    }

    .title-container h2 {
        font-size: 0.6rem;
        letter-spacing: 1px;
    }

    .dashboard-container {
        padding: 1rem;
    }

    .grid-container {
        gap: 1rem;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 1rem 0.5rem;
    }
}
