/* ============================================================
   Cigabit — Advanced Computer Programming
   Dark theme, mobile-first responsive stylesheet
   ============================================================ */

:root {
    --bg: #0a0f1e;
    --bg-2: #0d1428;
    --surface: #141c30;
    --surface-2: #1a2440;
    --border: #243050;
    --text: #e6ecff;
    --text-muted: #93a0c0;
    --accent: #7ba3b6;
    --accent-2: #6f86b4;
    --accent-3: #877cb0;
    --gradient: linear-gradient(135deg, #7ba3b6 0%, #6f86b4 100%);
    --gradient-soft: linear-gradient(135deg, rgba(123,163,182,.14) 0%, rgba(111,134,180,.14) 100%);
    --success: #34d399;
    --danger: #f87171;
    --warning: #fbbf24;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 8px 30px rgba(0,0,0,.35);
    --transition: .25s cubic-bezier(.4,0,.2,1);
    --header-h: 64px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: #0a0f1e; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: transparent;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* Kuantum evren arka planı */
#quantum-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    display: block;
}

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: #a6bec9; }

img { max-width: 100%; display: block; }

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 18px;
}

/* ---------- Header / Nav ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10,15,30,.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text);
    text-decoration: none;
    min-height: 44px;
}

.brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #04121a;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.brand small {
    display: block;
    font-size: .6rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: .4px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a {
    color: var(--text-muted);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: .94rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: #67e8f9; background: var(--gradient-soft); }

.nav-right { display: flex; align-items: center; gap: 8px; }

/* Dil seçici */
.lang-dropdown { position: relative; }
.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: .9rem;
    min-height: 44px;
}
.lang-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px;
    min-width: 160px;
    display: none;
    box-shadow: var(--shadow);
    z-index: 200;
}
.lang-menu.open { display: block; }
.lang-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    color: var(--text);
    border-radius: 7px;
    font-size: .9rem;
}
.lang-menu a:hover { background: var(--surface); }
.lang-menu a.active { background: var(--gradient-soft); color: #67e8f9; }

/* Hamburger */
.hamburger {
    display: none;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* Mobil çekmece */
.mobile-drawer {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-2);
    z-index: 99;
    padding: 18px;
    transform: translateX(-100%);
    transition: transform .3s ease;
    overflow-y: auto;
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer a {
    display: block;
    padding: 15px 16px;
    color: var(--text);
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 4px;
}
.mobile-drawer a:hover { background: var(--surface); }
.mobile-drawer a.active { background: var(--gradient-soft); color: #67e8f9; }
.drawer-langs { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.drawer-langs .row { display: flex; flex-wrap: wrap; gap: 8px; }
.drawer-langs a { display: inline-flex; padding: 10px 14px; }

/* ---------- Butonlar ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: var(--transition);
    min-height: 44px;
    line-height: 1.2;
}
.btn-primary { background: var(--gradient); color: #04121a; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(123,163,182,.22); color: #04121a; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: #a6bec9; }
.btn-ghost { background: var(--surface); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: rgba(248,113,113,.12); color: var(--danger); }
.btn-danger:hover { background: rgba(248,113,113,.2); }
.btn-sm { padding: 8px 14px; font-size: .85rem; min-height: 38px; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: 64px 0 72px;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(600px 300px at 20% 0%, rgba(123,163,182,.10), transparent 60%),
        radial-gradient(600px 300px at 80% 20%, rgba(135,124,176,.10), transparent 60%);
    pointer-events: none;
}
.hero-inner { position: relative; text-align: center; max-width: 760px; margin: 0 auto; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--gradient-soft);
    border: 1px solid var(--border);
    color: #a6bec9;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 600;
    margin-bottom: 20px;
}
.hero h1 {
    font-size: 2.1rem;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.5px;
    margin-bottom: 18px;
}
.hero h1 .grad { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto 28px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Bölüm başlıkları ---------- */
.section { padding: 56px 0; }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head h2 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.4px; margin-bottom: 8px; }
.section-head p { color: var(--text-muted); max-width: 520px; margin: 0 auto; }

/* ---------- Özellik kartları ---------- */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.feature-icon {
    width: 46px;
    height: 46px;
    border-radius: 11px;
    background: var(--gradient-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 14px;
}
.feature-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: .92rem; }

/* ---------- Kurs kartları ---------- */
.course-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}
.course-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.course-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.course-cover {
    height: 150px;
    background: var(--gradient);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}
.course-cover .cat-label {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(4,18,26,.7);
    color: #c3d2da;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}
.course-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.course-body h3 { font-size: 1.12rem; font-weight: 700; margin-bottom: 8px; }
.course-body h3 a { color: var(--text); }
.course-body h3 a:hover { color: #a6bec9; }
.course-body .desc { color: var(--text-muted); font-size: .9rem; flex: 1; margin-bottom: 14px; }
.course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.course-meta span {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .76rem;
    padding: 4px 10px;
    border-radius: 999px;
}

/* ---------- Kategori filtreleri ---------- */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 30px;
}
.filters a {
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .88rem;
    font-weight: 500;
}
.filters a:hover { color: var(--text); border-color: var(--accent); }
.filters a.active { background: var(--gradient); color: #04121a; border-color: transparent; font-weight: 600; }

/* ---------- İstatistik ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    text-align: center;
}
.stat-card .num { font-size: 1.8rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-card .lbl { color: var(--text-muted); font-size: .85rem; margin-top: 2px; }

/* ---------- CTA ---------- */
.cta-banner {
    background: var(--gradient);
    border-radius: var(--radius);
    padding: 40px 26px;
    text-align: center;
}
.cta-banner h2 { color: #04121a; font-size: 1.5rem; font-weight: 800; margin-bottom: 10px; }
.cta-banner p { color: rgba(4,18,26,.85); margin-bottom: 22px; font-weight: 500; }
.cta-banner .btn { background: #04121a; color: #67e8f9; }

/* ---------- Formlar ---------- */
.auth-wrap {
    display: flex;
    justify-content: center;
    padding: 48px 0;
}
.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px 24px;
    width: 100%;
    max-width: 420px;
}
.auth-card h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.auth-card .sub { color: var(--text-muted); margin-bottom: 24px; font-size: .92rem; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-control {
    width: 100%;
    background: var(--bg-2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: .95rem;
    transition: var(--transition);
    min-height: 46px;
}
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(123,163,182,.12); }
.form-control::placeholder { color: #56648a; }
textarea.form-control { min-height: 120px; resize: vertical; }
.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }

/* Uyarılar */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: .9rem;
    font-weight: 500;
}
.alert-danger { background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.35); color: #fca5a5; }
.alert-success { background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.35); color: #6ee7b7; }

/* ---------- Sayfa başlığı (iç sayfalar) ---------- */
.page-hero {
    padding: 48px 0 36px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    background: var(--bg-2);
}
.page-hero h1 { font-size: 1.9rem; font-weight: 800; margin-bottom: 8px; }
.page-hero p { color: var(--text-muted); max-width: 560px; margin: 0 auto; }

/* ---------- Kurs detay ---------- */
.course-detail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 36px 0;
}
.course-detail-main h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 12px; }
.course-detail-main .desc { color: var(--text-muted); margin-bottom: 20px; }
.course-detail-side {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    height: fit-content;
}
.course-detail-side h3 { font-size: 1.05rem; margin-bottom: 14px; }
.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: .9rem;
}
.detail-row:last-child { border-bottom: none; }
.detail-row .k { color: var(--text-muted); }
.detail-row .v { font-weight: 600; }
.course-detail-side .btn { margin-top: 16px; }

/* ---------- Dashboard ---------- */
.dash-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 32px 0;
}
.dash-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
.dash-card h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 16px; }
.empty-state { text-align: center; padding: 30px 10px; color: var(--text-muted); }

