* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Sniglet', 'Baloo 2', 'Open Sans', system-ui, -apple-system, sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: linear-gradient(45deg, #6a11cb, #2575fc);
    min-height: 100vh;
    overflow-x: hidden;
    color: #2c3e50;
}

.floating-clouds {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        url('https://cdn-icons-png.flaticon.com/512/414/414927.png') repeat-x 0 20px,
        url('https://cdn-icons-png.flaticon.com/512/414/414927.png') repeat-x 100px 160px;
    background-size: 100px auto;
    animation: floatClouds 20s linear infinite;
    opacity: 0.2;
    pointer-events: none;
}

@keyframes floatClouds {
    from { background-position: 0 20px, 100px 160px; }
    to { background-position: 1000px 20px, 1100px 160px; }
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.sun {
    position: absolute;
    top: -20px;
    right: 50px;
    font-size: 5em;
    animation: rotateSun 20s linear infinite;
}

@keyframes rotateSun {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.wizard {
    width: 120px;
    height: 120px;
    animation: floatWizard 3s ease-in-out infinite;
}

@keyframes floatWizard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

h1 {
    color: #fff;
    font-size: 3.5em;
    text-shadow: 3px 3px 0 #9b59b6,
                 6px 6px 0 rgba(0,0,0,0.2);
    margin: 20px 0;
}

.wizard-speech {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 15px;
    margin: 20px auto;
    max-width: 500px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.wizard-speech:after {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    border: 15px solid transparent;
    border-bottom-color: rgba(255, 255, 255, 0.95);
    transform: translateX(-50%);
}

.magic-scroll {
    background: url('https://cdn-icons-png.flaticon.com/512/5776/5776762.png') no-repeat center;
    background-size: 100% 100%;
    padding: 40px;
    margin: 20px auto;
    max-width: 700px;
    position: relative;
}

.scroll-content {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
}

.hint-box {
    margin: 20px 0;
    padding: 15px;
    border-radius: 15px;
    background: rgba(155, 89, 182, 0.1);
}

.hidden {
    display: none;
}

#hint-text {
    color: #8e44ad;
    font-style: italic;
    margin-top: 10px;
}

.input-area {
    text-align: center;
    margin: 30px 0;
}

#answer-input {
    width: 80%;
    padding: 15px 25px;
    font-size: 1.3em;
    border: 3px solid #9b59b6;
    border-radius: 25px;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.9);
    transition: all 0.3s ease;
}

