/* ========================================= */
/* --- GENEL STİLLER (Temel Yapı) --- */
/* ========================================= */

* { box-sizing: border-box; }

body {
    background-color: #000;
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    margin: 0; padding: 0;
    width: 100vw; height: 100vh;
    overflow: hidden;
    transition: background-color 0.5s, color 0.5s;
}

#main-wrapper {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw; height: 100vh;
    background-color: var(--bg-color);
    display: flex; flex-direction: column; justify-content: space-between;
    transition: transform 0.5s ease-in-out;
    overflow: hidden;
}

.top-bar {
    flex: 0 0 auto; display: flex; justify-content: space-between; align-items: flex-start;
    padding: 40px; width: 100%; z-index: 100;
}
.header-left { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }
.logo { width: 180px; filter: brightness(0) invert(1); cursor: pointer; }

.game-info-badge {
    background: var(--brand-blue); color: white;
    padding: 8px 20px; border-radius: 8px;
    font-family: 'Oswald'; font-size: 1.4rem; letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: none; border: 1px solid rgba(255,255,255,0.2);
}

.header-titles { text-align: right; }
.main-title { font-family: 'Oswald'; font-size: 3rem; letter-spacing: 2px; text-transform: uppercase; line-height: 1; text-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.sub-title { font-family: 'Montserrat'; font-weight: 800; font-size: 1.8rem; color: var(--brand-red); text-transform: uppercase; margin-top: 5px; line-height: 1.2; display: none; }

.content-area {
    flex: 1; display: flex; align-items: center; justify-content: center;
    width: 100%; position: relative; padding: 20px;
}

.screen { display: none; width: 100%; height:100%; text-align: center; animation: fadeIn 0.5s; }
.active-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; }

.lb-layout { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; gap: 40px; }
.lb-podium-side { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; padding-bottom: 40px; }

