/* Fırat FM - ortak oynatıcı sayfa ayarı (tüm yüzler fiebradio.js ile çizilir)
   İki görünüm: (1) doğrudan açılınca bg.png arka planı + footer, (2) iframe ile gömülünce (html.embed)
   yalnızca player görünür: arka plan şeffaf, kart iframe'in kenarına kadar uzanır. */
/* Courgette (SIL OFL) - yerel yazı tipi: ziyaretçiden Google Fonts'a istek gitmez */
@font-face { font-family: 'Courgette'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/courgette-latin-400.woff2') format('woff2'); }

html { background: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
    background: #000 url('../img/bg.webp') no-repeat center center;
    -webkit-background-size: cover; background-size: cover;
    -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none;
    -webkit-user-select: none; -moz-user-select: none; user-select: none;
    touch-action: manipulation;
}
#fiebradio { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }

/* Footer (yalnızca sayfa doğrudan açılınca görünür) */
.alt {
    position: absolute; left: 0; right: 0; bottom: 0; height: 32px;
    font: 12px/32px Arial, Helvetica, sans-serif; text-align: center; color: rgba(255,255,255,.82);
    text-shadow: 0 1px 3px #000;
}
.alt a { color: #FFD700; text-decoration: none; }

/* ---------- Ortak: camsı (buzlu) kart + kartın içinde hareketli ışıklar ---------- */
.aurora { position: absolute; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden; pointer-events: none; }
.aurora i {
    position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
    -webkit-filter: blur(70px); filter: blur(70px); opacity: .5;
    -webkit-animation: isik 16s ease-in-out infinite alternate; animation: isik 16s ease-in-out infinite alternate;
}
.aurora i:nth-child(1) { background: var(--c1); left: -18vmax; top: -24vmax; }
.aurora i:nth-child(2) { background: var(--c2); right: -22vmax; top: 8vmax; -webkit-animation-delay: -5s; animation-delay: -5s; }
.aurora i:nth-child(3) { background: var(--c3); left: 18vw; bottom: -34vmax; -webkit-animation-delay: -10s; animation-delay: -10s; }
@-webkit-keyframes isik { to { -webkit-transform: translate(8vmax, 6vmax) scale(1.15); transform: translate(8vmax, 6vmax) scale(1.15); } }
@keyframes isik { to { -webkit-transform: translate(8vmax, 6vmax) scale(1.15); transform: translate(8vmax, 6vmax) scale(1.15); } }

.glass {
    position: relative; overflow: hidden;
    -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
    background: rgba(14, 18, 36, .58);                       /* buzlu cam desteklenmeyen cihazlar için */
    border: 1px solid rgba(255,255,255,.22);
    box-shadow: 0 20px 60px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.28);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .glass {
        background: rgba(255,255,255,.07);
        -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
    }
}

/* ---------- Player 1 ve 2: oval cam çubuk, sayfanın ortasında ---------- */
/* Yükseklik oynatıcı tarafından genişliğe göre otomatik belirlenir (80/60/40 px) */
body.bar { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-box-align: center; -webkit-align-items: center; align-items: center; -webkit-box-pack: center; -webkit-justify-content: center; justify-content: center; padding-bottom: 32px; -webkit-box-sizing: border-box; box-sizing: border-box; }
body.bar .glass { width: calc(100% - 16px); border-radius: 999px; }
body.bar #fiebradio { position: relative; top: auto; right: auto; bottom: auto; left: auto; width: 100%; height: auto; }
body.p1 .glass { max-width: 1400px; }

/* ---------- Player 3, 4, 5: cam kartlar ---------- */
body.kart .glass {
    position: absolute; top: calc(50% - 16px); left: 50%;
    -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);
    width: calc(100% - 24px); height: calc(100% - 56px);
}
body.p2 .glass { width: calc(100vmin - 56px); height: calc(100vmin - 56px); max-width: 480px; max-height: 480px; border-radius: 38px; }
body.p3 .glass { max-width: 760px; max-height: 640px; border-radius: 26px; }
body.p3 #fiebradio { overflow: visible !important; }
body.p3 #kutu { position: absolute; left: 12px; right: 12px; top: 12px; bottom: 12px; }
@media (min-width: 700px) {
    body.p3 .glass { max-height: 306px; }
    body.p3 #kutu { left: 300px; right: 18px; -webkit-transform: translateY(-50px); transform: translateY(-50px); }
}
/* Dar ekran (telefon dikey): kart yüksekliği genişliğe orantılı, yazılar taşmaz */
@media (max-width: 571px) {
    body.p3 .glass { max-height: calc((100vw - 24px) * 1.12); }
}
@media (max-height: 420px) {
    body.p3 .glass { max-height: none; }
}

/* ---------- GÖMÜLÜ GÖRÜNÜM (iframe): yalnızca player, iframe kenarları = player kenarları ---------- */
html.embed body { background: transparent; }
html.embed .alt { display: none; }
html.embed .glass {
    -webkit-backdrop-filter: none; backdrop-filter: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.28);          /* dış gölge iframe kenarında kesileceği için yok */
}
/* Arka plan şeffaf olduğundan, kartın içine bg.png'nin buzlu hâli çizilir (yazılar her sitede okunur) */
html.embed .glass::before {
    content: ""; position: absolute; top: -24px; right: -24px; bottom: -24px; left: -24px;
    background: #0b1020 url('../img/bg.webp') no-repeat center center;
    -webkit-background-size: cover; background-size: cover;
    -webkit-filter: blur(18px) saturate(140%); filter: blur(18px) saturate(140%);
}
html.embed body.bar { padding-bottom: 0; }
html.embed body.bar .glass { width: 100%; }
html.embed body.kart .glass { top: 50%; width: 100%; height: 100%; }
html.embed body.p2 .glass { width: 100vmin; height: 100vmin; }
@media (max-width: 571px) {
    html.embed body.p3 .glass { max-height: calc(100vw * 1.12); }
}

/* ---------- Smart TV: büyük ekranda büyüt, ağır efektleri kapat ---------- */
html.tv body.p2 .glass { max-width: 70vmin; max-height: 70vmin; }
html.tv .aurora i { -webkit-animation: none; animation: none; -webkit-filter: none; filter: none; opacity: .4; }
html.tv .glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(12, 16, 32, .62); }
html.tv .glass::before { -webkit-filter: none; filter: none; }
@media (min-width: 1700px) {
    html.tv body.bar { zoom: 1.35; }
    html.tv body.p3 .glass { -webkit-transform: translate(-50%, -50%) scale(1.35); transform: translate(-50%, -50%) scale(1.35); }
}
@media (min-width: 3000px) {
    html.tv body.bar { zoom: 2.5; }
    html.tv body.p3 .glass { -webkit-transform: translate(-50%, -50%) scale(2.5); transform: translate(-50%, -50%) scale(2.5); }
}

/* ---------- Hareket azaltma tercihi ---------- */
@media (prefers-reduced-motion: reduce) {
    .aurora i { -webkit-animation: none; animation: none; }
}
