:root {
    --background-color: #EFF6FF;
    --container-bg: #ffffff;
    --text-color: #333;
    --border-color: #ddd;
    --accent-color: #007bff;
    --correct-color: #28a745;
    --incorrect-color: #dc3545;
}
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--background-color);
    margin: 0;
    color: var(--text-color);
}
.main-layout {
    position: relative;
    z-index: 1;
}
.side-column {
    position: relative;
    z-index: 2;
}
.app-container {
    position: relative;
    z-index: 1;
}
.hamburger-menu, .mobile-nav {
    display: none;
}
.main-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    gap: 25px;
}
.side-column {
    background-color: transparent;
    width: 320px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: sticky;
    top: 20px;
    gap: 25px;
    padding-bottom: 150px;
}
.app-container {
    flex-grow: 1;
    width: 100%;
    max-width: 1100px;
    min-height: 100vh;
    box-sizing: border-box;
}
.desktop-menu {
    width: 100%;
    background-color: var(--container-bg);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    padding: 20px;
    box-sizing: border-box;
}
.desktop-menu ul, .mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.desktop-menu li, .mobile-nav li {
    margin-bottom: 2px;
}
.desktop-menu a, .mobile-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background-color 0.2s, color 0.2s, padding-left 0.2s;
    color: #4A5568;
    text-decoration: none;
}
.desktop-menu a:hover, .mobile-nav a:hover {
    background-color: #E2E8F0;
    color: #2D3748;
    padding-left: 25px;
}
.desktop-menu a i, .mobile-nav a i {
    width: 20px;
    text-align: center;
    color: #718096;
    transition: color 0.2s;
}
.desktop-menu a:hover i, .mobile-nav a:hover i {
    color: var(--accent-color);
}
.nav-cta-wrapper {
    padding-top: 15px;
    border-top: 1px solid #E2E8F0;
    margin-top: 15px;
}
.desktop-menu .nav-cta-wrapper {
    padding: 15px;
}
.premium-link-cta {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 15px !important;
    border-radius: 12px;
    text-decoration: none;
    color: white !important;
    font-weight: 600;
    background: linear-gradient(45deg, #6D28D9, #4F46E5);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}
.premium-link-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
    padding-left: 15px !important;
    background: linear-gradient(45deg, #6D28D9, #4F46E5);
}
.premium-link-cta i {
    color: #FBBF24 !important;
}
.screen {
    width: 100%;
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
.lobby-container, .competition-container {
    background-color: var(--container-bg);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    width: 100%;
    box-sizing: border-box;
}
.lobby-container {
    padding: 50px;
    text-align: center;
}
.lobby-container h2 { font-size: 2.2rem; margin-bottom: 15px; }
.lobby-container p { margin-bottom: 25px; }
.quiz-selection-area { width: 100%; text-align: left; }
#quiz-search-input { width: 100%; padding: 12px; font-size: 1rem; border: 1px solid #ccc; border-radius: 8px; margin-bottom: 15px; box-sizing: border-box; }
#quiz-list-container { max-height: 40vh; overflow-y: auto; border: 1px solid #eee; border-radius: 8px; padding: 10px; }
.quiz-list-item { padding: 15px; background-color: #f8f9fa; border-radius: 6px; margin-bottom: 8px; cursor: pointer; transition: background-color 0.2s; font-weight: 600; }
.quiz-list-item:hover { background-color: #e9ecef; }
.quiz-panel { width: 100%; margin: 0 auto; padding: 0; display: flex; flex-direction: column; min-height: 80vh; }
.quiz-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 30px; background-color: #f8f9fa; border-bottom: 1px solid var(--border-color); border-radius: 16px 16px 0 0; z-index: 100; }
.quiz-title { font-size: 1.2rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-grow: 1; }
.solo-score-display { font-size: 1.5rem; font-weight: bold; margin-left: 20px; }
.question-area { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; padding: 30px; overflow-y: auto; }
.question-area h3 { font-size: clamp(1.2rem, 2.2vw, 1.8rem); margin-bottom: 30px; text-align: center; line-height: 1.4; }
.options-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
.option-btn { width: 100%; padding: 15px; font-size: 1rem; border: 1px solid var(--border-color); border-radius: 8px; background-color: var(--container-bg); cursor: pointer; transition: background-color 0.2s, transform 0.1s; text-align: left; }
.option-btn:hover:not(:disabled) { background-color: #f5f5f5; }
.option-btn.correct { background-color: var(--correct-color); color: white; border-color: var(--correct-color); }
.option-btn.incorrect { background-color: var(--incorrect-color); color: white; border-color: var(--incorrect-color); }
.option-btn:disabled { cursor: not-allowed; opacity: 0.7; }
.explanation-area { margin-top: 20px; padding: 15px; background-color: #f8f9fa; border-radius: 8px; border: 1px solid var(--border-color); display: none; }
.next-question-btn { display: none; margin: 20px auto 0; padding: 12px 30px; font-size: 1.1rem; font-weight: bold; color: white; background-color: var(--accent-color); border: none; border-radius: 8px; cursor: pointer; transition: background-color 0.3s ease-in-out; }
.quiz-footer { text-align: center; font-size: 0.9rem; color: #888; padding: 20px; flex-shrink: 0; }
#mobile-ad-container { display: none; }

.ad-break-placeholder {
    margin: 25px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;

    /* YENİ EKLENEN KODLAR */
    min-height: 0; /* Varsayılan yükseklik sıfır */
    height: auto;
    overflow: hidden; /* İçerik yokken tamamen gizli olsun */
    transition: min-height 0.4s ease-in-out; /* Yükseklik değişimini yumuşatır */
}

/* JavaScript bu class'ı eklediğinde alan büyüyecek */
.ad-break-placeholder.ad-filled {
    min-height: 250px; /* Ezoic 300x250 reklamları için uygun yükseklik */
}

.sidebar-widget { width: 100%; background-color: var(--container-bg); border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,0.08); padding: 25px; box-sizing: border-box; }
.sidebar-widget h4 { margin-top: 0; margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 15px; font-size: 1.1rem; color: var(--text-color); }
.sidebar-widget ul { list-style: none; padding: 0; margin: 0; }
.sidebar-widget ul li a { display: block; padding: 12px 5px; color: #555; text-decoration: none; font-weight: 500; border-bottom: 1px solid #f5f5f5; transition: color 0.2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-widget ul li a:hover { color: var(--accent-color); }
.sidebar-widget ul li:last-child a { border-bottom: none; }
.sticky-ad-container { position: sticky; bottom: 20px; width: 100%; margin-top: 25px; min-height: 250px; display: flex; align-items: center; justify-content: center; background-color: rgba(0, 0, 0, 0.03); border: 2px dashed #d0d8e0; border-radius: 12px; box-sizing: border-box; }


@media (max-width: 1200px) {
    .right-column { display: none; }
}
@media (max-width: 992px) {
    .hamburger-menu { display: block; position: fixed; top: 15px; left: 15px; z-index: 1001; background: var(--accent-color); border: none; padding: 10px; border-radius: 8px; cursor: pointer; }
    .hamburger-line { display: block; width: 25px; height: 3px; background-color: white; margin: 5px 0; transition: transform 0.3s, opacity 0.3s; }
    .hamburger-menu.active .hamburger-line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger-menu.active .hamburger-line:nth-child(2) { opacity: 0; }
    .hamburger-menu.active .hamburger-line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    .mobile-nav { display: block; position: fixed; top: 0; left: -300px; width: 280px; height: 100%; background-color: var(--container-bg); box-shadow: 4px 0 15px rgba(0,0,0,0.1); z-index: 1000; transition: left 0.3s ease-in-out; padding: 20px; box-sizing: border-box; }
    .mobile-nav.open { left: 0; }
    .mobile-nav .nav-cta-wrapper { padding: 15px 10px; }
    .side-column { display: none; }
    .main-layout { padding: 0; gap: 0; }
    .app-container { max-width: 100%; padding-top: 70px; padding-bottom: 60px; }
    .lobby-container, .competition-container { border-radius: 0; box-shadow: none; padding: 20px; }
    .quiz-header { position: fixed; top: 0; left: 0; width: 100%; border-radius: 0; }
    #mobile-ad-container { display: flex; position: fixed; bottom: 0; left: 0; width: 100%; height: 60px; background-color: #e9ecef; border-top: 1px solid var(--border-color); z-index: 1000; justify-content: center; align-items: center; }
    .screen { min-height: auto; }
    .question-area { padding: 20px 15px 80px 15px; }
}
.typewriter-container { padding: 15px; margin: 15px 0; background-color: #f8f9fa; border-radius: 8px; border-left: 4px solid var(--accent-color); min-height: 90px; }
#typewriter-text { font-family: 'Courier New', Courier, monospace; font-size: 1.1rem; font-weight: 600; color: #333; overflow: hidden; white-space: pre-wrap; margin: 0 auto; letter-spacing: .05em; }
#typewriter-text.typing-effect { border-right: .15em solid orange; width: 0; animation: typing 5.5s steps(120, end) forwards, blink-caret .75s step-end infinite; }
@keyframes typing { from { width: 0 } to { width: 100% } }
@keyframes blink-caret { from, to { border-color: transparent } 50% { border-color: orange; } }
#typewriter-text.typing-effect.finished { border-right: none; }


/* --- REKLAM MOLASI ANİMASYON GÜNCELLEMELERİ --- */

/* Yeni metin uzunluğuna göre animasyon süresi güncellendi */
#typewriter-text.typing-effect {
    border-right: .15em solid orange;
    width: 0;
    /* Metin kısaldığı için süre 4.5 saniyeye çekildi */
    animation: 
        typing 4.5s steps(100, end) forwards,
        blink-caret .75s step-end infinite;
}

/* Animasyon sonrası belirecek Premium linki için stil */
#premium-link-ad-break {
    margin: 20px auto; /* Otomatik olarak ortalar */
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    text-decoration: none;
    max-width: 250px; /* Butonun çok geniş olmasını engeller */
}

/* JavaScript ile eklenecek olan görünürlük class'ı */
#premium-link-ad-break.visible {
    display: inline-flex !important;
    opacity: 1;
}
/* --- PASİF DEVAM ET BUTONU STİLİ --- */
.next-question-btn:disabled {
    background-color: #e9ecef; /* Pasif, gri renk */
    color: #adb5bd; /* Pasif metin rengi */
    cursor: not-allowed; /* "Tıklanamaz" imleci */
    box-shadow: none;
}
