@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
    box-sizing: border-box;
}

:root {
    /* BetterMe-esintili sade, yüksek kontrastlı palet */
    --bg: #f7f7f5;
    --surface: #ffffff;
    --surface-soft: #f1f1ef;

    --text: #171717;
    --text-strong: #0b0b0b;
    --muted: #767676;

    --border: #e2e2df;
    --border-strong: #ccccca;

    --primary: #171717;
    --primary-hover: #000000;

    /* BetterMe görsel dilindeki sıcak vurgu */
    --accent: #ef5350;
    --accent-soft: #fff0ef;

    --shadow: 0 14px 40px rgba(0, 0, 0, 0.07);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.hero {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.hero-inner {
    width: min(100% - 32px, 1000px);
    margin: 0 auto;
    padding: 23px 0 18px;
    text-align: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 11px;
    padding: 6px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text-strong);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

h1 {
    max-width: 780px;
    margin: 0 auto;
    color: #63a832;
    font-size: clamp(28px, 4.2vw, 44px);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.subtitle {
    max-width: 700px;
    margin: 11px auto 19px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: -0.01em;
}

.search-area {
    width: min(100%, 760px);
    margin: 0 auto;
}

.search-box-wrap {
    position: relative;
}

.search-box {
    display: grid;
    grid-template-columns: 22px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 6px 6px 6px 15px;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.055);
    transition: border-color .16s ease, box-shadow .16s ease;
}

.search-box:focus-within {
    border-color: #999997;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.035), 0 8px 25px rgba(0, 0, 0, .06);
}

.search-icon {
    width: 20px;
    height: 20px;
    fill: #777;
}

.search-box input {
    min-width: 0;
    height: 44px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.015em;
}

.search-box input::placeholder {
    color: #a1a19e;
    font-weight: 400;
}

.search-box button {
    height: 42px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    transition: background .15s ease, transform .15s ease;
}

.search-box button:hover {
    background: var(--primary-hover);
}

.search-box button:active {
    transform: translateY(1px);
}

.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 12px;
}

.category-btn {
    min-height: 35px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: #525252;
    font-size: 13px;
    font-weight: 600;
    transition: .15s ease;
}

.category-btn:hover {
    border-color: #bdbdb9;
    color: var(--text-strong);
}

.category-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.suggestions {
    position: absolute;
    z-index: 100;
    top: calc(100% + 7px);
    left: 0;
    right: 0;
    overflow: hidden;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
    text-align: left;
}

.suggestion-item {
    display: flex;
    width: 100%;
    gap: 10px;
    align-items: center;
    padding: 11px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text);
    font-weight: 500;
    text-align: left;
}

.suggestion-item:hover {
    background: var(--surface-soft);
}

.suggestion-search-icon {
    color: #999;
}

.results-section {
    width: min(100% - 32px, 820px);
    margin: 0 auto;
    padding: 28px 0 80px;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.result-header h2 {
    margin: 0;
    color: var(--text-strong);
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -0.035em;
}

.result-header p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.play-controls {
    display: flex;
    gap: 8px;
}

.round-control {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text-strong);
    font-weight: 700;
    transition: .15s ease;
}

.round-control:hover {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.clip-feed {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.clip-item {
    scroll-margin-top: 230px;
    opacity: .74;
    transform: scale(.987);
    transition: opacity .2s ease, transform .2s ease;
}

.clip-item.active {
    opacity: 1;
    transform: scale(1);
}

.clip-player-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.player-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.youtube-player,
.youtube-player iframe {
    width: 100% !important;
    height: 100% !important;
}

.clip-counter {
    position: absolute;
    z-index: 5;
    top: 14px;
    right: 14px;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .74);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    pointer-events: none;
}

.clip-meta {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: end;
    padding: 18px 20px 20px;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
}

.category-badge,
.time-badge {
    display: inline-flex;
    min-height: 27px;
    align-items: center;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.category-badge {
    background: var(--accent-soft);
    color: #c43e3b;
}

.time-badge {
    background: var(--surface-soft);
    color: #696967;
}

.clip-meta h3 {
    margin: 0;
    color: var(--text-strong);
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -0.035em;
}

.youtube-link {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.youtube-link:hover {
    color: var(--accent);
}

.empty-state,
.loading-state {
    display: flex;
    min-height: 350px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.empty-icon {
    display: flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    color: var(--text-strong);
    font-size: 19px;
    font-weight: 800;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .04);
}

.empty-state h2 {
    margin: 0 0 8px;
    color: #63a832;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.empty-state p,
.loading-state p {
    max-width: 480px;
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.spinner {
    width: 34px;
    height: 34px;
    margin-bottom: 15px;
    border: 3px solid #dededb;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .75s linear infinite;
}

.hidden {
    display: none !important;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 680px) {
    .hero {
        position: static;
    }

    .hero-inner,
    .results-section {
        width: min(100% - 20px, 820px);
    }

    .hero-inner {
        padding-top: 18px;
    }

    h1 {
        font-size: 30px;
    }

    .subtitle {
        font-size: 13px;
    }

    .categories {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

    .categories::-webkit-scrollbar {
        display: none;
    }

    .category-btn {
        flex: 0 0 auto;
    }

    .clip-item {
        scroll-margin-top: 12px;
    }

    .clip-meta {
        display: block;
    }

    .youtube-link {
        display: inline-block;
        margin-top: 15px;
    }
}

.word-title {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
}

.turkish-meaning {
    color: var(--muted);
    font-weight: 500;
    letter-spacing: -0.02em;
}

.difficulty-filter{display:flex;align-items:center;justify-content:center;gap:12px;margin:18px 0;color:#555}.difficulty-filter select{padding:10px 14px;border:1px solid #ccc;border-radius:10px;background:#fff;max-width:65%}
