:root {
  --bg: #0f1115; --panel: #181b22; --text: #e8eaf0; --muted: #9aa3b2;
  --accent: #ff5a4f; --border: #2a2f3a;
  --ease: cubic-bezier(.22, .61, .36, 1);
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f6f7f9; --panel: #fff; --text: #14171f; --muted: #5b6475; --border: #dde1e8; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[hidden] { display: none !important; }   /* display:flex gibi kurallar hidden özniteliğini ezmesin */
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); line-height: 1.45; }
body.modal-open { overflow: hidden; }
a { color: var(--accent); }

/* Ortak yumuşak geçişler */
button, select, input, .card, .tab {
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease),
              transform .18s var(--ease), box-shadow .2s var(--ease), filter .2s var(--ease), opacity .2s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.langbar { display: flex; justify-content: flex-end; padding: 10px 16px 0; }
.langbar select { background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; }
.top { text-align: center; padding: 20px 16px 12px; }
.top h1 { margin: 0; font-size: 2rem; }
.sub { color: var(--muted); margin: 6px 0 16px; }
main { max-width: 1100px; margin: 0 auto; padding: 0 16px 40px; }
.lucky { background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 12px 24px; font-size: 1rem; cursor: pointer; }
.lucky:hover { filter: brightness(1.1); transform: translateY(-1px); }
.lucky:active { transform: scale(.97); }

.tabs { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; }
.tab { background: var(--panel); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 8px 16px; cursor: pointer; }
.tab:hover { border-color: var(--muted); }
.tab.active { border-color: var(--accent); color: var(--accent); }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 14px; animation: fadeIn .25s var(--ease); }
.filters [data-tabs]:not([hidden]) { animation: fadeIn .25s var(--ease) both; }
.filters label { display: flex; flex-direction: column; font-size: .8rem; color: var(--muted); gap: 4px; }
.filters select, .filters input { background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 8px; min-width: 130px; }
.filters select:focus, .filters input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.filters .wide { flex: 1 1 220px; }
.filters .wide input { width: 100%; }
.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px; cursor: pointer; }
.ghost:hover { border-color: var(--accent); color: var(--accent); }
.linklike { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0 0 12px; font: inherit; text-decoration: underline; animation: fadeIn .25s var(--ease); }
.edu-intro { color: var(--muted); margin: 12px 0 0; animation: fadeIn .25s var(--ease); }
.status { color: var(--muted); min-height: 1.4em; margin: 10px 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.grid.videos { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-2px); border-color: var(--muted); }
.card.enter { animation: cardIn .32s var(--ease) both; animation-delay: var(--d, 0ms); }
.card img, .card .noimg { width: 100%; aspect-ratio: 2/3; object-fit: cover; background: var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: .8rem; }
.card .body { padding: 10px; font-size: .85rem; }
.card h3 { margin: 0 0 4px; font-size: .95rem; }
.meta { color: var(--muted); font-size: .78rem; }
.pick { margin-top: 6px; }
#more { display: block; margin: 20px auto; }

/* Eğitim videoları */
.card.video .video-thumb { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #000; cursor: pointer; aspect-ratio: 16/9; }
.card.video .video-thumb img { width: 100%; height: 100%; aspect-ratio: 16/9; object-fit: cover; opacity: .92; transition: opacity .2s var(--ease), transform .3s var(--ease); }
.card.video .video-thumb:hover img { opacity: 1; transform: scale(1.03); }
.card.video .video-thumb { overflow: hidden; }
.play { position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; transition: transform .2s var(--ease), background-color .2s var(--ease); }
.video-thumb:hover .play { transform: scale(1.1); background: var(--accent); }
.video-frame { width: 100%; aspect-ratio: 16/9; border: 0; display: block; animation: fadeIn .3s var(--ease); }

/* Şanslı hissediyorum penceresi */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); opacity: 0; transition: opacity .22s var(--ease); }
.modal-card { position: relative; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; background: var(--panel); border: 2px solid var(--accent); border-radius: 14px; padding: 20px;
  opacity: 0; transform: translateY(12px) scale(.98); transition: opacity .22s var(--ease), transform .22s var(--ease); }
.modal.open .modal-backdrop { opacity: 1; }
.modal.open .modal-card { opacity: 1; transform: none; }
.modal-x { position: absolute; top: 6px; inset-inline-end: 10px; background: none; border: 0; color: var(--muted); font-size: 1.8rem; line-height: 1; cursor: pointer; padding: 4px 8px; }
.modal-x:hover { color: var(--accent); }
#lucky-body { display: flex; gap: 16px; flex-wrap: wrap; transition: opacity .16s var(--ease); }
#lucky-body.swapping { opacity: 0; }
#lucky-body img { width: 120px; border-radius: 8px; align-self: flex-start; }
.lucky-info { flex: 1 1 200px; }
.lucky-info h2 { margin: 0 0 6px; font-size: 1.3rem; padding-inline-end: 28px; }

footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 24px 16px; border-top: 1px solid var(--border); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
