/* ===== SESLI KILAVUZ - STYLE.CSS ===== */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Exo+2:wght@300;400;600&display=swap');

:root {
    --bg:        #060b14;
    --bg2:       #0c1526;
    --accent:    #00e5ff;
    --accent2:   #ff6b35;
    --accent3:   #a855f7;
    --text:      #e2eaf8;
    --text-muted:#7a92b8;
    --card-bg:   rgba(15,28,56,0.85);
    --border:    rgba(0,229,255,0.18);
    --font-head: 'Orbitron', sans-serif;
    --font-body: 'Exo 2', sans-serif;
    --radius:    16px;
    --glow:      0 0 30px rgba(0,229,255,0.25);
}

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

html {
    font-size: 18px;
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    min-height: 100vh;
    min-height: 100dvh; /* iOS Safari için dinamik viewport */
    overflow-x: hidden;
    position: relative;
    -webkit-tap-highlight-color: transparent; /* mobilde mavi flash kalkıyor */
    touch-action: manipulation; /* çift tıkla zoom engeli */
}

/* ---- Accessibility ---- */
.skip-link {
    position: absolute;
    top: -999px; left: -999px;
    background: var(--accent);
    color: #000;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    z-index: 9999;
    transition: top .2s;
}
.skip-link:focus { top: 16px; left: 16px; }

/* Focus styles for keyboard nav */
a:focus, button:focus {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
    border-radius: 8px;
}

/* ---- Background orbs ---- */
.bg-orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .35;
    animation: drift 18s ease-in-out infinite alternate;
}
.orb1 { width: 520px; height: 520px; background: radial-gradient(circle, #0040ff 0%, transparent 70%); top: -100px; left: -150px; animation-duration: 20s; }
.orb2 { width: 400px; height: 400px; background: radial-gradient(circle, #00e5ff 0%, transparent 70%); bottom: 0; right: -100px; animation-duration: 15s; animation-delay: -5s; }
.orb3 { width: 300px; height: 300px; background: radial-gradient(circle, #a855f7 0%, transparent 70%); top: 40%; left: 50%; transform: translate(-50%,-50%); animation-duration: 25s; animation-delay: -10s; }

@keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(40px, 30px) scale(1.1); }
}

/* CRT scanlines */
.scanlines {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0,0,0,.08) 3px,
        rgba(0,0,0,.08) 4px
    );
    pointer-events: none;
    z-index: 1;
}

/* ---- Layout ---- */
.container {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px 60px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* ---- Header ---- */
.site-header { display: flex; justify-content: center; }
.logo-wrap {
    display: flex;
    align-items: center;
    gap: 18px;
}
.logo-icon svg {
    width: 60px; height: 60px;
    filter: drop-shadow(0 0 12px var(--accent));
}
.logo-title {
    font-family: var(--font-head);
    font-size: 1.9rem;
    font-weight: 900;
    letter-spacing: .12em;
    color: var(--accent);
    text-shadow: 0 0 20px rgba(0,229,255,.6);
}
.logo-sub {
    font-size: .85rem;
    color: var(--text-muted);
    letter-spacing: .08em;
    margin-top: 2px;
}

/* ---- Welcome Card ---- */
.welcome-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 36px;
    text-align: center;
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow: var(--glow), inset 0 1px 0 rgba(255,255,255,.06);
}
.welcome-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(0,229,255,.1) 0%, transparent 70%);
    pointer-events: none;
}
.welcome-inner { position: relative; z-index: 1; }

.pulse-ring {
    width: 72px; height: 72px;
    border-radius: 50%;
    border: 2px solid rgba(0,229,255,.4);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    animation: ring-pulse 2.5s ease-in-out infinite;
}
.pulse-dot {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 18px var(--accent);
    animation: dot-pulse 2.5s ease-in-out infinite;
}
@keyframes ring-pulse {
    0%,100% { transform: scale(1); border-color: rgba(0,229,255,.4); }
    50% { transform: scale(1.12); border-color: rgba(0,229,255,.9); }
}
@keyframes dot-pulse {
    0%,100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.welcome-title {
    font-family: var(--font-head);
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 12px;
    text-shadow: 0 0 14px rgba(0,229,255,.5);
}
.welcome-desc {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
}
.welcome-desc strong { color: var(--accent2); }

/* ---- Listening Panel ---- */
.listen-panel {
    background: var(--card-bg);
    border: 1px solid rgba(0,229,255,.35);
    border-radius: var(--radius);
    padding: 30px 24px;
    text-align: center;
    backdrop-filter: blur(20px);
    animation: fadeIn .4s ease;
}
.listen-panel[hidden] { display: none; }

@keyframes fadeIn { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: none; } }