/* ---------- Admin ---------- */
.admin-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px 0;
}
.admin-side {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    height: fit-content;
}
.admin-side a {
    display: block;
    padding: 12px 14px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    font-weight: 500;
    margin-bottom: 4px;
}
.admin-side a:hover { background: var(--surface-2); color: var(--text); }
.admin-side a.active { background: var(--gradient-soft); color: #67e8f9; }
.admin-main { min-width: 0; }

.admin-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--surface-2); color: var(--text-muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .4px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(34,211,238,.03); }
.role-badge {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 600;
    background: var(--gradient-soft);
    color: #67e8f9;
}
.role-badge.admin { background: rgba(139,92,246,.18); color: #c4b5fd; }

/* ---------- İçerik / metin ---------- */
.prose { color: var(--text-muted); }
.prose p { margin-bottom: 14px; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    margin-top: auto;
    padding: 40px 0 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 26px;
}
.footer-col h4 { font-size: .95rem; font-weight: 700; margin-bottom: 12px; }
.footer-col p { color: var(--text-muted); font-size: .88rem; }
.footer-col a { display: block; color: var(--text-muted); padding: 5px 0; font-size: .9rem; }
.footer-col a:hover { color: #67e8f9; }
.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: .82rem;
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

/* ============================================================
   RESPONSIVE — tablet ve masaüstü
   ============================================================ */
@media (min-width: 640px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .course-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-cards { grid-template-columns: repeat(4, 1fr); }
    .hero h1 { font-size: 2.7rem; }
}

@media (min-width: 900px) {
    .course-grid { grid-template-columns: repeat(3, 1fr); }
    .course-detail { grid-template-columns: 1fr 320px; }
    .dash-grid { grid-template-columns: 1fr; }
    .admin-layout { grid-template-columns: 220px 1fr; }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

/* ---------- Mobil navigasyon ---------- */
@media (max-width: 899px) {
    .nav-links { display: none; }
    .nav-right .lang-dropdown { display: none; }
    .nav-right .btn-outline { display: none; }
    .hamburger { display: flex; }
    .hero { padding: 48px 0 56px; }
    .section { padding: 44px 0; }
}

/* ---------- Animasyonlar ---------- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .5s ease both; }

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--border); }

/* Erişilebilirlik */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
