:root {
    --purple-deep: #1a0b2e;
    --blue-electric: #00f2ff;
    --yellow-neon: #f9ff00;
    --purple-glow: rgba(138, 43, 226, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --cyber-red: #ff003c;
}

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

body {
    background-color: var(--purple-deep);
    background-image: linear-gradient(rgba(26, 11, 46, 0.85), rgba(26, 11, 46, 0.85)), url('img/bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Glitch and Scanline Effects */
.glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 100;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.25) 50%
    ),
    linear-gradient(
        90deg,
        rgba(255, 0, 0, 0.06),
        rgba(0, 255, 0, 0.02),
        rgba(0, 0, 255, 0.06)
    );
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 101;
}

/* Screenshots Specific Styles */
.screenshots-container {
    padding: 120px 5% 5rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.page-header {
    text-align: center;
    margin-bottom: 4rem;
    animation: slideDown 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.search-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 2rem 0;
}

#screenshotSearch {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 1rem 1.5rem;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 2px;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
    text-align: center;
}

#screenshotSearch:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--yellow-neon);
    box-shadow: 0 0 20px rgba(249, 255, 0, 0.2);
}

.search-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    box-shadow: inset 0 0 10px rgba(0, 242, 255, 0);
    transition: box-shadow 0.3s ease;
}

#screenshotSearch:focus + .search-glow {
    box-shadow: inset 0 0 15px rgba(249, 255, 0, 0.1);
}

.glitch-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    text-shadow: 0 0 15px var(--blue-electric);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    letter-spacing: 5px;
    color: var(--yellow-neon);
    text-shadow: 0 0 5px rgba(249, 255, 0, 0.5);
    margin-bottom: 1.5rem;
}

.neon-divider {
    width: 150px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--yellow-neon), transparent);
    margin: 0 auto;
    box-shadow: 0 0 15px var(--yellow-neon);
    border-radius: 5px;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    min-height: 400px;
}

.gallery-item {
    background: rgba(15, 15, 25, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
    position: relative;
}

.gallery-item:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: var(--yellow-neon);
    box-shadow: 0 20px 40px rgba(249, 255, 0, 0.15);
}

.image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    aspect-ratio: 16/9;
    background: #000;
    cursor: pointer;
}

.date-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 242, 255, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid var(--blue-electric);
    padding: 5px 12px;
    font-size: 0.7rem;
    color: var(--blue-electric);
    border-radius: 4px;
    font-weight: 700;
    z-index: 5;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2);
    font-family: 'Orbitron', sans-serif;
}

.player-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border-left: 3px solid var(--yellow-neon);
    padding: 5px 15px;
    font-size: 0.8rem;
    color: #fff;
    border-radius: 0 4px 4px 0;
    font-weight: 700;
    z-index: 5;
    letter-spacing: 2px;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
    filter: brightness(0.7) contrast(1.1);
}

.gallery-item:hover .image-wrapper img {
    transform: scale(1.15);
    filter: brightness(1) contrast(1.2);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.3s ease;
}

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

.overlay-icon {
    font-size: 3rem;
    color: var(--yellow-neon);
    font-weight: 300;
    text-shadow: 0 0 20px var(--yellow-neon);
    transform: scale(0.5);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-item:hover .overlay-icon {
    transform: scale(1);
}

.item-footer {
    padding: 12px 5px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-id {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
}

/* Loading State */
.loading-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 0;
    color: var(--blue-electric);
}

.glitch-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid transparent;
    border-top-color: var(--blue-electric);
    border-bottom-color: var(--yellow-neon);
    border-radius: 50%;
    animation: spin 1s linear infinite, glitch-pulse 2s infinite;
    margin-bottom: 2rem;
}

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

@keyframes glitch-pulse {
    0%, 100% { box-shadow: 0 0 20px var(--blue-electric); }
    50% { box-shadow: 0 0 40px var(--yellow-neon); filter: hue-rotate(90deg); }
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    margin-top: 5rem;
}

.pg-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.6);
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.pg-btn:hover:not(.disabled) {
    border-color: var(--yellow-neon);
    color: var(--yellow-neon);
    background: rgba(249, 255, 0, 0.05);
}

.pg-btn.active {
    border-color: var(--yellow-neon);
    color: #000;
    background: var(--yellow-neon);
    box-shadow: 0 0 20px rgba(249, 255, 0, 0.4);
}

.pg-dots {
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 3px;
}

/* Lightbox Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    opacity: 0;
    transition: opacity 0.3s ease;
    justify-content: center;
    align-items: center;
    user-select: none;
}

.modal.show {
    opacity: 1;
    display: flex;
}

.modal-content-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.modal.show .modal-content-wrapper {
    transform: scale(1);
}

.modal-content {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.modal-content.zoomed {
    max-width: none;
    max-height: none;
    cursor: zoom-out;
}

#caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px 20px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-meta {
    display: flex;
    gap: 20px;
    letter-spacing: 1px;
    font-weight: 500;
    color: #ccc;
}

.modal-meta span {
    position: relative;
}

.modal-meta span:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
}

/* Modal Navigation Buttons */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2002;
    transition: all 0.2s ease;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: bold;
}

.modal-prev {
    left: 10px;
    background: #00f2ff; /* Cyan */
    color: #000;
}

.modal-next {
    right: 10px;
    background: rgba(255, 255, 255, 0.1); /* Transparent gray */
    color: #fff;
}

.modal-nav:hover {
    filter: brightness(1.2);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    color: #fff;
    cursor: pointer;
    z-index: 2003;
    transition: opacity 0.2s ease;
}

.close-modal:hover {
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .glitch-text { font-size: 2.5rem; }
    .gallery-grid { grid-template-columns: 1fr; }
    .modal-nav { 
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
        background: rgba(0, 0, 0, 0.6);
    }
    .modal-prev { left: 15px; }
    .modal-next { right: 15px; }
    .close-modal {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 1.6rem;
    }
    .modal-title { font-size: 1.2rem; }
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes glowPulse {
    0%, 100% { text-shadow: 0 0 15px var(--blue-electric); }
    50% { text-shadow: 0 0 30px var(--blue-electric), 0 0 10px #fff; }
}