/* Wave bars */
.wave-bars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 60px;
    margin-bottom: 16px;
}
.bar {
    width: 6px;
    border-radius: 4px;
    background: linear-gradient(to top, var(--accent), var(--accent3));
    box-shadow: 0 0 8px var(--accent);
    animation: wave 1.2s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.075s);
    height: 8px;
}
@keyframes wave {
    0%,100% { height: 8px; opacity: .5; }
    50% { height: 52px; opacity: 1; }
}
.listen-panel.idle .bar { animation-play-state: paused; height: 8px !important; }

.listen-label {
    font-family: var(--font-head);
    font-size: 1.1rem;
    color: var(--accent);
    letter-spacing: .1em;
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(0,229,255,.5);
}
.listen-hint {
    font-size: .85rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}
.cmd {
    display: inline-block;
    background: rgba(0,229,255,.1);
    border: 1px solid rgba(0,229,255,.3);
    color: var(--accent);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .05em;
}
.transcript-box {
    font-family: var(--font-head);
    font-size: 1.5rem;
    color: #fff;
    min-height: 40px;
    text-shadow: 0 0 20px rgba(255,255,255,.4);
    letter-spacing: .08em;
}

/* ---- Mic Button ---- */
.mic-wrap { display: flex; justify-content: center; }
.mic-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(0,229,255,.15) 0%, rgba(168,85,247,.15) 100%);
    border: 2px solid var(--accent);
    border-radius: 50px;
    padding: 20px 40px;
    cursor: pointer;
    color: var(--accent);
    font-family: var(--font-head);
    font-size: .85rem;
    letter-spacing: .1em;
    transition: all .25s ease;
    box-shadow: 0 0 20px rgba(0,229,255,.2);
    position: relative;
    overflow: hidden;
}
.mic-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(0,229,255,.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity .25s;
}
.mic-btn:hover::before, .mic-btn.active::before { opacity: 1; }
.mic-btn:hover {
    background: linear-gradient(135deg, rgba(0,229,255,.25) 0%, rgba(168,85,247,.25) 100%);
    box-shadow: 0 0 40px rgba(0,229,255,.4);
    transform: scale(1.04);
}
.mic-btn.active {
    border-color: var(--accent2);
    color: var(--accent2);
    box-shadow: 0 0 40px rgba(255,107,53,.4);
    animation: mic-glow 1s ease-in-out infinite alternate;
}
@keyframes mic-glow {
    from { box-shadow: 0 0 20px rgba(255,107,53,.3); }
    to   { box-shadow: 0 0 50px rgba(255,107,53,.7); }
}
.mic-icon { width: 42px; height: 42px; }
.mic-btn-label { font-size: .75rem; }

/* ---- Sports Grid ---- */
.sports-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.sport-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 20px 28px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    overflow: hidden;
    transition: all .3s ease;
    backdrop-filter: blur(20px);
    cursor: pointer;
}
.sport-card:hover, .sport-card:focus {
    transform: translateY(-6px) scale(1.02);
    border-color: rgba(0,229,255,.6);
    box-shadow: 0 16px 50px rgba(0,0,0,.5), 0 0 30px rgba(0,229,255,.2);
}
.sport-card.futbol:hover  { border-color: #4ade80; box-shadow: 0 16px 50px rgba(0,0,0,.5), 0 0 30px rgba(74,222,128,.25); }
.sport-card.basketbol:hover { border-color: var(--accent2); box-shadow: 0 16px 50px rgba(0,0,0,.5), 0 0 30px rgba(255,107,53,.25); }
.sport-card.voleybol:hover { border-color: #facc15; box-shadow: 0 16px 50px rgba(0,0,0,.5), 0 0 30px rgba(250,204,21,.25); }

.card-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(0,229,255,.07) 0%, transparent 70%);
    pointer-events: none;
}

.sport-icon {
    font-size: 3rem;
    margin-bottom: 14px;
    display: block;
    filter: drop-shadow(0 0 12px rgba(255,255,255,.3));
    transition: transform .3s ease;
}
.sport-card:hover .sport-icon { transform: scale(1.2) rotate(-5deg); }

.sport-name {
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .12em;
    color: var(--accent);
    margin-bottom: 8px;
}
.sport-card.futbol  .sport-name { color: #4ade80; }
.sport-card.basketbol .sport-name { color: var(--accent2); }
.sport-card.voleybol  .sport-name { color: #facc15; }

.sport-desc {
    font-size: .8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ---- Footer ---- */
.site-footer {
    text-align: center;
    font-size: .8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 20px;
}

/* ---- Splash Ekranı ---- */
#splash {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .6s ease, visibility .6s ease;
}
#splash.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 40px 24px;
}

/* Halka animasyonu */
.splash-rings {
    position: relative;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}
.sr {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--accent);
    animation: splash-ring 3s ease-out infinite;
}
.sr1 { width: 140px; height: 140px; animation-delay: 0s;    opacity: .15; }
.sr2 { width: 100px; height: 100px; animation-delay: .5s;   opacity: .3;  }
.sr3 { width:  66px; height:  66px; animation-delay: 1s;    opacity: .6;  }

