:root {
    --bg-color: #0b0d17;
    --card-bg: #15192b;
    --text-primary: #ffffff;
    --text-secondary: #a0a8c0;
    --accent: #00f3ff;
    --accent-glow: rgba(0, 243, 255, 0.3);
    --border-color: #2a2f45;
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background Effects */
.background-stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 40px 70px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 130px 80px, #fff, rgba(0, 0, 0, 0));
    background-repeat: repeat;
    background-size: 200px 200px;
    opacity: 0.3;
    z-index: -1;
}

.scanline {
    width: 100%;
    height: 100px;
    z-index: 999;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(0, 243, 255, 0.1) 50%, rgba(0, 0, 0, 0) 100%);
    opacity: 0.1;
    position: fixed;
    bottom: 100%;
    animation: scanline 10s linear infinite;
    pointer-events: none;
}

@keyframes scanline {
    0% {
        bottom: 100%;
    }

    100% {
        bottom: -100px;
    }
}

/* Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    position: relative;
    transition: all 0.3s ease;
}

/* Sidebar */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    height: calc(100vh - 40px);
    overflow-y: auto;
    padding-right: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.sidebar.collapsed {
    width: 0;
    padding: 0;
    margin: 0;
    opacity: 0;
    overflow: hidden;
}

.content-area {
    flex-grow: 1;
    min-width: 0;
    position: relative;
    transition: all 0.3s ease;
}

/* Sidebar Toggle Button (PC) */
.sidebar-toggle {
    position: absolute;
    top: 0;
    left: -15px;
    width: 30px;
    height: 30px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 101;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.sidebar-toggle:hover {
    opacity: 1;
    box-shadow: 0 0 10px var(--accent-glow);
}

.main-layout.sidebar-hidden .sidebar-toggle .icon {
    transform: rotate(180deg);
}

/* Header */
header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
    background: rgba(11, 13, 23, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 900;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.header-title {
    text-align: center;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    position: absolute;
    left: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1002;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--accent);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Sidebar Header Mobile */
.sidebar-header-mobile {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 20px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header-mobile h2 {
    font-family: var(--font-heading);
    color: var(--accent);
    font-size: 1.2rem;
}

.close-sidebar {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    letter-spacing: 2px;
    margin-bottom: 5px;
    text-shadow: 0 0 10px var(--accent-glow);
}

.highlight {
    color: var(--accent);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.separator {
    margin: 0 10px;
}

.callsign-link {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.3s ease;
}

.callsign-link:hover {
    text-shadow: 0 0 10px var(--accent-glow);
}

/* Sidebar Widgets */
.sidebar-widget {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-widget h3 {
    font-family: var(--font-heading);
    color: var(--accent);
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.archive-list {
    list-style: none;
}

.archive-list li {
    margin-bottom: 5px;
}

.archive-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 5px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.archive-list a:hover,
.archive-list a.active {
    background: rgba(0, 243, 255, 0.1);
    color: var(--accent);
}

.archive-list a span:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px;
    flex: 1;
    min-width: 0;
}

.archive-count {
    font-size: 0.85rem;
    opacity: 0.8;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Controls */
.controls {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.search-box input {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 30px;
    color: var(--text-primary);
    width: 300px;
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding-bottom: 30px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-color: var(--accent);
}

.card-image-wrapper {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #000;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-image {
    transform: scale(1.05);
}

.card-info {
    padding: 15px;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 5px;
}

.card-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.event-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border: 2px solid var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-heading);
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 40px;
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

/* Back to Top Button */
#backToTop {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--accent);
    color: #000;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 0 15px var(--accent-glow);
    transition: all 0.3s ease;
}

#backToTop:hover {
    background-color: #fff;
    transform: scale(1.1);
}

/* Date Group Headers */
.date-group-header {
    width: 100%;
    font-family: var(--font-heading);
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin: 40px 0 20px 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.date-group-header::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: var(--accent);
    margin-right: 15px;
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-glow);
}

.loading,
.error,
.no-results {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* Loading Spinner */
.sentinel {
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 243, 255, 0.1);
    border-left-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
        gap: 20px;
    }

    .sidebar-toggle {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .header-content {
        justify-content: center;
    }

    .header-title h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 0.8rem;
    }

    /* Mobile Sidebar */
    .sidebar {
        position: fixed;
        top: 0;
        left: -300px;
        width: 280px;
        height: 100vh;
        background: var(--bg-color);
        border-right: 1px solid var(--border-color);
        padding: 20px;
        transition: left 0.3s ease;
        z-index: 1000;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .sidebar.active {
        left: 0;
    }

    .sidebar-header-mobile {
        display: flex;
    }

    .content-area {
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    #backToTop {
        bottom: 20px;
        right: 20px;
        padding: 10px;
        font-size: 16px;
    }
}