/* --- Genel Stiller ve Resetleme --- */
:root {
    --gold-dark: #B8860B;
    --gold-mid: #D4AF37;
    --gold-light: #FFD700;
    --green-dark: #006400; /* Koyu Yeşil */
    --white: #FFFFFF;
    --text-light: #F5F5F5;
    --text-dark: #1A1A1A;
}

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

/* YENİ DEĞİŞİKLİK: Dikey kaydırmayı engellemek ve yerleşimi iyileştirmek için güncellendi. */
body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-light);
    text-align: center;
    overflow: hidden; /* Dikey kaydırmayı engeller */
    height: 100vh; /* Sayfa yüksekliğini ekranla sınırlar */
    padding: 10px;
    background-image: url('backg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* YENİ DEĞİŞİKLİK: Elementlerin dikeyde daha iyi dağılması için güncellendi. */
.main-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Elementleri dikeyde ortalar */
    height: 100%;
}

/* --- Başlık Alanı --- */
.intro-section {
    width: 100%;
    /* YENİ DEĞİŞİKLİK: Dikey boşluk azaltıldı */
    padding: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.intro-section h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem; 
    color: var(--gold-light);
    margin-bottom: 10px;
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.8);
}

.intro-section p {
    font-size: 1rem; 
    color: var(--text-light);
    line-height: 1.5;
    max-width: 90%;
    margin: 0 auto;
    background-color: rgba(0, 0, 0, 0.75); 
    padding: 15px;
    border-radius: 15px; 
    border: 1px solid var(--gold-mid); 
    text-shadow: none; 
}

/* --- Çark ve İbre Stilleri --- */
.wheel-wrapper {
    position: relative;
    /* YENİ DEĞİŞİKLİK: Yer kazanmak için boyutlar ayarlandı. */
    width: 75vw;
    max-width: 380px;
    height: 75vw;
    max-height: 380px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
    order: 1;
}

#wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: gold-glow 2.5s infinite alternate ease-in-out;
    border: 12px solid transparent;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1)),
        radial-gradient(circle at top left, var(--gold-light), var(--gold-dark));
    background-origin: border-box;
    background-clip: content-box, border-box;
}

@keyframes gold-glow {
    from {
        box-shadow: 
            inset 0 0 15px rgba(0,0,0,0.6),
            0 0 25px rgba(0,0,0,0.7),
            0 0 10px var(--gold-dark),
            0 0 20px var(--gold-mid),
            0 0 30px var(--gold-light);
    }
    to {
        box-shadow: 
            inset 0 0 15px rgba(0,0,0,0.6),
            0 0 30px rgba(0,0,0,0.8),
            0 0 20px var(--gold-dark),
            0 0 35px var(--gold-mid),
            0 0 50px var(--gold-light);
    }
}


.wheel-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 50px solid var(--gold-light);
    z-index: 10;
    filter: drop-shadow(0px 5px 5px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}
.wheel-pointer::after {
    content: '';
    position: absolute;
    top: 12px;
    left: -15px;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, var(--gold-light), var(--gold-dark));
    border-radius: 50%;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.5);
}

.wheel-center-pin {
    position: absolute;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, #fff, #ccc);
    border-radius: 50%;
    z-index: 11;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    border: 3px solid var(--gold-dark);
}

/* --- Buton ve Sonuç Stilleri --- */
#spin {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    padding: 15px 40px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    background: linear-gradient(145deg, var(--gold-light), var(--gold-mid));
    color: var(--text-dark);
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), inset 0 -4px 0 var(--gold-dark);
    transition: all 0.2s ease-out;
    order: 3;
}

#spin:hover {
    background: linear-gradient(145deg, #ffdf33, #d4af37);
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.4), inset 0 -4px 0 var(--gold-dark);
}

#spin:active {
    transform: translateY(2px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), inset 0 -2px 0 var(--gold-dark);
}

#spin:disabled {
    cursor: not-allowed;
    background: #555;
    color: #999;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), inset 0 -4px 0 #333;
}

#result {
    font-size: 1.2rem;
    color: var(--gold-light);
    font-weight: 500;
    min-height: 30px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    order: 2; 
    margin-top: 15px; 
    margin-bottom: 15px; 
    padding: 5px;
}

/* --- Popup Stilleri --- */
#overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 999;
}

#popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
    color: var(--text-light);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 0 30px var(--gold-mid), 0 0 60px var(--gold-dark);
    z-index: 1000;
    text-align: center;
    width: 90%;
    max-width: 450px;
    border: 2px solid var(--gold-mid);
}

#popup-message {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: var(--gold-light);
    line-height: 1.4;
}

#popup-claim {
    font-family: 'Poppins', sans-serif;
    background: var(--gold-light);
    color: var(--text-dark);
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 10px;
    font-weight: bold;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.3);
}

#popup-claim:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(255, 215, 0, 0.5);
}

/* --- Konfeti Animasyonu --- */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: var(--gold-light);
    animation: fall 3s linear forwards;
    opacity: 0.9;
    z-index: 9999;
    top: 0;
    border-radius: 50%;
}

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

/* --- Mobil Uyum (Responsive) --- */
@media (max-width: 600px) {
    .intro-section h2 {
        font-size: 1.5rem;
    }
    .intro-section p {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    .wheel-wrapper {
        max-width: 280px;
        max-height: 280px;
    }
    .wheel-pointer {
        border-left-width: 20px;
        border-right-width: 20px;
        border-bottom-width: 40px;
    }
    .wheel-pointer::after {
        left: -12px;
        width: 24px;
        height: 24px;
        top: 10px;
    }
    #spin {
        font-size: 1rem;
        padding: 10px 30px;
    }
    #result {
        font-size: 1rem;
    }
    #popup {
        padding: 30px;
    }
    #popup-message {
        font-size: 1.2rem;
    }
}
