:root {
    --primary-color: #ff0000;
    --secondary-color: #5c0101;
    --dark-bg: #080808;
    --medium-bg: #333333;
    --light-text: #ffffff;
    --dark-text: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Jolly Lodger", cursive, system-ui;
    font-weight: 400;
    font-style: normal;
}

body {
    background-color: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
header {
    background: var(--dark-bg);
    color: var(--light-text);
    padding: 1rem 0;
    width: 100%;
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.2);
    border-bottom: 2px solid var(--primary-color);
    position: relative;
}

.header-content {
    margin: 0 auto;
    padding: 0 20px;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin-left: auto;
}

.nav-menu>li:last-child {
    margin-left: auto;
}

.nav-link {
    color: var(--light-text);
    text-decoration: none;
    font-size: 2.1rem;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-link:not(.registration)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:not(.registration):hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary-color);
}

.registration {
    background: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.registration:hover {
    background: var(--secondary-color);
}

.registration.active {
    background: var(--secondary-color);
}

/* Hero Section */
.hero {
    height: 50vh;
    background: var(--dark-bg) url('../img/hero2.jpg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}


.hero h1 {
    font-size: 10vw;
    line-height: 1;
    text-shadow: 3px 3px 10px var(--primary-color);
    animation: float 6s cubic-bezier(0.075, 0.82, 0.165, 1) infinite;

}

#ghostCanvas {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 999;
}


/* Form Section */
.form-section {
    background-color: var(--medium-bg);
    padding: 40px;
    font-size: 1.6rem;
    display: grid;

}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.time-slot {
    background: var(--medium-bg);
    color: var(--light-text);
    border: 2px solid #666;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    font-size: 1.8rem;
    border-radius: 8px;
}

#agreeLabel {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 1.6rem;
}

#agreeLabel input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

#agreeLabel.invalid {
    color: var(--primary-color);
    animation: shake 0.5s ease-in-out;
}

#agreeLabel.invalid input[type="checkbox"] {
    outline: 2px solid var(--primary-color);
}


#personalDetails input {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: 2px solid #666;
    border-radius: 5px;
    background-color: var(--medium-bg);
    color: var(--light-text);
    font-size: 1.6rem;
    transition: fade 0.3s ease;
}

#personalDetails input:focus {
    background-color: var(--dark-bg);
    color: var(--light-text);
}

#personalDetails button {
    background: var(--primary-color);
    color: var(--light-text);
    margin-top: 10px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.6rem;
    transition: background 0.3s ease;
}

#personalDetails button:hover {
    background: var(--secondary-color);
}

#agreeLabel {
    margin-top: 30px;
    user-select: none;
}
.form-group {
    font-size: 1.6rem;
}

.form-group.hidden {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-group.visible {
    display: block;
    opacity: 1;
}


.time-slot.selected {
    opacity: 1;
    background: var(--secondary-color);
}

.time-slots-grid.invalid {
    animation: shake 0.5s ease-in-out;
    border: 2px solid var(--primary-color);
    padding: 5px;
    border-radius: 8px;
}


.invalid {
    border-color: var(--primary-color) !important;
    animation: shake 0.5s ease-in-out;
    animation-iteration-count: 1;
}

.form-section.invalid {
    animation: shake 0.5s ease-in-out;
}


.error-message {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 0.5rem;
    display: block;
}

.error.full {
    color: var(--primary-color);
}

/* Modals */
.rules-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1a1a1a;
    padding: 2rem;
    border: 2px solid #8b0000;
    border-radius: 10px;
    z-index: 1000;
    max-width: 500px;
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.5);
}



/* Footer */
footer {
    background-color: rgba(0, 0, 0, 0.9);
    color: var(--light-text);
    font-size: 1.4rem;
    text-align: center;
    padding: 30px 0;
    margin-top: auto;
    border-top: 2px solid var(--primary-color);
}



/* Mobile Responsiveness */
@media screen and (max-width: 768px) {

    /* Navigation */
    .nav-menu {
        flex-direction: row;
        gap: 0.2rem;
        margin-left: 0;
        justify-content: center;
    }

    .header-content {
        padding: 0;
    }

    .nav-menu>li:last-child {
        margin-left: 0;
    }

    .nav-link {
        font-size: 1.6rem;
        padding: 0.5rem;
    }

    .registration {
        width: fit-content;
    }

    /* Hero Section */
    .hero {
        height: 40vh;
    }

    .hero h1 {
        font-size: 15vw;
        line-height: 1.2;
    }

    /* Form Section */
    .form-section {
        padding: 20px;
    }

    .time-slots-grid {
        grid-template-columns: 1fr;
    }

    .time-slot {
        font-size: 1.6rem;
        padding: 12px;
    }

    /* Modals */
    .rules-modal {
        width: 90%;
        padding: 1rem;
        font-size: 1.4rem;
    }

    /* Footer */
    footer {
        padding: 20px 0;
        font-size: 1.2rem;
    }
}

@media screen and (max-width: 480px) {

    /* Navigation */
    .nav-link {
        font-size: 1.2rem;
    }

    /* Hero Section */
    .hero {
        height: 35vh;
    }

    .hero h1 {
        font-size: 18vw;
    }

    /* Form Elements */
    #personalDetails input {
        font-size: 1.4rem;
        padding: 8px;
    }

    #agreeLabel {
        font-size: 1.4rem;
    }

    .time-slot {
        font-size: 1.4rem;
    }

    /* Modals */
    .rules-modal {
        padding: 0.5rem;
    }

    /* Utility */
    .container {
        padding: 0 15px;
    }
}

/* Mobile Landscape Optimization */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: 60vh;
    }

    .nav-menu {
        flex-direction: row;
        flex-wrap: wrap;
    }
}