/* --- 1. General Settings --- */
:root {
    --yellow: #ffc900;
    --dark-yellow: #f5b000;
    --text-color: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --char-width: 400px; /* Character block width */
}

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    background-color: var(--yellow); 
    overflow-x: hidden; 
    color: var(--text-color);
    position: relative; 
    min-height: 100dvh; 
}

/* --- 1.5. Анімація фонових променів --- */
@keyframes rotate-rays {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

body::before {
    content: '';
    position: fixed; 
    top: 50%;
    left: 50%;
    width: 200vw; 
    height: 200vh;
    z-index: 0; 
    background-image: repeating-conic-gradient(
        rgba(255, 255, 255, 0.08) 0deg 10deg, 
        transparent 10deg 30deg 
    );
    animation: rotate-rays 60s linear infinite; 
}


/* --- 2. Main Hero Screen --- */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh; 
    padding: 2rem;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.header-logo {
    position: absolute;
    top: 2rem;
    left: 2rem;
    height: 70px; 
    z-index: 20; 
}

.content {
    flex: 1;
    max-width: 600px;
    padding-right: 2rem;
    z-index: 10; 
}

.content h1 {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin: 0;
    text-shadow: 3px 3px 6px var(--shadow-color);
}

.content p {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0.5rem 0 2rem 0;
    text-shadow: 2px 2px 4px var(--shadow-color);
}

/* --- 3. "Cooler" CTA Button --- */
.cta-button {
    background: linear-gradient(145deg, #ff512f, #dd2476);
    border: none;
    border-radius: 50px;
    padding: 18px 40px;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    text-transform: uppercase;
    text-decoration: none; /* (ДОДАНО) Прибираємо підкреслення */
    box-shadow: 0 10px 20px rgba(221, 36, 118, 0.3), 0 6px 6px rgba(221, 36, 118, 0.2);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    display: inline-block; /* (ДОДАНО) Для коректних відступів <a> */
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(221, 36, 118, 0.4), 0 10px 10px rgba(221, 36, 118, 0.3);
}

.cta-button:active {
    transform: translateY(-2px);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* --- 4. Character --- */
.character {
    flex-basis: var(--char-width);
    text-align: center;
    z-index: 10; 
}

.character-image {
    width: 100%;
    max-width: var(--char-width);
    height: auto;
    filter: drop-shadow(5px 5px 15px rgba(0,0,0,0.3));
}

/* --- 5. Coin Animation --- */
.coin {
    position: absolute;
    background: #ffd700;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    box-shadow: 0 0 10px #ffeb3b, inset 0 0 5px #c9a300;
    opacity: 0;
    animation: fall 10s infinite linear;
    z-index: 1; 
}

.coin:nth-child(1) { top: -10%; left: 10%; animation-delay: 0s; animation-duration: 7s; }
.coin:nth-child(2) { top: -10%; left: 30%; animation-delay: 2s; animation-duration: 8s; }
.coin:nth-child(3) { top: -10%; left: 50%; animation-delay: 5s; animation-duration: 6s; }
.coin:nth-child(4) { top: -10%; left: 70%; animation-delay: 1s; animation-duration: 9s; }
.coin:nth-child(5) { top: -10%; left: 90%; animation-delay: 3s; animation-duration: 7s; }
.coin:nth-child(6) { top: -10%; left: 80%; animation-delay: 6s; animation-duration: 10s; }

@keyframes fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* --- 6. Modals (Popups) --- */
.modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    color: #333;
    margin: auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 700px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slide-down 0.5s ease;
}

.modal-content h2 {
    margin-top: 0;
    color: #dd2476;
}

.modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

.close-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
}

@keyframes slide-down {
    from { top: -100px; opacity: 0; }
    to { top: 0; opacity: 1; }
}

/* Registration Form Styles */
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}
.form-group input {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 5px;
}
.form-submit-btn {
    width: 100%;
    font-size: 1.2rem;
}


/* Footer Policy Links */
.footer-links {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    font-size: 0.9rem;
}

.footer-links a {
    color: #fff;
    margin: 0 10px;
    cursor: pointer;
    text-shadow: 1px 1px 2px var(--shadow-color);
}

.footer-links a:hover {
    text-decoration: underline;
}

/* --- 7. Cookie Banner --- */
.cookie-banner {
    position: fixed;
    bottom: -100%; 
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 20px;
    box-sizing: border-box;
    z-index: 999;
    transition: bottom 0.5s ease-in-out;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.2);
}

.cookie-banner.show {
    bottom: 0;
}

.cookie-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-text {
    flex-basis: 70%;
    min-width: 300px;
    margin-right: 20px;
}
.cookie-text a {
    color: var(--yellow);
    text-decoration: underline;
    cursor: pointer;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
}

.cookie-accept {
    background: var(--yellow);
    color: #333;
}

.cookie-settings-btn {
    background: #555;
    color: white;
}

.cookie-settings {
    display: none;
    background: #333;
    padding: 20px;
    margin-top: 20px;
    border-radius: 5px;
}

.cookie-settings.show {
    display: block;
}

.cookie-settings h3 {
    margin-top: 0;
}

.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

/* Custom 'toggle' switch */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}
.switch input { display: none; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 20px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider { background-color: var(--yellow); }
input:disabled + .slider { background-color: #555; cursor: not-allowed; }
input:checked + .slider:before { transform: translateX(20px); }
input:disabled + .slider:before { background-color: #aaa; }


/* --- 8. Mobile Adaptation --- */
@media (max-width: 900px) {

    .header-logo {
        height: 60px;
        left: 50%;
        transform: translateX(-50%);
        top: 2.5rem;
    }

    .hero {
        min-height: 90vh; 
        height: auto; 
        flex-direction: column;
        text-align: center;
        padding-top: 120px; 
        padding-bottom: 2rem; 
        justify-content: flex-start; 
    }

    .content {
        padding-right: 0;
        margin-bottom: 2rem; 
    }

    .content h1 {
        font-size: 3rem;
    }

    .content p {
        font-size: 1.5rem;
    }
    
    .cta-button {
        font-size: 1.2rem;
    }

    .character {
        flex-basis: auto;
        width: 100%;
    }

    .character-image {
        max-width: 260px; 
        margin: 0 auto;
    }
    
    .footer-links {
        position: relative; 
        z-index: 11;
        bottom: auto; 
        left: auto; 
        transform: none; 
        width: auto; 
        text-align: center;
        padding: 1rem 0 1.5rem 0; 
    }

    .footer-links a {
        margin: 0 15px; 
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    .cookie-buttons {
        margin-top: 20px;
        justify-content: center;
    }
}
