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

body {
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3d 50%, #0f2818 100%);
    font-family: 'Arial', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.formContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    width: 300px;
    background: rgba(255, 255, 255, 0.95);
    height: auto;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    text-align: center;
    border-radius: 15px;
}

.videoContainer {
    width: 100%;
    max-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.videoContainer.hidden { 
    display: none; 
}
.videoContainer video {
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 100%;
    height: auto;
}

.gameContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 300px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
}

.gameContainer.hidden {
    display: none;
}

h1 {
    color: #c41e3a;
    margin-bottom: 20px;
    font-size: 24px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

#infoBox {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
    max-height: 150px;
    overflow-y: auto;
}

#infoBox p {
    padding: 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
}

#infoBox p.not-matched {
    background-color: #ffcccc;
    color: #b61111;
}

#infoBox p.matched {
    background-color: #ccffcc;
    color: #0d7d0d;
}

#matchForm {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
    transition: all 0.3s ease;
}

#matchForm input[type="text"],
#matchForm input[type="password"] {
    padding: 12px;
    font-size: 14px;
    border: 2px solid #c41e3a;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
}

#matchForm input[type="text"]:focus,
#matchForm input[type="password"]:focus {
    border-color: #0f7d0f;
    box-shadow: 0 0 8px rgba(15, 125, 15, 0.3);
}

#submitBtn {
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    background: linear-gradient(135deg, #c41e3a 0%, #a01830 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

#submitBtn:hover:not(:disabled) {
    background: linear-gradient(135deg, #a01830 0%, #7d1425 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.4);
}

#submitBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#resultArea {
    margin-top: 20px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#resultArea:empty {
    display: none;
}

#resultArea.success {
    background-color: #ccffcc;
    color: #0d7d0d;
    border: 2px solid #0d7d0d;
}

#resultArea.error {
    background-color: #ffcccc;
    color: #b61111;
    border: 2px solid #b61111;
}

#resultArea.warning {
    background-color: #fff4cc;
    color: #b89d00;
    border: 2px solid #b89d00;
}


#flakes {
    position: fixed;
    top: 0;
    left: 50%;
    width: 300px;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
    transform: translateX(-50%);
}

.flake {
    position: absolute;
    width: 15px;
    height: 15px;
    opacity: 0.8;
    animation: float 8s ease-in-out infinite;
}

#flake1 { left: 5%; animation-delay: 0s; }
#flake2 { left: 10%; animation-delay: 0.5s; }
#flake3 { left: 15%; animation-delay: 1s; }
#flake4 { left: 20%; animation-delay: 1.5s; }
#flake5 { left: 25%; animation-delay: 2s; }
#flake6 { left: 30%; animation-delay: 2.5s; }
#flake7 { left: 35%; animation-delay: 3s; }
#flake8 { left: 40%; animation-delay: 3.5s; }
#flake9 { left: 45%; animation-delay: 4s; }
#flake10 { left: 50%; animation-delay: 4.5s; }
#flake11 { left: 55%; animation-delay: 5s; }
#flake12 { left: 60%; animation-delay: 5.5s; }
#flake13 { left: 65%; animation-delay: 0.3s; }
#flake14 { left: 70%; animation-delay: 0.8s; }
#flake15 { left: 75%; animation-delay: 1.3s; }
#flake16 { left: 80%; animation-delay: 1.8s; }
#flake17 { left: 85%; animation-delay: 2.3s; }
#flake18 { left: 90%; animation-delay: 2.8s; }

@keyframes float {
    0% {
        top: -50px;
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        top: 100vh;
        opacity: 0;
    }
}