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

body {
    background-color: #ffffff;
    background-image:
        linear-gradient(to right, rgb(0, 0, 0) 1px, transparent 1px),
        linear-gradient(to bottom, rgb(0, 0, 0) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: moveGrid 10s linear infinite, zoomGrid 6s ease-in-out infinite;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    color: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    text-align: center;
}

@keyframes moveGrid {
    0% { background-position: 0 0; }
    100% { background-position: 60px 60px; }
}

/* New Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #fff; }
}

/* The glitch keyframes have been removed */

/* Boot Loader Styles */
#bootLoader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

#bootLoader.boot-loader-hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-text {
    font-family: 'DotGothic16', sans-serif;
    font-size: 2.5em;
    color: #fff;
    overflow: hidden;
    max-width: 90%;
    text-align: left;
}

.loader-text span#typewriterText {
    display: inline-block;
    vertical-align: bottom;
    overflow: hidden;
    white-space: nowrap;
    border-right: .15em solid transparent;
    letter-spacing: .05em;
    animation:
        typewriter 10s steps(60, end) forwards;
}

.loader-text .cursor {
    font-size: 1.2em;
    animation: blink-caret .75s step-end infinite;
    display: inline-block;
    vertical-align: bottom;
}

/* Class to hide content before boot loader finishes */
.content-hidden {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.content-hidden.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.bold-heading {
    /* Reduced font size and padding */
    font-size: 1.2em; 
    padding: 12px 20px; 
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    color: #000000;
    background-color: #faf3dd;
    border: 2px solid #000000;
    border-radius: 12px;
    font-weight: 100;
    transition: all 0.3s ease;
    cursor: pointer;
}

.bold-heading:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.bold-heading:active {
    transform: translateY(0);
    box-shadow: none;
}

.container-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-top: 30px;
    width: 100%;
    max-width: 1400px;
}

.movies-list {
    font-family: 'Inter', sans-serif;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    flex: 1;
}

.movie-container {
    background-color: #ffc800d6;
    font-family: 'Inter', sans-serif;
    color: #000;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #000;
    width: 100%;
    text-align: left;

    /* Shared container style */
    box-shadow: 5px 5px 0px #000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;

    /* Initial state for animation */
    opacity: 0;
    transform: translateY(20px);
}

.movies-list.is-visible .movie-container {
    animation: fadeInUp 0.5s ease-out forwards;
}

.movie-container:hover {
    transform: translateY(-5px);
    box-shadow: 8px 8px 0px #000;
}

/* New style for newly added movie container */
.movie-container.newly-added {
    background-color: #baffc9;
    animation: fadeInUp 0.5s ease-out forwards;
}

.toggle-review-btn, .review-btn {
    font-size: 1em;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    padding: 8px 12px;
    color: #000000;
    background-color: #faf3dd;
    border: 2px solid #000000;
    border-radius: 8px;
    font-weight: 100;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-top: 10px;
}

.toggle-review-btn:hover, .review-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.toggle-review-btn:active, .review-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.review-input, .add-movie-container input, .add-movie-container textarea, #movieGenre {
    width: 100%;
    padding: 8px;
    margin-top: 10px;
    border-radius: 8px;
    border: 1px solid #000;
    resize: none;
    transition: box-shadow 0.3s ease;
}

.review-input:focus, .add-movie-container input:focus, .add-movie-container textarea:focus, #movieGenre:focus {
    outline: none;
    box-shadow: 0 0 5px #b8c0ff;
}

.reviews {
    margin-top: 12px;
    font-size: 0.9em;
    background-color: #fff;
    padding: 8px;
    border-radius: 8px;
    min-height: 30px;
}

.add-movie-container {
    background-color: #f1f1f1;
    border: 2px solid #000;
    padding: 20px;
    border-radius: 15px;
    width: 300px;
    color: #000;
    position: sticky;
    top: 20px;
}

.hidden {
    display: none;
}

/* Cursor follower */
#cursorFollower {
    position: fixed;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    background-color: #000000df;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 10000;
}

/* Instructions Container */
.instructions-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    width: 100%;
    max-width: 1200px;
    flex-wrap: wrap;
    padding: 0 20px;
    margin: 30px auto 0;
}

.instruction-box {
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #000;
    color: #000;
    width: 100%;
    max-width: 350px;
    text-align: center;

    /* Shared container style */
    box-shadow: 5px 5px 0px #000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.instruction-box:hover {
    transform: translateY(-5px);
    box-shadow: 8px 8px 0px #000;
}

.instruction-box p {
    font-size: 1.1em;
    font-weight: 500;
    line-height: 1.4;
}

/* Color Palette for Instruction Boxes */
.primary-bg { background-color: #06d6a0; }
.secondary-bg { background-color: #06d6a0; }
.tertiary-bg { background-color: #06d6a0; }

/* About Container */
.about-container {
    background-color: #669bbc;
    color: #000;
    padding: 30px;
    border-radius: 15px;
    border: 2px solid #000;
    width: 100%;
    max-width: 1200px;
    margin-top: 30px;
    text-align: center;

    /* Shared container style */
    box-shadow: 5px 5px 0px #000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 30px auto 0;
}

.about-container:hover {
    transform: translateY(-5px);
    box-shadow: 8px 8px 0px #000;
}

.about-container h2 {
    margin-bottom: 15px;
    font-family:'Inter', sans-serif;
    color: #000000;
    text-transform: uppercase;
    text-align: left;
}

.about-container p {
    font-size: 1.1em;
    line-height: 1.6;
}

/* Genre-based colors for movie containers */
.movie-container.genre-action { background-color: #fca211cf; }
.movie-container.genre-adventure { background-color: #e63947e2; }
.movie-container.genre-animation { background-color: #a8dadcd5; }
.movie-container.genre-comedy { background-color: #ffc800d6; }
.movie-container.genre-crime { background-color: #1a759fd1; }
.movie-container.genre-drama { background-color: #00b4d8c5; }
.movie-container.genre-documentary { background-color: #457b9dd0; }
.movie-container.genre-fantasy { background-color: #2a9d90d3; }
.movie-container.genre-historical { background-color: #7b43a9c9; }
.movie-container.genre-horror { background-color: #9d0207cd; }
.movie-container.genre-musical { background-color: #ff99c9d2; }
.movie-container.genre-mystery { background-color: #6b0572c6; }
.movie-container.genre-romance { background-color: #e5989bc1; }
.movie-container.genre-science-fiction { background-color: #64748bc7; }
.movie-container.genre-sports { background-color: #55a630c9; }
.movie-container.genre-thriller { background-color: #4c0082c5; }
.movie-container.genre-war { background-color: #8b0000c8; }
.movie-container.genre-western { background-color: #c98c42c7; }
.movie-container.genre-experimental { background-color: #0d1b2aca; color: #fff; }

/* Responsive */
@media (max-width: 1024px) {
    .movies-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .instructions-container {
        flex-direction: column;
        align-items: center;
    }
    .instruction-box {
        max-width: 90%;
    }
}

@media (max-width: 600px) {
    .movies-list {
        grid-template-columns: 1fr;
    }
}