@keyframes splash-ring {
    0%   { transform: scale(.9);  opacity: .6; }
    50%  { transform: scale(1.08); }
    100% { transform: scale(.9);  opacity: .6; }
}

.splash-mic {
    position: relative;
    z-index: 2;
    width: 48px;
    height: 48px;
    color: var(--accent);
    filter: drop-shadow(0 0 14px var(--accent));
    animation: splash-mic-pulse 2s ease-in-out infinite;
}
.splash-mic svg { width: 100%; height: 100%; }

@keyframes splash-mic-pulse {
    0%,100% { transform: scale(1);    filter: drop-shadow(0 0 10px var(--accent)); }
    50%      { transform: scale(1.12); filter: drop-shadow(0 0 24px var(--accent)); }
}

.splash-title {
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: .16em;
    color: var(--accent);
    text-shadow: 0 0 30px rgba(0,229,255,.6);
}
.splash-sub {
    font-size: .9rem;
    color: var(--text-muted);
    letter-spacing: .06em;
    margin-top: -10px;
}

.splash-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(0,229,255,.18), rgba(168,85,247,.18));
    border: 2px solid var(--accent);
    border-radius: 60px;
    padding: 18px 42px;
    color: var(--accent);
    font-family: var(--font-head);
    font-size: 1rem;
    letter-spacing: .1em;
    cursor: pointer;
    transition: all .25s;
    box-shadow: 0 0 30px rgba(0,229,255,.25);
    animation: splash-btn-breathe 2.5s ease-in-out infinite;
}
.splash-btn:hover, .splash-btn:focus {
    background: linear-gradient(135deg, rgba(0,229,255,.3), rgba(168,85,247,.3));
    box-shadow: 0 0 50px rgba(0,229,255,.5);
    transform: scale(1.04);
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}
@keyframes splash-btn-breathe {
    0%,100% { box-shadow: 0 0 20px rgba(0,229,255,.2); }
    50%      { box-shadow: 0 0 50px rgba(0,229,255,.5); }
}

.splash-btn-icon {
    font-size: 1.1rem;
    animation: splash-icon-blink 1.2s ease-in-out infinite;
}
@keyframes splash-icon-blink {
    0%,100% { opacity: 1; }
    50%      { opacity: .3; }
}

.splash-hint {
    font-size: .78rem;
    color: var(--text-muted);
    opacity: .6;
    margin-top: -8px;
}

/* ---- Page Content (for sport pages) ---- */
.page-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    text-decoration: none;
    font-family: var(--font-head);
    font-size: .8rem;
    letter-spacing: .1em;
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: 30px;
    transition: all .25s;
    margin-bottom: 10px;
}
.page-back:hover {
    background: rgba(0,229,255,.1);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(0,229,255,.2);
}

.sport-page-header {
    text-align: center;
    padding: 30px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}
.sport-page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(0,229,255,.1) 0%, transparent 65%);
}
.sport-page-hero {
    font-size: 5rem;
    display: block;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}
.sport-page-title {
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: .14em;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 20px currentColor;
}
.sport-page-sub {
    color: var(--text-muted);
    font-size: .9rem;
    margin-top: 6px;
    position: relative;
    z-index: 1;
}

/* Exercises */
.exercises-section { display: flex; flex-direction: column; gap: 16px; }
.exercise-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 28px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    transition: all .25s;
    backdrop-filter: blur(12px);
}
.exercise-card:hover {
    border-color: rgba(0,229,255,.4);
    box-shadow: var(--glow);
    transform: translateX(4px);
}
.ex-num {
    font-family: var(--font-head);
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--accent);
    opacity: .3;
    min-width: 36px;
}
.ex-body {}
.ex-title {
    font-family: var(--font-head);
    font-size: 1rem;
    letter-spacing: .08em;
    color: var(--text);
    margin-bottom: 6px;
}
.ex-desc {
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.tts-btn {
    margin-left: auto;
    background: rgba(0,229,255,.1);
    border: 1px solid rgba(0,229,255,.3);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--accent);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all .2s;
    flex-shrink: 0;
    min-width: 48px;
    min-height: 48px;
    display: flex; align-items: center; justify-content: center;
}
.tts-btn:hover {
    background: rgba(0,229,255,.2);
    box-shadow: 0 0 16px rgba(0,229,255,.3);
    transform: scale(1.08);
}

