/* =============================================== */
/* MY_DICTIONARY.CSS - GÜNCELLENMİŞ VERSİYON */
/* Test sekmesi üstte, mobil uyumlu, açıklamalı */
/* =============================================== */

:root {
    --primary-color: #2c5530;
    --primary-light: #4a7c59;
    --primary-dark: #1e3a23;
    --secondary-color: #8fb996;
    --accent-color: #e6b450;
    --background-light: #f8f5f0;
    --background-white: #ffffff;
    --text-dark: #2d2a24;
    --text-medium: #5a554d;
    --text-light: #7a756d;
    --border-light: #e8e2d6;
    --border-medium: #d8d2c6;
    --shadow-soft: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-medium: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-strong: 0 8px 20px rgba(0,0,0,0.08);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background-light);
    color: var(--text-dark);
    line-height: 1.5;
    font-size: 14px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* =============================================== */
/* HEADER */
/* =============================================== */

.dictionary-header {
    background: var(--background-white);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-light);
}

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

.header-title h1 {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin: 0;
}

.status-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Statü rozet renkleri */
.status-badge.beginner { background: linear-gradient(135deg, #95a5a6, #7f8c8d); }
.status-badge.apprentice { background: linear-gradient(135deg, #f39c12, #e67e22); }
.status-badge.journeyman { background: linear-gradient(135deg, #3498db, #2980b9); }
.status-badge.master { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.status-badge.expert { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.status-badge.legend { background: linear-gradient(135deg, #f1c40f, #f39c12); }

.header-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-light);
}

.stat-item {
    text-align: center;
    flex: 1;
    cursor: help;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-light);
    text-transform: uppercase;
}

.header-points-limit {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.points-box, .limit-box, .streak-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 30px;
    background: #f8f9fa;
    cursor: help;
    transition: all 0.3s;
}

.points-box i { color: #ffc107; }
.points-value { font-size: 1.2rem; font-weight: 700; color: var(--text-dark); }

.limit-box { background: rgba(44, 85, 48, 0.1); }
.limit-box i { color: var(--primary-color); }
.limit-value { font-size: 1.1rem; font-weight: 600; color: var(--primary-color); }

.buy-limit-btn {
    background: linear-gradient(135deg, var(--accent-color), #ffc107);
    color: var(--text-dark);
    border: none;
    border-radius: 30px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    margin-left: 5px;
    transition: all 0.2s;
}

.buy-limit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(230, 180, 80, 0.3);
}

.streak-box { background: rgba(255, 193, 7, 0.1); }
.streak-box i { color: #ffc107; }
.streak-value { font-size: 1.1rem; font-weight: 600; color: #ffc107; }

/* =============================================== */
/* SEVİYE İLERLEME (YENİ) */
/* =============================================== */

.level-progress-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    margin-top: 10px;
    border: 1px dashed var(--border-light);
}

.level-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.current-level {
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(44, 85, 48, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

.next-level {
    font-weight: 600;
    color: var(--text-medium);
}

.level-arrow {
    color: var(--text-light);
}

.level-progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.level-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.level-hint {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--text-light);
}

.level-hint i {
    color: var(--accent-color);
}

/* =============================================== */
/* SEKMELER */
/* =============================================== */

.dictionary-tabs {
    display: flex;
    gap: 5px;
    background: var(--background-white);
    padding: 5px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border-light);
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-medium);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.tab-btn i { font-size: 1.1rem; color: var(--text-light); }
.tab-btn:hover { background: rgba(44, 85, 48, 0.05); color: var(--primary-color); }
.tab-btn:hover i { color: var(--primary-color); }

.tab-btn.active {
    background: var(--primary-color);
    color: white;
}

.tab-btn.active i { color: white; }

.tab-content {
    display: none;
    background: var(--background-white);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-soft);
    min-height: 400px;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.loading-spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

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

/* =============================================== */
/* TESTLER SEKMESİ (ÜSTTE) */
/* =============================================== */

.test-start-section {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(44, 85, 48, 0.05), rgba(143, 185, 150, 0.05));
    border-radius: 16px;
}

.test-start-title {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.test-start-desc {
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-bottom: 20px;
}

.start-test-big-btn {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 40px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(44, 85, 48, 0.3);
    transition: all 0.3s;
}

.start-test-big-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(44, 85, 48, 0.4);
}

.start-test-big-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.unfinished-test-container {
    margin-bottom: 25px;
}

.unfinished-test-card {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.unfinished-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.unfinished-info i { color: #ffc107; font-size: 1.5rem; }
.unfinished-text { font-weight: 600; color: #856404; }

.unfinished-btn {
    background: #ffc107;
    color: #856404;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.unfinished-btn:hover {
    background: #ffb300;
    transform: translateY(-2px);
}

.test-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.test-stat-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    border: 1px solid var(--border-light);
}

.test-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.test-stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
}

/* =============================================== */
/* TEST TİPİ PERFORMANSI - MOBİLDE 2 SÜTUN */
/* =============================================== */

.test-type-section {
    margin-bottom: 25px;
}

.test-type-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.test-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.test-type-card {
    background: #f8f9fa;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px;
}

.test-type-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.test-type-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-bottom: 8px;
}

.test-type-percent {
    font-weight: 700;
    color: var(--primary-color);
}

.test-type-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.test-type-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
    transition: width 0.3s;
}

/* =============================================== */
/* TEKRAR ZAMANI - MOBİLDE 2 SÜTUN */
/* =============================================== */

.review-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid var(--accent-color);
}

.review-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-stages {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.review-stage {
    text-align: center;
    padding: 12px 5px;
    background: white;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    cursor: help;
}

.stage-name { font-size: 0.7rem; color: var(--text-light); margin-bottom: 5px; }
.stage-count { font-size: 1.3rem; font-weight: 700; color: var(--primary-color); }
.stage-desc { font-size: 0.6rem; color: var(--text-light); }

/* =============================================== */
/* SÖZLÜK SEKMESİ */
/* =============================================== */

.words-search {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.words-search input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: 30px;
    font-size: 0.95rem;
    transition: border 0.2s;
}

.words-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.words-search button {
    padding: 12px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.words-search button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.words-stats-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
}

.words-stat-item {
    text-align: center;
    flex: 1;
}

.words-stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.words-stat-label {
    font-size: 0.7rem;
    color: var(--text-light);
    text-transform: uppercase;
}

.words-list {
    max-height: 450px;
    overflow-y: auto;
    border: 1px solid var(--border-light);
    border-radius: 12px;
}

.word-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.2s;
}

.word-item:last-child { border-bottom: none; }
.word-item:hover { background: #f8f9fa; }

.word-info { flex: 1; }
.word-original { font-weight: 600; color: var(--text-dark); margin-bottom: 4px; }
.word-translation { font-size: 0.9rem; color: var(--text-medium); }

.word-status {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1rem;
    cursor: help;
}

.word-status.mastered { color: #4CAF50; }
.word-status.learning { color: #ffc107; }

.empty-words {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.empty-words i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.3;
}

/* =============================================== */
/* GÖREVLER SEKMESİ */
/* =============================================== */

.tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.tasks-header h3 {
    font-size: 1.2rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tasks-header h3 i { color: var(--primary-color); }

.tasks-progress {
    text-align: right;
}

.tasks-progress span {
    font-size: 0.9rem;
    color: var(--text-medium);
    font-weight: 600;
}

.tasks-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.task-card {
    background: #f8f9fa;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
    position: relative;
    cursor: help;
}

.task-card.completed {
    background: rgba(76, 175, 80, 0.1);
    border-color: #4CAF50;
}

.task-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
    flex-shrink: 0;
}

.task-info { flex: 1; }
.task-name { font-size: 1rem; font-weight: 600; color: var(--text-dark); margin-bottom: 4px; }
.task-desc { font-size: 0.75rem; color: var(--text-light); margin-bottom: 8px; }

.task-progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-bar-small {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-color);
    border-radius: 3px;
    transition: width 0.3s;
}

.task-current {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    min-width: 35px;
}

.task-reward {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-color);
    background: rgba(230, 180, 80, 0.2);
    padding: 4px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

.task-check {
    color: #4CAF50;
    font-size: 1.2rem;
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
}

.task-card.completed .task-check { display: block; }

.daily-bonus {
    background: rgba(255, 193, 7, 0.1);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.bonus-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.bonus-info i { color: #ffc107; }
.bonus-arrow { color: var(--text-light); margin: 0 5px; }
.bonus-amount { font-weight: 700; color: #ffc107; }

.bonus-progress {
    flex: 1;
    min-width: 150px;
    height: 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.bonus-bar {
    height: 100%;
    background: linear-gradient(90deg, #ffc107, #ff9800);
    border-radius: 4px;
    transition: width 0.3s;
}

/* =============================================== */
/* TEST GÖRÜNÜMÜ - ANA SAYFADAN BAĞIMSIZ */
/* =============================================== */

/* Test modunda mobilde ana header'ı gizle */
@media (max-width: 768px) {
    body.test-mode .header-wrapper,
    body.test-mode .dictionary-header,
    body.test-mode .dictionary-tabs {
        display: none !important;
    }
}

#testView {
    background: var(--background-white);
    border-radius: 0;
    padding: 10px 15px 25px 15px;
    border: none;
    box-shadow: none;
    margin: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.test-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 0;
    padding: 5px 0 10px 0;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
    background: var(--background-white);
}

.test-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.test-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.test-progress span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(44, 85, 48, 0.1);
    padding: 4px 10px;
    border-radius: 30px;
    white-space: nowrap;
}

.test-progress-container {
    flex: 1;
    height: 6px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    min-width: 60px;
}

.test-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
}

.exit-test-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    font-size: 1.2rem;
    color: #333;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-left: 8px;
}

.exit-test-btn:hover {
    background: #e0e0e0;
    transform: scale(1.05);
}

.test-stats-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.test-stats-row .stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    background: #f8f9fa;
    white-space: nowrap;
}

.test-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    width: 100%;
}

/* Soru ve şıklar için ORTAK KAP */
.question-center {
    width: 100%;
    max-width: 600px;
    margin: auto;  /* Otomatik ortalama */
    padding: 0 15px;
}

/* Soru metni */
.question-text {
    font-size: 1.3rem;
    margin: 0 0 30px 0;  /* Üst:0, Alt:30px */
    color: var(--text-dark);
    font-weight: 600;
    text-align: center;
    width: 100%;
    line-height: 1.4;
}

/* Şıklar grid */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 15px;
    width: 100%;
    margin: 0;
    padding: 0;
}

.option-btn {
    padding: 20px 10px;
    border: 2px solid var(--border-light);
    border-radius: 16px;
    background: white;
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: center;
    min-width: 120px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.option-btn:hover {
    border-color: var(--accent-color);
    background: rgba(230, 180, 80, 0.05);
    transform: translateY(-2px);
}

.option-btn.correct {
    background: #4CAF50 !important;
    border-color: #4CAF50 !important;
    color: white !important;
    animation: correctPulse 0.5s ease;
}

.option-btn.wrong {
    background: #f44336 !important;
    border-color: #f44336 !important;
    color: white !important;
    animation: wrongShake 0.3s ease;
}

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

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Yazma testi */
.writing-question {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
}

.flash-word-box {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 25px;
    border-radius: 16px;
    font-size: 28px;
    font-weight: bold;
    margin: 10px 0 25px;
    text-align: center;
}

.show-word-btn {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.writing-input {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 1rem;
    text-align: center;
    margin: 10px 0 20px;
}

.submit-writing-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
}

/* Dinleme testi */
.listen-btn {
    background: linear-gradient(135deg, var(--accent-color), #ffc107);
    color: var(--text-dark);
    padding: 16px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin: 10px auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: fit-content;
}

/* =============================================== */
/* MOBİL DÜZENLEMELER */
/* =============================================== */

@media (max-width: 768px) {
    /* Test tipi performansı 2 sütun */
    .test-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Tekrar zamanı 2 sütun */
    .review-stages {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* Test header mobil düzeni */
    .test-header {
        gap: 8px;
    }
    
    .test-progress span {
        font-size: 0.8rem;
        padding: 3px 8px;
    }
    
    .test-stats-row .stat-item {
        padding: 3px 8px;
        font-size: 0.8rem;
    }
    
    .exit-test-btn {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
    
    /* Soru ve cevaplar - dikey ortalama */
    .test-content {
        justify-content: center;  /* Mobilde de ortada */
        padding: 0;
    }
    .question-text {
        font-size: 1.2rem;
        margin-bottom: 25px;
    }
    
    .options-grid {
        gap: 10px;
    }
    
    .option-btn {
        padding: 18px 8px;
        font-size: 1rem;
        min-width: 110px;
    }
    
    .flash-word-box {
        font-size: 24px;
        padding: 20px;
        margin: 5px 0 20px;
    }
}

@media (max-width: 480px) {
    .test-progress span {
        font-size: 0.75rem;
        padding: 2px 6px;
    }
    
    .test-stats-row .stat-item {
        padding: 2px 6px;
        font-size: 0.75rem;
    }
    
    .exit-test-btn {
        width: 34px;
        height: 34px;
        font-size: 1.1rem;
    }
    
    .question-text {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }
    
    .options-grid {
        gap: 8px;
    }
    
    .option-btn {
        padding: 16px 5px;
        font-size: 0.9rem;
        min-width: 100px;
    }
    
    .flash-word-box {
        font-size: 22px;
        padding: 15px;
    }
    
    .listen-btn {
        width: 100%;
        padding: 14px;
    }
}

/* =============================================== */
/* TEST SONUÇ MODAL */
/* =============================================== */

.test-result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10001;
    display: none;
    justify-content: center;
    align-items: center;
}

.test-result-modal.active { display: flex; }

.test-result-content {
    background: white;
    border-radius: 24px;
    padding: 35px 30px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.test-result-content h3 {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    font-weight: 700;
}

.result-stats { margin-bottom: 25px; }

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-light);
    font-size: 1rem;
}

.result-item.highlight {
    background: rgba(255, 193, 7, 0.15);
    margin: 15px -10px;
    padding: 15px 10px;
    border-radius: 12px;
    border-bottom: none;
    font-weight: 700;
    font-size: 1.1rem;
}

.result-value { font-weight: 700; color: var(--primary-color); }
.result-item.highlight .result-value { color: #ffc107; font-size: 1.3rem; }

.result-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.result-btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.result-btn.primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(44, 85, 48, 0.3);
}

.result-btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(44, 85, 48, 0.4);
}

.result-btn.secondary {
    background: #f8f9fa;
    color: var(--text-medium);
    border: 1px solid var(--border-light);
}

.result-btn.secondary:hover { background: #e9ecef; }

/* =============================================== */
/* LİMİT UYARI MODAL */
/* =============================================== */

.limit-warning-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 10002;
    display: none;
    justify-content: center;
    align-items: center;
}

.limit-warning-content {
    background: white;
    border-radius: 24px;
    padding: 30px;
    width: 90%;
    max-width: 350px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.limit-warning-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.limit-warning-content h3 {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.limit-warning-content p {
    color: var(--text-medium);
    margin-bottom: 20px;
}

.limit-warning-points {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.limit-warning-actions {
    display: flex;
    gap: 10px;
}

.limit-warning-btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.limit-warning-btn.cancel {
    background: #f8f9fa;
    color: var(--text-medium);
    border: 1px solid var(--border-light);
}

.limit-warning-btn.buy {
    background: var(--accent-color);
    color: var(--text-dark);
}

/* =============================================== */
/* RESPONSIVE - GENEL */
/* =============================================== */

@media (max-width: 768px) {
    .container { padding: 15px; }
    
    .header-stats { gap: 15px; }
    .stat-value { font-size: 1.3rem; }
    
    .header-points-limit { gap: 10px; }
    .points-box, .limit-box, .streak-box { padding: 6px 12px; }
    .points-value { font-size: 1rem; }
    
    .tab-btn { padding: 10px; font-size: 0.9rem; }
    .tab-btn span { display: none; }
    .tab-btn i { font-size: 1.2rem; margin: 0; }
    
    .tasks-grid { grid-template-columns: 1fr; }
    .test-type-grid { grid-template-columns: 1fr; }
    .options-grid { grid-template-columns: 1fr; }
    
    .unfinished-test-card { flex-direction: column; align-items: flex-start; }
    .unfinished-btn { width: 100%; }
    
    .result-actions { flex-direction: column; }
    .limit-warning-actions { flex-direction: column; }
}

@media (max-width: 480px) {
    .flash-word-box { font-size: 28px; padding: 20px; }
    .listen-btn { width: 100%; padding: 14px; }
    .test-result-content { padding: 25px 20px; }
    .test-result-content h3 { font-size: 1.3rem; }
}

/* Dark mode */
body.dark-mode {
    background: #1a1a1a;
    --background-white: #2a2a2a;
    --border-light: #404040;
    --text-dark: #f0f0f0;
    --text-medium: #ccc;
    --text-light: #aaa;
}

body.dark-mode .dictionary-header,
body.dark-mode .tab-content,
body.dark-mode .task-card,
body.dark-mode .test-stat-card,
body.dark-mode .test-type-card,
body.dark-mode .review-stage,
body.dark-mode .word-item,
body.dark-mode #testView,
body.dark-mode .test-result-content,
body.dark-mode .limit-warning-content {
    background: #2a2a2a;
}

body.dark-mode .task-card.completed { background: rgba(76, 175, 80, 0.2); }
body.dark-mode .option-btn { background: #333; border-color: #444; color: #e0e0e0; }
body.dark-mode .option-btn:hover { background: #3a3a3a; }
body.dark-mode .writing-input { background: #333; border-color: #444; color: #e0e0e0; }

/* =============================================== */
/* KUYRUK İSTATİSTİKLERİ (HEADER'DA) */
/* =============================================== */

.queue-info {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.queue-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border-light);
}

.queue-overdue {
    color: #f44336;
    background: rgba(244, 67, 54, 0.1);
    padding: 3px 8px;
    border-radius: 20px;
}

.queue-today {
    color: #ff9800;
    background: rgba(255, 152, 0, 0.1);
    padding: 3px 8px;
    border-radius: 20px;
}

.queue-new {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    padding: 3px 8px;
    border-radius: 20px;
}

@media (max-width: 768px) {
    .queue-badge {
        font-size: 0.7rem;
        padding: 3px 8px;
        gap: 4px;
    }
    
    .queue-overdue, .queue-today, .queue-new {
        padding: 2px 5px;
    }
}

body.dark-mode .queue-badge {
    background: #2a2a2a;
    border-color: #404040;
}

/* =============================================== */
/* SEVİYE DETAY POPUP */
/* =============================================== */

.level-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
}

.level-popup.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.level-popup-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

.level-popup-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.level-popup-header h3 {
    margin: 0;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.level-popup-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.level-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.level-popup-body {
    padding: 20px;
    max-height: calc(80vh - 70px);
    overflow-y: auto;
}

.level-requirement-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    border: 1px solid var(--border-light);
}

.level-requirement-item:last-child {
    margin-bottom: 0;
}

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

.req-name {
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.req-name i {
    color: var(--primary-color);
    width: 20px;
}

.req-values {
    font-weight: 700;
    color: var(--primary-color);
}

.req-bar-container {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.req-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    transition: width 0.3s;
}

.req-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: right;
}

body.dark-mode .level-popup-content {
    background: #2a2a2a;
}

body.dark-mode .level-requirement-item {
    background: #333;
    border-color: #444;
}

/* =============================================== */
/* SEVİYE TİMELİNE */
/* =============================================== */

.level-timeline-container {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 20px;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
}

.level-timeline {
    display: flex;
    align-items: center;
    min-width: min-content;
    gap: 8px;
    padding: 5px 5px;
    background: #f8f9fa;
    border-radius: 12px;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    text-align: center;
    padding: 10px 12px;
    border-radius: 10px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.timeline-item.prev {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid #4CAF50;
}

.timeline-item.current {
    background: rgba(230, 180, 80, 0.15);
    border: 2px solid var(--accent-color);
    transform: scale(1.05);
}

.timeline-item.next {
    background: rgba(33, 150, 243, 0.1);
    border: 1px solid #2196F3;
}

.timeline-icon {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.timeline-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.timeline-arrow {
    color: var(--text-light);
    font-size: 1.5rem;
    font-weight: 300;
}

.level-timeline-container::-webkit-scrollbar {
    height: 4px;
}

.level-timeline-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.level-timeline-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

body.dark-mode .level-timeline {
    background: #2a2a2a;
}

body.dark-mode .timeline-item {
    background: #333;
}