/* ==========================================
   GALLERY PAGE - NECROBATICS CS:S
   CSS Variables & Base Styles
   ========================================== */

:root {
    --gallery-primary: #00d4ff;
    --gallery-secondary: #ff006e;
    --gallery-accent: #06ffa5;
    --gallery-warning: #ffbe0b;
    --gallery-bg-dark: #0a0a0f;
    --gallery-bg-light: #14141f;
    --gallery-text: #ffffff;
    --gallery-text-muted: #a0a0b0;
}

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

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--gallery-bg-dark);
    color: var(--gallery-text);
    line-height: 1.6;
}

/* ==========================================
   HERO SECTION
   ========================================== */

.gallery-hero {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse at center, 
        rgba(0, 212, 255, 0.15) 0%, 
        rgba(255, 0, 110, 0.1) 50%, 
        var(--gallery-bg-dark) 100%);
    padding-top: 0;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(135deg, transparent 0%, rgba(0, 212, 255, 0.05) 50%, transparent 100%),
        linear-gradient(45deg, transparent 0%, rgba(255, 0, 110, 0.05) 50%, transparent 100%);
    animation: pulse-gallery 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse-gallery {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.gallery-hero-content {
    text-align: center;
    z-index: 2;
    position: relative;
    padding: 2rem;
    animation: fadeInUp 1s ease-out;
}

.hero-badge {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, var(--gallery-primary), var(--gallery-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.5);
    animation: float-icon 3s ease-in-out infinite;
}

.hero-badge i {
    font-size: 3.5rem;
    color: white;
}

@keyframes float-icon {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

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

.gallery-hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--gallery-primary), var(--gallery-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.gallery-hero-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gallery-accent);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.gallery-hero-description {
    font-size: 1.2rem;
    color: var(--gallery-text-muted);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--gallery-primary);
    border-radius: 50%;
    opacity: 0.5;
    animation: float-particle 10s infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 30%; animation-delay: 2s; }
.particle:nth-child(3) { left: 50%; animation-delay: 4s; }
.particle:nth-child(4) { left: 70%; animation-delay: 6s; }
.particle:nth-child(5) { left: 90%; animation-delay: 8s; }

@keyframes float-particle {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

/* ==========================================
   STATS BAR
   ========================================== */

.gallery-stats {
    padding: 3rem 2rem;
    background: var(--gallery-bg-light);
    border-bottom: 2px solid rgba(0, 212, 255, 0.1);
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 12px;
    border: 2px solid rgba(0, 212, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: var(--gallery-primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.2);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(6, 255, 165, 0.2));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 1.8rem;
    color: var(--gallery-accent);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: var(--gallery-text);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gallery-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================
   FILTER SECTION
   ========================================== */

.filter-section {
    padding: 1.5rem 2rem;
    background: var(--gallery-bg-dark);
    position: sticky;
    top: 70px;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

.filter-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.filter-header {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.filter-header h3 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gallery-text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-header i {
    color: var(--gallery-accent);
    font-size: 0.9rem;
}

.filter-buttons {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    flex: 1;
}

.filter-btn {
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    color: var(--gallery-text-muted);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn i {
    font-size: 0.9rem;
}

.filter-btn:hover {
    border-color: var(--gallery-primary);
    color: var(--gallery-text);
    background: rgba(0, 212, 255, 0.05);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--gallery-primary), var(--gallery-accent));
    border-color: transparent;
    color: white;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

/* ==========================================
   GALLERY GRID SECTION
   ========================================== */

.gallery-grid-section {
    padding: 4rem 2rem;
    background: var(--gallery-bg-dark);
    min-height: 60vh;
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 5rem 2rem;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 2rem;
    border: 4px solid rgba(0, 212, 255, 0.2);
    border-top-color: var(--gallery-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-state p {
    font-size: 1.2rem;
    color: var(--gallery-text-muted);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
}

.empty-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(6, 255, 165, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon i {
    font-size: 3rem;
    color: var(--gallery-text-muted);
}

.empty-state h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--gallery-text);
}

.empty-state p {
    font-size: 1.2rem;
    color: var(--gallery-text-muted);
    margin-bottom: 2rem;
}

.btn-discord {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #5865F2, #7289da);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-discord:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(88, 101, 242, 0.4);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

.gallery-item {
    background: var(--gallery-bg-light);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(0, 212, 255, 0.1);
    transition: all 0.3s ease;
    animation: fadeInUp 0.4s ease-out backwards;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }

.gallery-item:hover {
    border-color: var(--gallery-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.gallery-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 212, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: all 0.3s ease;
}

.video-badge i {
    font-size: 1.5rem;
    color: white;
    margin-left: 3px;
}

.gallery-item:hover .video-badge {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.overlay-content {
    width: 100%;
}

.overlay-author {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.author-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid var(--gallery-accent);
}

.author-name {
    font-weight: 700;
    color: white;
}

.overlay-actions {
    display: flex;
    gap: 0.8rem;
}

.action-btn {
    padding: 0.5rem 1rem;
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid var(--gallery-primary);
    border-radius: 8px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    background: rgba(0, 212, 255, 0.4);
    transform: scale(1.05);
}

.gallery-info {
    padding: 1.5rem;
}

.gallery-caption {
    font-size: 0.95rem;
    color: var(--gallery-text-muted);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.gallery-date {
    font-size: 0.85rem;
    color: var(--gallery-accent);
    font-weight: 600;
}

/* ==========================================
   LOAD MORE SECTION
   ========================================== */

.load-more-section {
    padding: 3rem 2rem;
    background: var(--gallery-bg-dark);
    text-align: center;
}

.btn-load-more {
    padding: 1.2rem 2.5rem;
    background: linear-gradient(135deg, var(--gallery-primary), var(--gallery-accent));
    border: none;
    border-radius: 12px;
    color: white;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

.btn-load-more:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.btn-load-more i {
    transition: transform 0.3s ease;
}

.btn-load-more:hover i {
    transform: rotate(180deg);
}

/* ==========================================
   LIGHTBOX MODAL
   ========================================== */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: rgba(255, 0, 110, 0.8);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1002;
}

.lightbox-close:hover {
    background: var(--gallery-secondary);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 212, 255, 0.8);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1002;
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--gallery-primary);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    gap: 2rem;
    align-items: center;
}

#lightboxImage {
    max-width: 70%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.3);
}

.lightbox-info {
    max-width: 350px;
    background: var(--gallery-bg-light);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid rgba(0, 212, 255, 0.2);
}

.lightbox-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(0, 212, 255, 0.1);
}

.lightbox-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--gallery-accent);
}

.lightbox-author-info {
    display: flex;
    flex-direction: column;
}

.lightbox-username {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--gallery-text);
}

.lightbox-date {
    font-size: 0.85rem;
    color: var(--gallery-text-muted);
}

.lightbox-caption {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gallery-text-muted);
    margin-bottom: 1.5rem;
}