#answer-input:focus {
    outline: none;
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(155,89,182,0.3);
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.magic-button {
    padding: 15px 30px;
    font-size: 1.2em;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.magic-button.rainbow {
    background: linear-gradient(45deg, #ff6b6b, #feca57, #1dd1a1);
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}

.magic-button.stardust {
    background: linear-gradient(45deg, #9b59b6, #3498db, #2ecc71);
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.magic-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.stats-container {
    text-align: center;
    margin: 30px 0;
}

.stats-box {
    display: inline-flex;
    gap: 30px;
    background: rgba(255,255,255,0.9);
    padding: 15px 30px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.trophy, .hint-icon {
    width: 40px;
    height: 40px;
    animation: bounce 2s infinite;
}

.magical-creatures {
    display: flex;
    justify-content: space-around;
    margin-top: 40px;
}

.creature {
    width: 80px;
    height: 80px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

@media (max-width: 600px) {
    h1 { font-size: 2em; }
    .button-group { flex-direction: column; }
    .magical-creatures { display: none; }
    .sun { display: none; }
    .wizard-text, 
    .leader-item, 
    #riddle-text, 
    #hint-text,
    .stats-box {
        font-size: 1em;
    }

    input, button, .magic-input, .magic-button {
        font-size: 0.95em;
    }
}

.magic-input {
    width: 80%;
    padding: 15px 25px;
    font-size: 1.3em;
    border: 3px solid #9b59b6;
    border-radius: 25px;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.9);
    transition: all 0.3s ease;
}

.magic-input:focus {
    outline: none;
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(155,89,182,0.3);
}

.leaderboard {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 250px;
    z-index: 100;
}

.leaderboard-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.leaderboard h3 {
    text-align: center;
    color: #9b59b6;
    margin-bottom: 15px;
}

.leader-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid rgba(155, 89, 182, 0.2);
}

.leader-item:last-child {
    border-bottom: none;
}

.rank {
    width: 30px;
    font-weight: bold;
    color: #9b59b6;
}

.username {
    flex: 1;
    margin: 0 10px;
}

.score {
    font-weight: bold;
    color: #2ecc71;
}

@media (max-width: 1200px) {
    .leaderboard {
        position: static;
        width: 100%;
        max-width: 700px;
        margin: 20px auto;
        transform: none;
    }
}

/* Özel olarak input ve butonlar için font ayarı */
input, button, .magic-input, .magic-button {
    font-family: 'Open Sans', 'Baloo 2', system-ui, -apple-system, sans-serif;
    font-size: 1em;
    letter-spacing: 0.2px;
}

/* Türkçe karakterler için özel ayarlar */
.wizard-text, 
.leader-item, 
#riddle-text, 
#hint-text,
.stats-box {
    font-family: 'Open Sans', 'Baloo 2', system-ui, -apple-system, sans-serif;
    font-size: 1.1em;
    letter-spacing: 0.3px;
    line-height: 1.5;
}

/* Bildirim Stilleri */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 80%;
    text-align: center;
    display: none;
}

.notification.show {
    display: block;
}

.notification-timer {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0 0 15px 15px;
    transition: width 0.1s linear;
}

.notification.success .notification-timer {
    background: rgba(255, 255, 255, 0.7);
}

.notification.error .notification-timer {
    background: rgba(0, 0, 0, 0.2);
}

.notification-content {
    position: relative;
    padding-bottom: 5px;
}

.notification.success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: 2px solid #1e7e34;
}

.notification.error {
    background: linear-gradient(135deg, #ffc107, #ffac33);
    color: #2b2b2b;
    border: 2px solid #d39e00;
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Baloo 2', cursive;
    font-size: 1.1em;
}

.notification-content p {
    margin: 0;
    padding: 0;
}

/* OPTIONS GRID STYLES */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.option-button {
    padding: 15px;
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Baloo 2', cursive;
}

.option-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Responsive ayarlar */
@media (max-width: 600px) {
    .options-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobil cihazlar için uyumluluk */
@media (max-width: 768px) {
    .notification {
        width: 90%;
        font-size: 0.9em;
        padding: 12px 20px;
    }
} 

/* Mevcut stil kodlarınızın sonuna ekleyin */

#listen-button {
    padding: 10px 20px;
    font-size: 1em;
    margin-top: 15px;
}

#mic-button span {
    display: inline-block;
    vertical-align: middle;
}

#recognized-text {
    min-height: 24px; /* Arayüzün kaymasını engeller */
    font-size: 1.2em;
    color: #2c3e50;
    font-weight: bold;
    margin-top: 20px;
}

#mic-button:disabled {
    background: linear-gradient(45deg, #7f8c8d, #95a5a6);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========================================= */
/* === YENİ: Özel Bildirim Pop-up Stilleri === */
/* ========================================= */

.hidden {
    display: none !important;
}

#custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

#custom-alert-box {
    background: white;
    padding: 30px 40px;
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    text-align: center;
    width: 90%;
    max-width: 450px;
    border: 5px solid;
    animation: pop-in 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    font-family: 'Baloo 2', cursive;
}

@keyframes pop-in {
    from { transform: scale(0.5) rotate(-15deg); opacity: 0; }
    to { transform: scale(1) rotate(0deg); opacity: 1; }
}

#custom-alert-icon {
    font-size: 4em;
    margin-bottom: 15px;
    animation: icon-bounce 1.5s ease-in-out infinite;
}

@keyframes icon-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

#custom-alert-title {
    font-size: 2.2em;
    margin-bottom: 10px;
    font-family: 'Sniglet', cursive;
}

#custom-alert-message {
    font-size: 1.2em;
    line-height: 1.6;
    color: #34495e;
}

#custom-alert-message strong {
    font-weight: 600;
}

/* Başarılı Durumu (Yeşil) */
#custom-alert-box.success {
    border-color: #2ecc71;
    background: linear-gradient(135deg, #f0fff0, #e6fffa);
}
#custom-alert-box.success #custom-alert-title {
    color: #27ae60;
}
#custom-alert-box.success #custom-alert-icon::before {
    content: '🎉';
}

/* Hatalı Durumu (Kırmızı) */
#custom-alert-box.error {
    border-color: #e74c3c;
    background: linear-gradient(135deg, #fff2f2, #ffe8e8);
}
#custom-alert-box.error #custom-alert-title {
    color: #c0392b;
}
#custom-alert-box.error #custom-alert-icon::before {
    content: '😢';
}
#custom-alert-box.error strong {
    color: #c0392b;
}