/* ================================================================
   RESPONSIVE — Mobile First
   ================================================================ */

/* --- Tablet: 641px – 820px --- */
@media (max-width: 820px) and (min-width: 641px) {
    .sports-grid { grid-template-columns: repeat(2, 1fr); }

    .splash-title  { font-size: 1.6rem; }
    .splash-btn    { padding: 16px 32px; font-size: .9rem; }
}

/* --- Mobil: 640px ve altı --- */
@media (max-width: 640px) {

    /* Temel yazı boyutu */
    html { font-size: 15px; }

    /* Container */
    .container { padding: 20px 14px 60px; gap: 20px; }

    /* ---- Splash ---- */
    .splash-title  { font-size: 1.4rem; letter-spacing: .1em; }
    .splash-sub    { font-size: .82rem; }
    .splash-btn    {
        padding: 16px 28px;
        font-size: .82rem;
        letter-spacing: .07em;
        border-radius: 50px;
        gap: 10px;
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }
    .splash-rings  { width: 110px; height: 110px; }
    .sr1 { width: 110px; height: 110px; }
    .sr2 { width:  78px; height:  78px; }
    .sr3 { width:  52px; height:  52px; }
    .splash-mic    { width: 38px; height: 38px; }
    .splash-hint   { font-size: .72rem; }

    /* ---- Logo / Header ---- */
    .logo-wrap     { gap: 12px; }
    .logo-icon svg { width: 44px; height: 44px; }
    .logo-title    { font-size: 1.15rem; letter-spacing: .08em; }
    .logo-sub      { font-size: .75rem; }

    /* ---- Welcome card ---- */
    .welcome-card  { padding: 24px 16px; }
    .welcome-title { font-size: 1.2rem; }
    .welcome-desc  { font-size: .88rem; }
    .welcome-desc br { display: none; } /* tek satırda akmaya bırak */
    .pulse-ring    { width: 58px; height: 58px; }
    .pulse-dot     { width: 22px; height: 22px; }

    /* ---- Listen panel ---- */
    .listen-panel  { padding: 22px 14px; }
    .wave-bars     { gap: 3px; height: 50px; }
    .bar           { width: 5px; }
    .listen-label  { font-size: .95rem; }
    .listen-hint   { font-size: .78rem; }
    .transcript-box { font-size: 1.2rem; }

    /* ---- Mic butonu ---- */
    .mic-btn {
        padding: 18px 32px;
        font-size: .78rem;
        border-radius: 50px;
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    .mic-icon      { width: 34px; height: 34px; }

    /* ---- Spor kartları ---- */
    .sports-grid   { grid-template-columns: 1fr; gap: 14px; }
    .sport-card    { padding: 24px 16px 20px; }
    .sport-icon    { font-size: 2.4rem; margin-bottom: 10px; }
    .sport-name    { font-size: .88rem; }
    .sport-desc    { font-size: .78rem; }

    /* ---- Geri butonu (spor sayfaları) ---- */
    .page-back     { font-size: .75rem; padding: 8px 16px; }

    /* ---- Spor sayfası başlık ---- */
    .sport-page-hero  { font-size: 3.5rem; }
    .sport-page-title { font-size: 1.5rem; }
    .sport-page-sub   { font-size: .82rem; }

    /* ---- Egzersiz kartları ---- */
    .exercise-card {
        padding: 18px 14px;
        gap: 12px;
        flex-wrap: wrap; /* TTS butonu alt satıra geçebilir, ok */
    }
    .exercise-card:hover { transform: none; } /* dokunmada hover efekti kalkıyor */
    .ex-num   { font-size: 1.2rem; min-width: 28px; }
    .ex-title { font-size: .9rem; }
    .ex-desc  { font-size: .82rem; }
    .tts-btn  {
        margin-left: 0;
        margin-top: 4px;
        padding: 10px 16px;
        width: 100%;          /* tam genişlik → kolay dokunma hedefi */
        border-radius: 8px;
        font-size: 1rem;
        justify-content: center;
    }
    .tts-btn::after { content: " Sesli Dinle"; font-size: .8rem; font-family: var(--font-body); }

    /* ---- Footer ---- */
    .site-footer { font-size: .75rem; padding-top: 16px; }
}

/* --- Çok küçük ekranlar: 360px altı --- */
@media (max-width: 360px) {
    html { font-size: 13px; }
    .splash-title { font-size: 1.2rem; }
    .logo-title   { font-size: 1rem; }
    .mic-btn      { padding: 16px 22px; }
}
