:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #ffffff;
    --accent-color: #bb86fc;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden; /* Hide main scrollbar */
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 1rem;
    padding: 10px 20px;
    border: 1px solid var(--accent-color);
    border-radius: 30px;
    transition: all 0.3s ease;
    z-index: 100;
    background: rgba(18, 18, 18, 0.8);
}

.back-button:hover {
    background-color: var(--accent-color);
    color: #000;
    box-shadow: 0 0 15px var(--accent-color);
}

.info-box {
    text-align: center;
    max-width: 600px;
    padding: 1rem;
    margin-top: 2rem;
    background: rgba(30, 30, 30, 0.5);
    border-radius: 15px;
    border: 1px solid rgba(187, 134, 252, 0.3);
    backdrop-filter: blur(5px);
    z-index: 10;
    animation: fadeIn 1s ease-out;
}

.info-box h1 {
    font-size: 1.2rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.info-box p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.8);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.gallery-container {
    display: flex;
    width: 100%;
    flex: 1;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 2rem;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.gallery-container::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.gallery-container {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.media-card {
    flex: 0 0 auto;
    width: 250px;
    height: 350px;
    background-color: var(--card-bg);
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    opacity: 0; /* Start hidden for animation */
    transform: scale(0.9) translateY(50px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Animation class to be added via JS or default animation */
.media-card.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.media-card:hover {
    transform: scale(1.8) translateY(0) !important;
    z-index: 100;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
    border: 1px solid var(--accent-color);
}

.media-card h2 {
    margin-bottom: 0.5rem;
    font-weight: 300;
    letter-spacing: 1px;
    color: var(--accent-color);
    text-transform: uppercase;
    font-size: 1rem;
    transition: font-size 0.3s;
}

.media-card:hover h2 {
    font-size: 1.2rem;
}

.media-content {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Specific styling for different media types if needed */
img.media-content {
    object-fit: contain;
}

video.media-content {
    background: #000;
}

.instruction {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    pointer-events: none;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.3; }
    50% { opacity: 0.8; }
    100% { opacity: 0.3; }
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox img {
    max-width: 95%;
    max-height: 95%;
    box-shadow: 0 0 50px rgba(187, 134, 252, 0.3);
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    object-fit: contain;
}

.lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 2001;
    line-height: 1;
}

.lightbox-close:hover {
    color: var(--accent-color);
    text-shadow: 0 0 15px var(--accent-color);
}
