/* Base styles and reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Times New Roman', Times, serif;
    background-color: #000000;
    color: #d4af37;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    position: relative;
    overflow-x: hidden;
}

/* Hide the default cursor on the entire page */
body, a, button, video, img {
    cursor: none !important;
}

a, button {
    position: relative;
}

/* Style for the light orb cursor */
.cursor-light {
    position: fixed;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 0 30px 15px rgba(212, 175, 55, 0.3), 0 0 10px 5px rgba(255, 255, 255, 0.5);
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 0.3s ease,
                width 0.8s ease-out,
                height 0.8s ease-out,
                background-color 0.8s ease-out, 
                transform 0.1s ease, 
                box-shadow 0.8s ease-out; 
    filter: blur(20px);
    transform: translate(-50%, -50%);
}

/* Change cursor appearance when hovering over clickable elements */
.cursor-light.on-clickable {
    width: 60px;
    height: 60px;
    background-color: rgba(212, 175, 55, 0.5);
}

.cursor-light.clicked{
    transform: translate(-50%, -50%) scale(0.9);
}

.trail-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    overflow: visible;
}

.cursor-trail  {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(212, 175, 55, 0.15);
    box-shadow: 0 0 15px 8px rgba(212, 175, 55, 0.15);
    mix-blend-mode: screen;
    pointer-events: none;
    filter: blur(2px);
    transform: translate(-50%, -50%);
}

/* Navigation styling */
nav {
    position: fixed;
    top: 30px;
    right: 20px;
    z-index: 100;
}

.nav-links a {
    color: #d4af37;
    text-decoration: none;
    font-size: 18px;
    transition: opacity 0.3s ease;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* Container for main content */
.container {
    width: 100%;
    max-width: 1200px;
    padding: 20px;
    margin: 40px auto 0;
    overflow: visible;
}

/* Main content styling */
.home-content {
    padding: 40px 20px;
}

.project-description {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.project-description p {
    font-size: 18px;
    margin-bottom: 10px;
    margin-top: 10px;
    display: inline;
}

.description-paragraph {
    display: block;
    margin: 30px 0;
}

/* Button styling */
.button-container {
    margin-top: 50px;
}

#begin-button {
    background: transparent;
    border: none;
    color: #d4af37;
    font-family: 'Times New Roman', Times, serif;
    font-size: 18px;
    position: relative;
    transition: opacity 0.3s ease;
    padding: 10px 20px;
}

#begin-button:hover {
    opacity: 0.8;
}

#begin-button::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    background-color: #d4af37;
    left: 0;
    bottom: 0;
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: bottom right;
}

#begin-button:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.memory-outer-container {
    overflow: visible;
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 0 auto;
}

/* Memory vignettes styling */
.memory-container {
    display: none;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 120px;
    min-height: 80vh;
    padding: 20px;
    opacity: 0;
    transition: opacity 2s cubic-bezier(0.25, 0.1, 0.25, 1);
    overflow: visible;
    margin: 0 auto;
    will-change: opacity;
}

/* For wider screens, allow more space between vignettes */
@media (min-width: 1200px) {
    .memory-container {
        gap: 120px;
    }
}

.memory-vignette {
    position: relative;
    width: 300px;
    height: 220px;
    border-radius: 0px;
    overflow: hidden;
    transition: 
        width 0.3s cubic-bezier(0.25, 0.1, 0.25, 1),
        height 0.3s cubic-bezier(0.25, 0.1, 0.25, 1),
        opacity 1.5s cubic-bezier(0.25, 0.1, 0.25, 1),
        transform 1.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    opacity: 0;
    transform: scale(0.9);
    will-change: transform, opacity;
}

.memory-vignette.visible {
    opacity: 1;
    transform: scale(1);
}

.memory-vignette:hover {
    width: 360px;
    height: 265px;
}

.vignette-video {
    object-fit: cover;
    background-color: black; /* Ensures no transparent edges */
}

.memory-vignette img, .memory-vignette video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #000;
}

.memory-vignette::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at center,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0.3) 70%,
        rgba(0,0,0,0.7) 100%
    );
    pointer-events: none;
    z-index: 2;
}

/* Fullscreen memory styling */
.fullscreen-memory {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 1.2s ease-in;
}

.fullscreen-memory video {
    max-width: 100%;
    max-height: 100%;
}

/* Custom video controls styling */
.video-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Full video sizing - maintain aspect ratio while filling screen */
#fullscreen-player {
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
    background-color: black; /* Prevent transparent background */
}

/* Remove default controls */
#fullscreen-player::-webkit-media-controls {
    display: none !important;
}

#fullscreen-player::-webkit-media-controls-enclosure {
    display: none !important;
}

#fullscreen-player::-webkit-media-controls-panel {
    display: none !important;
}

/* Ensure memory container has proper fade transition */
.memory-container {
    transition: opacity 1s ease-out;
}

.custom-controls {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 80%;
    max-width: 500px;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.video-container:hover .custom-controls,
.custom-controls:hover {
    opacity: 1;
}

.control-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    gap: 50px;
}

.control-with-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}



.play-pause-btn, .rewind-btn, .fast-forward-btn {
    background: none;
    border: none;
    color: #d4af37;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.play-pause-btn:hover, .rewind-btn:hover, .fast-forward-btn:hover {
    background-color: rgba(212, 175, 55, 0.2);
}

.play-pause-btn {
    font-size: 24px;
}

.play-icon, .pause-icon {
    color: #d4af37;
}

.pause-icon {
    display: none;
}

.restart-btn, .skip-to-end-btn {
    background: none;
    border: none;
    color: #d4af37;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.restart-btn:hover, .skip-to-end-btn:hover {
    background-color: rgba(212, 175, 55, 0.2);
}

.speed-indicator{
    font-family: 'Times New Roman', Times, serif;
    color: #d4af37;
    font-size: 14px;
    height: 16px;
    min-width: 30px;
    text-align: center;
}

.progress-container {
    width: 100%;
    height: 10px;
    position: relative;
    margin-bottom: 5px;
}

.progress-bar {
    position: relative;
    height: 3px;
    width: 100%;
    background-color: rgba(212, 175, 55, 0.3);
    border-radius: 3px;
    overflow: hidden;
    cursor: default !important;
    pointer-events: none;
}

.progress-indicator {
    position: absolute;
    height: 100%;
    width: 0%;
    background-color: #d4af37;
    border-radius: 3px 0 0 3px;
    transition: width 0.1s linear;
    pointer-events: none;
}

.progress-bar {
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.2);
}

/* Animation for page transitions */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.fade-in {
    animation: fadeIn 1.2s forwards ease-in;
}

.fade-out {
    animation: fadeOut 1s forwards ease-out;
}