.lb-list-side {
    flex: 1; height: 80%;
    background: var(--card-bg);
    border-radius: 20px; padding: 20px;
    overflow: hidden; position: relative; 
    border: 2px solid var(--card-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.marquee-content { position: absolute; width: 90%; left: 5%; animation: scrollUp 20s linear infinite; }

.list-item { 
    display: flex; justify-content: space-between; padding: 15px 20px; 
    border-bottom: 1px solid var(--card-border); 
    font-size: 1.8rem; font-weight: 500;
    background: rgba(0,0,0,0.05); margin-bottom: 10px; border-radius: 10px;
    color: var(--text-main);
}
@keyframes scrollUp { 0% { transform: translateY(100%); } 100% { transform: translateY(-150%); } }

.podium-wrapper { display: flex; align-items: flex-end; justify-content: center; gap: 20px; height: 500px; width: 100%; }
.podium-col { display: flex; flex-direction: column; align-items: center; width: 30%; position: relative; }
.p-bar { width: 100%; border-radius: 20px 20px 0 0; display: flex; justify-content: center; align-items: flex-end; padding-bottom: 20px; color: #fff; font-family: 'Oswald'; font-size: 3rem; box-shadow: 0 10px 30px rgba(0,0,0,0.3); position: relative; }
.p-1 .p-bar { height: 400px; background: linear-gradient(to bottom, #ffd700, #f39c12); z-index: 3; border: 4px solid white; }
.p-2 .p-bar { height: 280px; background: linear-gradient(to bottom, #bdc3c7, #7f8c8d); z-index: 2; }
.p-3 .p-bar { height: 180px; background: linear-gradient(to bottom, #cd7f32, #d35400); z-index: 1; }
.p-name { font-size: 1.8rem; font-weight: bold; margin-bottom: 15px; text-align: center; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-avatar { width: 90px; height: 90px; background: #fff; border-radius: 50%; display:flex; align-items:center; justify-content:center; color:#333; font-weight:bold; font-size:3rem; margin-bottom: -45px; z-index: 10; border: 6px solid; position: relative; }
.p-1 .p-avatar { border-color: #ffd700; } .p-2 .p-avatar { border-color: #bdc3c7; } .p-3 .p-avatar { border-color: #cd7f32; }

.pairing-box { 
    background: var(--card-bg); padding: 40px; border-radius: 30px; 
    box-shadow: 0 0 50px rgba(0,0,0,0.2); border: 2px solid var(--card-border);
    display: inline-block; 
}

.qr-box { 
    background: white; padding: 20px; border-radius: 20px; 
    box-shadow: 0 0 80px rgba(16, 52, 166, 0.5); 
    margin-bottom: 30px; display: inline-block; 
}
.qr-img { width: 350px; height: 350px; display: block; }

.join-text { font-size: 4.5rem; font-family: 'Oswald'; margin-bottom: 10px; line-height: 1; }
.join-sub { font-size: 1.8rem; opacity: 0.8; margin-bottom: 20px; }
.countdown-big { font-size: 7rem; font-family: 'Oswald'; color: var(--brand-red); text-shadow: 0 0 30px rgba(234, 33, 88, 0.4); line-height: 1; }

.question-container { width: 90%; max-width: 1400px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.q-image-wrapper { max-height: 35vh; margin-bottom: 20px; border-radius: 20px; overflow: hidden; box-shadow: 0 15px 40px rgba(0,0,0,0.4); display: none; margin-left:auto; margin-right:auto; }
.q-image-wrapper img { height: 100%; object-fit: contain; max-width: 100%; }
.q-text { font-size: 3rem; font-weight: 700; line-height: 1.3; margin-bottom: 40px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }

.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; width: 100%; }
.opt-card { 
    background: var(--card-bg); border: 2px solid var(--card-border); 
    padding: 25px; border-radius: 15px; font-size: 2rem; font-weight: 600; 
    display: flex; align-items: center; gap: 20px; transition: 0.3s;
}
.opt-letter { background: var(--brand-blue); color: white; width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: 'Oswald'; font-size: 2rem; flex-shrink: 0; }
.opt-A .opt-letter { background: #e74c3c; } .opt-B .opt-letter { background: #3498db; } .opt-C .opt-letter { background: #f1c40f; color: black; } .opt-D .opt-letter { background: #2ecc71; }
.opt-card.correct { background: #27ae60; color: white; border-color: #fff; transform: scale(1.02); box-shadow: 0 0 30px rgba(39, 174, 96, 0.6); }
.opt-card.dim { opacity: 0.3; }
.hidden-q-msg { font-size: 5rem; font-family: 'Oswald'; color: var(--brand-red); animation: pulse 2s infinite; }

.timer-bar { 
    position: absolute; bottom: 0; left: 0; height: 35px; 
    background: var(--timer-bg); width: 100%; 
    transition: width 1s linear, background-color 0.5s; 
    z-index: 999; 
    display: flex; align-items: center; padding-left: 20px;
}
.timer-text-inside {
    color: white; font-family: 'Oswald'; font-size: 1.5rem; font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.next-q-counter {
    font-size: 1.5rem; color: #aaa; margin-top: 20px; font-family: 'Montserrat';
    animation: fadeIn 0.5s;
}

.break-timer { font-size: 10rem; font-family: 'Oswald'; color: var(--text-main); line-height: 1; }
.break-title { font-size: 4rem; color: var(--brand-blue); font-weight: bold; margin-bottom: 20px; }
.break-img { max-height: 40vh; border-radius: 20px; margin-bottom: 20px; box-shadow: 0 15px 40px rgba(0,0,0,0.6); margin: 0 auto 20px auto; display: block; }

.no-game-box { 
    background: var(--card-bg); border: 4px solid var(--brand-blue); 
    border-radius: 30px; padding: 40px; 
    display: none; animation: pulse 3s infinite; margin-top: 60px;
}

.footer { flex: 0 0 auto; display: flex; justify-content: flex-end; padding: 20px 40px; width: 100%; }
.branch-name-footer { font-family: 'Oswald'; font-size: 1rem; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 2px; }
body.palette-light .branch-name-footer { color: rgba(0,0,0,0.3); }

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

/* --- 3. DÖNDÜRME SINIFLARI (ROTATION - FİXED) --- */
body.rotate-portrait #main-wrapper {
    width: 100vh !important;
    height: 100vw !important;
    transform: translate(-50%, -50%) rotate(90deg) !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    overflow: hidden;
}

body.rotate-portrait-reverse #main-wrapper {
    width: 100vh !important;
    height: 100vw !important;
    transform: translate(-50%, -50%) rotate(-90deg) !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    overflow: hidden;
}

body.rotate-landscape-reverse #main-wrapper {
    width: 100vw !important;
    height: 100vh !important;
    transform: translate(-50%, -50%) rotate(180deg) !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    overflow: hidden;
}

body.rotate-portrait .lb-layout, body.rotate-portrait-reverse .lb-layout { flex-direction: column; }
body.rotate-portrait .lb-list-side, body.rotate-portrait-reverse .lb-list-side { width: 90%; height: 40%; }
body.rotate-portrait .podium-wrapper, body.rotate-portrait-reverse .podium-wrapper { height: 350px; }
body.rotate-portrait .options-grid, body.rotate-portrait-reverse .options-grid { grid-template-columns: 1fr; gap: 20px; }
body.rotate-portrait .qr-img, body.rotate-portrait-reverse .qr-img { width: 450px; height: 450px; }