/* Genel stiller */
:root{
    --bg-1: #1f1144;
    --bg-2: #3b1a70;
    --accent: #6f42c1;
    --accent-2: #9b79ff;
    --text: #e9e6f7;
    --text-strong: #111;
    --card-bg: rgba(255,255,255,0.96);
    --muted: rgba(255,255,255,0.7);
    --title-color: #fff; /* default: white for dark background */
}

/* Google Font kullanımı (Inter) */
body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    background: linear-gradient(135deg,var(--bg-1) 0%,var(--bg-2) 50%,var(--accent-2) 100%);
    margin: 0;
    padding: 0;
    color: var(--text);
    min-height:100vh;
    position:relative;
    overflow-x:hidden;
    font-size: 16px; /* mobile-first */
}

@media (min-width: 769px) {
    body { font-size: 17px; }
}


body::before{
    content:"";
    position:fixed;
    inset: -20%;
    background:
      radial-gradient(30% 30% at 10% 20%, rgba(123,97,255,0.14), transparent 20%),
      radial-gradient(40% 40% at 90% 80%, rgba(111,66,193,0.12), transparent 20%);
    filter: blur(72px);
    z-index:0;
    pointer-events:none;
}

/* Header - mobile-first */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
    border-bottom: 1px solid rgba(255,255,255,0.03);
    backdrop-filter: blur(6px);
}

.header-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 16px;
    /* Use grid to keep logo left and nav centered and stable */
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
}

/* Center nav and prevent wrapping to avoid initial reflow */
.header-container nav {
    grid-column: 2;
    justify-self: center;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: nowrap; /* prevent wrapping that causes disorder */
}

.header-container .logo {
    grid-column: 1;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

/* Nav - collapsed on small screens */
.nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 20px;
    padding: 8px;
    border-radius: 8px;
}

.nav-links {
    display: none;
    width: 100%;
}

.nav-links.open {
    display: block;
}

nav {
    display: flex;
    gap:12px;
    align-items: center;
    flex-direction: row; /* horizontal by default to keep menu consistent */
    flex-wrap: nowrap; /* keep items on single line */
    justify-content: center;
    white-space:nowrap;
}

nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 8px;
    width: 100%;
    display: flex;
    align-items: center;
    gap:10px;
}

nav a:hover {
    background: rgba(255,255,255,0.02);
}

/* Side floating toggle (mobile) */
.side-nav-toggle {
    position: fixed;
    left: 12px;
    top: 46%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    border: none;
    z-index: 1110;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

/* Nav-links as side drawer on mobile */
.nav-links {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    transform: translateX(-110%);
    transition: transform 0.25s ease;
    z-index: 1105;
    background: var(--card-bg);
    color: var(--text-strong);
    padding: 18px;
    overflow-y: auto;
}

.nav-links.open {
    transform: translateX(0);
    box-shadow: 8px 0 30px rgba(0,0,0,0.25);
}

.nav-links nav a {
    color: var(--text-strong);
    display: block;
    padding: 12px 8px;
    border-radius: 8px;
}

.side-nav-close {
    position: absolute;
    right: 12px;
    top: 12px;
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--text-strong);
}

@media (min-width: 769px) {
    .side-nav-toggle { display: none; }
    .nav-links { position: static; transform: none; background: transparent; padding: 0; box-shadow: none; }
    .nav-links nav a { color: var(--text); display: inline-flex; padding: 10px 14px; }
    .side-nav-close { display: none; }
}

/* İçerik başlangıcı - header yüksekliği kadar boşluk */
main {
    margin-top: 72px;
    padding: 16px;
    display: flex;
    justify-content: center;
    min-height: calc(100vh - 72px);
}

.container {
    width: 100%;
    max-width: 960px;
    background: rgba(255,255,255,0.04);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 30px rgba(10,6,30,0.45);
    backdrop-filter: blur(6px);
}

/* Card layout */
.card {
    background: var(--card-bg);
    color: var(--text-strong);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    margin-bottom: 16px;
}

/* Admin title contrast fix */
.admin-container h1,
.admin-container h2,
.page-title {
    color: var(--title-color);
}

/* Explicit fix: ensure admin page title is white */
.page-title {
    color: #fff !important;
}

/* Make card headers readable when inside white cards */
.card h1, .card h2, .card h3 {
    color: var(--text-strong);
}


/* Ana menü - üstte sabit */
header {
    background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
    color: white;
    padding: 18px 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 6px 30px rgba(20,10,60,0.4);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

nav {
    display:flex;
    gap:16px;
    align-items:center;
}

nav a {
    color: #f3eefe;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 10px;
    transition: background-color 0.25s, transform 0.15s;
    display:inline-flex;
    align-items:center;
    gap:10px;
}

nav a:hover {
    background: rgba(255,255,255,0.04);
    transform: translateY(-2px);
}

.nav-icon { 
    width:18px; 
    height:18px; 
    display:inline-block; 
    text-align:center; 
    line-height:18px; 
}

/* Ana içerik */
main {
    margin-top: 80px; /* Header yüksekliği kadar */
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
}

.container {
    max-width: 800px;
    width: 100%;
    background: rgba(255,255,255,0.06);
    color: #fff;
    border-radius: 15px;
    box-shadow: 0 6px 30px rgba(10,6,30,0.45);
    overflow: hidden;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.04);
}