.lightbox-reactions {
    display: flex;
    gap: 1rem;
}

.reaction-btn {
    flex: 1;
    padding: 0.8rem 1rem;
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid var(--gallery-primary);
    border-radius: 8px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.reaction-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    transform: scale(1.05);
}

.discord-link {
    background: rgba(88, 101, 242, 0.1);
    border-color: #5865F2;
}

.discord-link:hover {
    background: rgba(88, 101, 242, 0.2);
}

/* ==========================================
   UPLOAD CTA SECTION
   ========================================== */

.upload-cta-section {
    padding: 6rem 2rem;
    background: linear-gradient(135deg, 
        rgba(0, 212, 255, 0.05) 0%, 
        rgba(255, 0, 110, 0.05) 100%);
}

.upload-cta-container {
    max-width: 900px;
    margin: 0 auto;
}

.upload-cta-content {
    text-align: center;
    padding: 4rem 3rem;
    background: var(--gallery-bg-light);
    border-radius: 20px;
    border: 2px solid rgba(0, 212, 255, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.upload-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, var(--gallery-primary), var(--gallery-accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.4);
    animation: float-icon 3s ease-in-out infinite;
}

.upload-icon i {
    font-size: 3rem;
    color: white;
}

.upload-cta-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--gallery-text);
}

.upload-cta-content p {
    font-size: 1.2rem;
    color: var(--gallery-text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.upload-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.feature-item i {
    color: var(--gallery-accent);
    font-size: 1.2rem;
}

.feature-item span {
    color: var(--gallery-text);
    font-weight: 600;
}

.btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 2.5rem;
    background: linear-gradient(135deg, #5865F2, #7289da);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 700;
}

.btn-upload:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(88, 101, 242, 0.4);
}

.btn-upload > span {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.btn-main {
    font-size: 1.2rem;
    font-weight: 700;
}

.btn-sub {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 1200px) {
    .lightbox-content {
        flex-direction: column;
    }

    #lightboxImage {
        max-width: 100%;
    }

    .lightbox-info {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .gallery-hero h1 {
        font-size: 2.5rem;
    }

    .gallery-hero-subtitle {
        font-size: 1.2rem;
    }

    .gallery-hero-description {
        font-size: 1rem;
    }

    .hero-badge {
        width: 80px;
        height: 80px;
    }

    .hero-badge i {
        font-size: 2rem;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }

    .filter-section {
        position: relative;
        top: 0;
        padding: 1rem;
    }

    .filter-container {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .filter-buttons {
        gap: 0.5rem;
        width: 100%;
    }

    .filter-btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    .filter-btn i {
        font-size: 0.8rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .lightbox-prev {
        left: 1rem;
    }

    .lightbox-next {
        right: 1rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
    }

    .upload-cta-content {
        padding: 2rem 1.5rem;
    }

    .upload-cta-content h2 {
        font-size: 1.8rem;
    }

    .btn-upload {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-upload > span {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .gallery-hero {
        min-height: 80vh;
        height: 80vh;
    }

    .gallery-image {
        height: 250px;
    }
}
