/* Video Background Styles */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

#bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(101, 67, 33, 0.85); /* Brown overlay instead of black */
}

/* Main Styles */
body {
    font-family: 'Georgia', serif;
    color: #F5DEB3; /* Wheat text color */
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    position: relative;
    background-color: #654321; /* Fallback brown background */
}

header {
    padding: 20px;
    text-align: center;
    position: relative;
    z-index: 1;
}

h1 {
    color: #D2B48C; /* Tan color */
    text-shadow: 2px 2px 4px #000;
    font-size: 1.8rem;
    max-width: 90%;
    margin: 0 auto;
    line-height: 1.4;
}

/* Container and Box Styles */
.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    position: relative;
    z-index: 1;
}

.box {
    width: 300px;
    height: 200px;
    background-color: rgba(139, 69, 19, 0.9); /* Darker brown with transparency */
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-align: center;
    padding: 15px;
    position: relative;
    overflow: hidden;
    border: 2px solid #8B4513;
}

.box.unlocked:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    background-color: rgba(160, 82, 45, 0.95); /* Sienna brown with transparency */
    border-color: #D2B48C;
}

.box.locked {
    cursor: not-allowed;
    opacity: 0.7;
    background-color: rgba(101, 67, 33, 0.7); /* Darker brown for locked boxes */
}

.box.locked:hover {
    animation: shake 0.5s;
    animation-iteration-count: 1;
}

@keyframes shake {
    0% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
    100% { transform: translateX(0); }
}

.box h2 {
    margin: 0;
    color: #FFF8DC; /* Cornsilk */
    z-index: 1;
    font-size: 1.2rem;
}

.lock-icon {
    font-size: 2rem;
    margin-top: 10px;
}

/* Section Styles */
.section {
    display: none;
    width: 90%;
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    background-color: rgba(101, 67, 33, 0.95); /* Dark brown */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

/* Video Container Styles */
.video-container {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.landscape-video {
    width: 100%;
    display: block;
    border-radius: 10px;
}

/* Button Styles */
.back-button {
    display: block;
    margin: 20px auto;
    padding: 12px 25px;
    background-color: #8B4513;
    color: #FFF8DC;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.back-button:hover {
    background-color: #A0522D;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        align-items: center;
    }
    
    .box {
        width: 80%;
        height: 150px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    #bg-video {
        display: none;
    }
    
    .video-background {
        background: url('images/123.png') no-repeat center center;
        background-size: cover;
    }
    
    .video-container {
        margin: 10px auto;
    }
}

@media (max-width: 480px) {
    .box h2 {
        font-size: 1rem;
    }
    
    .section {
        padding: 20px;
    }
}