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

body {
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    background-color: #111827; /* Fallback */
}

#background-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    transition: background-image 2s ease-in-out, background 2s ease-in-out;
    /* To ensure readability over any background image */
    filter: brightness(0.85); 
}

.screen-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    padding: 6vh 6vw; /* Keeps it safe from TV bezels */
}

.glass-panel {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 32px;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.7);
}

.content-box {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 60px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.6); /* Enhances readability */
}

.header {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fbbf24; /* Amber color for topic */
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 3px;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 1.5rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 1px;
    text-transform: none;
}

#mesaj-container {
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 15px;
    border-radius: 12px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px; /* Space between spinner and text */
}

#mesaj-text {
    min-width: 45px;
    text-align: center;
}

.progress-ring-container {
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: rotate(-90deg); /* Start from the top (12 o'clock) */
}

.progress-ring__circle {
    transition: stroke-dashoffset 1s linear; /* Smooth fill matching the seconds */
    stroke-linecap: round;
}

.main-content-wrapper {
    flex-grow: 1;
    width: 100%;
    height: 0; /* Critical for TextFit to calculate boundaries correctly inside a flex container */
    display: flex;
    justify-content: center;
    align-items: center;
}

#icerik {
    width: 100%;
    height: 100%;
    text-align: center;
    font-weight: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1.3;
}

/* Ensure TextFit generated spans are centered */
.textFitted {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer {
    margin-top: 30px;
    text-align: right;
    font-size: 2rem;
    font-weight: 300;
    font-style: italic;
    opacity: 0.85;
    flex-shrink: 0;
}

/* Kurulum ayar düğmesi (Faz 2A) — dikkat dağıtmaması için köşede, düşük
   opaklıkta; sadece kurulumu yapan kişinin fark edip tıklayabileceği kadar
   görünür. */
#settings-gear {
    position: fixed;
    bottom: 14px;
    left: 14px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.35);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.3s ease, color 0.3s ease, background 0.3s ease;
}

#settings-gear:hover,
#settings-gear:focus {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.15);
}

#settings-panel {
    position: fixed;
    bottom: 58px;
    left: 14px;
    z-index: 11;
    padding: 24px;
    display: none;
    flex-direction: column;
    gap: 12px;
    width: 220px;
    /* .glass-panel'in yarı saydam arka planı (0.45 + blur) altındaki içerik
       metnini tam gizlemiyor (reviewer bulgusu) — panel açıkken hiçbir metin
       yarım/şeffaf görünmesin diye neredeyse opak bir arka plan ile geçersiz
       kılınıyor. */
    background: rgba(10, 15, 26, 0.97);
}

#settings-panel.visible {
    display: flex;
}

#settings-panel label {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

#settings-panel input {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

#settings-panel button {
    margin-top: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    padding: 10px;
    border-radius: 8px;
    border: none;
    background: #fbbf24;
    color: #111827;
    cursor: pointer;
}

#settings-panel button:hover {
    background: #f5c451;
}