/* Üst sayaç alanları (şimdilik boş) */
.counters {
    background-color: #e9ecef;
    padding: 15px;
    display: flex;
    justify-content: space-around;
    border-bottom: 1px solid #dee2e6;
}

.counter {
    text-align: center;
    font-weight: bold;
    color: #495057;
}

/* Soru kutusu */
.question-box {
    background: linear-gradient(135deg,#7b61ff,#5b2be6);
    color: white;
    padding: 30px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
}

/* Cevap alanı */
.answer-section {
    padding: 30px;
}

/* Kart yapısı */
.card {
    background: white;
    color: #222; /* koyu okunabilir metin */
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Textarea */
textarea {
    width: 100%;
    height: 150px;
    padding: 15px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 16px;
    resize: vertical;
    box-sizing: border-box;
    background: #fff;
    color: #222; /* okunabilirlik için koyu metin */
}

/* Açık arka planlı bloklar için genel okunurluk düzeltmeleri */
.comment-section,
.tips-card,
.admin-form,
.sorular-list,
.progress-container,
.evaluation-item,
.card pre,
.comment-section pre {
    color: #222;
}

input,
select,
textarea,
.form-group input,
.form-group textarea {
    color: #222;
}

/* Örnek: ipuçları kartının içindeki ikon/metin koyu renk alır */
.tips-card .tip-content,
.tips-card .tip-number,
.tips-card .tip-category {
    color: #222;
}

/* Koyu metin gereken yerlerde başlıklar */
.admin-container h1,
.admin-container h2,
.comment-section h4,
.comment h3 {
    color: #222;
}

/* Buton */
button {
    padding: 12px 24px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 15px;
}

button:hover {
    background-color: #218838;
}

/* Yorum alanı */
.comment {
    margin-top: 20px;
    padding: 15px;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    color: #155724;
    display: none; /* Başlangıçta gizli */
}

/* 🔹 Soru Navigasyonu Stilleri */
.soru-navigasyon {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 10px;
    justify-content: center;
}

.soru-btn {
    background-color: #e9ecef;
    color: #333;
    border: 2px solid #dee2e6;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.soru-btn:hover {
    background-color: #eee;
    border-color: #6f42c1;
}

.soru-btn.active {
    background-color: #6f42c1;
    color: white;
    border-color: #4b27a1;
}

.soru-btn.answered {
    background-color: #28a745;
    color: white;
    border-color: #1e7e34;
}



/* Devamını Gör butonu */
.show-more-btn {
    background: transparent;
    border: 2px dashed rgba(255,255,255,0.08);
    color: #f3eefe;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    min-width: 120px;
    transition: all 0.2s ease;
}

.show-more-btn:hover {
    background: rgba(255,255,255,0.03);
    transform: translateY(-2px);
}

/* 🔹 Comment Section - Kendi Yorumum */
.comment {
    margin-top: 30px;
    padding: 20px;
    border-radius: 10px;
    background: #f8f6fb;
    border-left: 5px solid #6f42c1;
    display: none;
    color: #222; /* açık arka planlarda koyu okunabilir metin */
}

.comment.active {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment h3 {
    margin-top: 0;
    color: #6f42c1;
    font-size: 20px;
    border-bottom: 2px solid #6f42c1;
    padding-bottom: 10px;
}

.comment-section {
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #dee2e6;
}

.comment-section.puan {
    border-left-color: #ffc107;
    background: #fffbf0;
}

.comment-section.puan-value {
    font-size: 32px;
    font-weight: bold;
    color: #ffc107;
    text-align: center;
    padding: 20px;
}

.comment-section.yorum {
    border-left-color: #6f42c1;
}

.comment-section.hata {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.comment-section.ornekler {
    border-left-color: #17a2b8;
    background: #f0f7f8;
}

.comment-section.oneri {
    border-left-color: #28a745;
    background: #f0f8f4;
}

.comment-section h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.comment-section p {
    margin: 0;
    color: #555;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.comment-section pre {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
}

/* 🔹 Button Group - Kontrol Butonları */
.button-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn-nav {
    background: linear-gradient(90deg,#9b79ff,#6f42c1);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.25s ease;
    min-width: 120px;
    box-shadow: 0 8px 20px rgba(99,63,199,0.25);
}

.btn-nav:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(90,45,190,0.30);
}

.btn-nav:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

/* 🔹 Responsive Design */
/* Mobile-first rules are default; larger screens get overrides below */
@media (min-width: 769px) {
    .header-container {
        flex-direction: row;
    }

    .nav-toggle { display: none; }
    .nav-links { display: block !important; }
    nav { flex-direction: row; }

    main { padding: 28px; }
    .container { padding: 24px; }

    .question-box { font-size: 26px; padding: 30px; }
}

/* Removed mobile media query to enforce desktop-like layout across widths */
/* Stable header + nav for all devices */
.header-container {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
}

.header-container nav {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    justify-content: center;
}

.nav-toggle,
.mobile-menu-toggle { display: none !important; }
.nav-links { display: block !important; }

.question-box { font-size: 24px; padding: 30px; }
.answer-section { padding: 30px; }
.container { margin: 0 auto; max-width: 960px; padding: 16px; }
.soru-navigasyon { justify-content: center; }
.button-group { flex-direction: row; }
.btn-nav { width: auto; min-width: 120px; }
    .header-container {
        /* keep grid layout but shrink spacing on mobile */
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 8px;
    }





