* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

@font-face {
    font-family: 'Arakom';
    src: url('fonts/Arakom.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary: #8ba3c9;
    --primary-dark: #7a92b8;
    --secondary: #b8c9d4;
    --danger: #e8b8b8;
    --warning: #e8dcb8;
    --dark: #2d3748;
    --light: #f7fafc;
    --gray: #718096;
    --white: #ffffff;
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-premium: 0 20px 40px rgba(0,0,0,0.2), inset 0 2px 5px rgba(255,255,255,0.5);
    --gradient: linear-gradient(135deg, #e2e8f0 0%, #edf2f7 100%);
}

body {
    font-family: 'Inter', sans-serif;
    background: #121212;
    width: 100%; height: 100vh; height: 100dvh;
    overflow: hidden; position: fixed; top: 0; left: 0; margin: 0; padding: 0;
}

.loading-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #121212; display: flex; justify-content: center; align-items: center;
    z-index: 9999; transition: opacity 0.5s ease;
}

.loader { text-align: center; color: white; }
.spinner {
    width: 50px; height: 50px; border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white; border-radius: 50%;
    animation: spin 1s linear infinite; margin: 0 auto 20px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* YENİ: Etkileyici Karşılama Ekranı Stilleri */
.intro-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #121212; display: flex; flex-direction: column;
    justify-content: center; align-items: center; 
    z-index: 9998; 
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.intro-content { text-align: center; color: white; animation: fadeInUp 0.8s ease; padding: 20px; }

/* Büyüyen, Nefes Alan ve Işık Saçan Logo */
.intro-logo { 
    width: 160px; height: 160px; 
    border-radius: 35px; margin-bottom: 30px; 
    object-fit: cover; 
    animation: floatLogo 4s ease-in-out infinite; 
}
.intro-icon { 
    font-size: 7rem; color: #10b981; margin-bottom: 25px; 
    display: inline-block; animation: floatLogo 4s ease-in-out infinite; 
}

@keyframes floatLogo {
    0% { transform: translateY(0px) scale(1); box-shadow: 0 10px 25px rgba(0,0,0,0.6), 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { transform: translateY(-15px) scale(1.05); box-shadow: 0 25px 40px rgba(0,0,0,0.5), 0 0 35px 10px rgba(16, 185, 129, 0.3); }
    100% { transform: translateY(0px) scale(1); box-shadow: 0 10px 25px rgba(0,0,0,0.6), 0 0 0 0 rgba(16, 185, 129, 0.4); }
}

/* Sahne Işığı (Spotlight) Efektli Başlık */
.intro-content h1 { 
    font-family: 'Inter', sans-serif; 
    font-size: 2.6rem; 
    margin-bottom: 10px; 
    font-weight: 900; 
    letter-spacing: 2px;
    background: linear-gradient(120deg, #4a5568 20%, #ffffff 45%, #ffffff 55%, #4a5568 80%);
    background-size: 200% auto;
    color: #fff;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: spotlightShine 3s linear infinite;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

@keyframes spotlightShine {
    0% { background-position: -100% center; }
    100% { background-position: 200% center; }
}

.intro-content p { color: #a0aec0; margin-bottom: 45px; font-size: 1.15rem; }

.start-btn { 
    background: #10b981; color: white; padding: 18px 45px; font-size: 1.25rem; border-radius: 50px; 
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3); display: inline-flex; align-items: center; 
    border: none; font-weight: 600; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; 
}
.start-btn:hover { box-shadow: 0 15px 25px rgba(16, 185, 129, 0.5); }
.start-btn:active { transform: scale(0.95); }

.app-container {
    width: 100%; height: 100vh; height: 100dvh;
    display: flex; flex-direction: column; position: relative;
}

.top-bar {
    background: #1e1e1e; backdrop-filter: blur(20px); padding: 10px 16px;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); z-index: 100; flex-shrink: 0;
}
@media (min-width: 768px) { .top-bar { padding: 12px 20px; } }

.logo { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 600; color: #ffffff; }
@media (min-width: 768px) { .logo { font-size: 1rem; } }
.logo i { font-size: 1.1rem; color: #ffffff; }
@media (min-width: 768px) { .logo i { font-size: 1.3rem; } }

.stats-mini { display: flex; align-items: center; gap: 10px; }
@media (min-width: 768px) { .stats-mini { gap: 12px; } }

.stat-badge {
    display: flex; align-items: center; gap: 4px;
    font-size: 0.7rem; font-weight: 600; color: #ffffff;
    background: rgba(255, 255, 255, 0.15); padding: 4px 8px; border-radius: 20px;
}
@media (min-width: 768px) { .stat-badge { font-size: 0.8rem; padding: 5px 10px; gap: 5px; } }
.stat-badge i { font-size: 0.7rem; color: #ffffff; }
@media (min-width: 768px) { .stat-badge i { font-size: 0.8rem; } }

.favorite-top-btn, .fullscreen-top-btn {
    background: rgba(255, 255, 255, 0.15); border: none;
    width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    color: #ffffff; transition: all 0.2s ease;
}
.favorite-top-btn { color: #ff6b6b; }
@media (min-width: 768px) {
    .favorite-top-btn, .fullscreen-top-btn { width: 36px; height: 36px; font-size: 1.1rem; }
}
.favorite-top-btn.active { background: #10b981; color: white; }
.favorite-top-btn:active, .fullscreen-top-btn:active { transform: scale(0.95); }

.main-content {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    position: relative; overflow: hidden; min-height: 0; padding: 2px 0;
}
@media (min-width: 768px) { .main-content { padding: 10px 0; } }

.card-wrapper { width: 100%; display: flex; align-items: center; justify-content: center; padding: 0; }
.card-container { perspective: 2000px; width: 100%; max-width: 100%; position: relative; cursor: pointer; }

.flashcard {
    position: relative; width: 100%; aspect-ratio: 2 / 1.2;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@media (max-width: 768px) { 
    .card-container { width: 94%; margin: 0 auto; }
    .flashcard { aspect-ratio: 3 / 4.4; }
}
.flashcard.flipped { transform: rotateY(180deg); }

.card-front, .card-back {
    position: absolute; width: 100%; height: 100%;
    backface-visibility: hidden; 
    border-radius: 40px;
    padding: 20px; display: flex; flex-direction: column; justify-content: center;
    box-shadow: var(--shadow-premium);
    border: 1px solid rgba(255, 255, 255, 0.4); 
}
@media (min-width: 768px) { 
    .card-front, .card-back { 
        border-radius: 50px;
        padding: 35px; 
    } 
}

.card-front { background: linear-gradient(135deg, #fdf6e3 0%, #e4d5b7 100%); }

.card-back {
    background: linear-gradient(135deg, #2b5876 0%, #4e4376 100%);
    transform: rotateY(180deg); color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header {
    position: absolute; top: 16px; left: 16px; right: 16px;
    display: flex; justify-content: space-between; font-size: 0.7rem;
}
@media (min-width: 768px) { .card-header { top: 24px; left: 24px; right: 24px; font-size: 0.85rem; } }

.card-number, .card-category {
    padding: 5px 12px; border-radius: 30px; font-weight: 600; color: white; font-size: 0.65rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
@media (min-width: 768px) { .card-number, .card-category { padding: 6px 16px; font-size: 0.75rem; } }
.card-number { background: #4a5568; }
.card-category { background: #a0aec0; color: #1a202c; }
.card-back .card-category { background: rgba(255,255,255,0.2); color: white; }

.card-word {
    font-family: 'Arakom', 'Cairo', 'Inter', sans-serif;
    font-size: 2.8rem; font-weight: 500; text-align: center;
    color: #1a202c; margin: 10px 0; direction: rtl; line-height: 1.3;
    letter-spacing: 1px; word-break: break-word; text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}
@media (min-width: 768px) { .card-word { font-size: 4.5rem; margin: 15px 0; } }

.card-example {
    font-family: 'Arakom', 'Cairo', 'Inter', sans-serif;
    font-size: 1.1rem; font-weight: 400; text-align: center; color: #4a5568;
    direction: rtl; margin-top: 10px; line-height: 1.5; word-break: break-word;
}
@media (min-width: 768px) { .card-example { font-size: 1.6rem; margin-top: 20px; } }

.card-meaning {
    font-family: 'Inter', sans-serif; font-size: 1.8rem; font-weight: 600; text-align: center; 
    margin: 10px 0; line-height: 1.3; color: white; text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
@media (min-width: 768px) { .card-meaning { font-size: 3rem; margin: 15px 0; } }

.card-example-meaning {
    font-size: 0.95rem; text-align: center; opacity: 0.9; margin-top: 10px; line-height: 1.5; color: white;
}
@media (min-width: 768px) { .card-example-meaning { font-size: 1.2rem; margin-top: 20px; } }

.dual-view-content {
    display: none; border-top: 2px dashed rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.5); border-radius: 20px;
    margin-top: 15px; padding: 15px; animation: fadeIn 0.4s ease;
}
.dual-meaning-text { color: var(--dark); text-shadow: none; margin: 0; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.progress-bar-container { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: rgba(0, 0, 0, 0.15); }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary)); width: 0%; transition: width 0.3s ease; }

.bottom-nav {
    background: #1e1e1e; backdrop-filter: blur(20px); padding: 8px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05); display: flex; justify-content: space-between; align-items: center; z-index: 100; flex-shrink: 0;
}
@media (min-width: 768px) { .bottom-nav { padding: 10px 20px; } }

.nav-controls { display: flex; align-items: center; gap: 10px; }
@media (min-width: 768px) { .nav-controls { gap: 15px; } }

.nav-btn, .icon-btn {
    background: rgba(255, 255, 255, 0.15); color: white; border: none;
    width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
    font-size: 0.9rem; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center;
}
.icon-btn { font-size: 1rem; }
@media (min-width: 768px) {
    .nav-btn { width: 44px; height: 44px; font-size: 1.1rem; }
    .icon-btn { width: 44px; height: 44px; font-size: 1.2rem; }
}
.nav-btn:active, .icon-btn:active { transform: scale(0.95); }
.icon-btn.active { background: #10b981; color: white; }

.current-info {
    font-size: 0.8rem; font-weight: 600; color: #ffffff; background: rgba(255, 255, 255, 0.1);
    padding: 5px 12px; border-radius: 30px; min-width: 65px; text-align: center;
}
@media (min-width: 768px) { .current-info { font-size: 0.95rem; padding: 6px 16px; min-width: 80px; } }
.action-icons { display: flex; gap: 8px; }
@media (min-width: 768px) { .action-icons { gap: 12px; } }

.app-footer {
    background: #121212; padding: 6px 12px; text-align: center; font-size: 0.6rem; 
    color: #ffffff; 
    border-top: 1px solid rgba(255, 255, 255, 0.05); flex-shrink: 0;
}
@media (min-width: 768px) { .app-footer { padding: 8px 16px; font-size: 0.7rem; } }
.footer-content { display: flex; justify-content: center; align-items: center; gap: 4px; flex-wrap: wrap; }

.app-footer a { 
    color: #ffffff; 
    text-decoration: none; 
    font-weight: 600; 
    transition: all 0.2s ease; 
}
.app-footer a:hover { 
    color: #10b981; 
    text-decoration: underline; 
}

.quick-actions { display: flex; gap: 12px; margin-bottom: 20px; }
@media (max-width: 768px) { .quick-actions { flex-direction: column; gap: 8px; } }
.quick-action-btn {
    flex: 1; background: var(--gradient); border: none; padding: 10px; border-radius: 40px;
    font-size: 0.8rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s ease; color: #333;
}
@media (min-width: 768px) { .quick-action-btn { padding: 12px; font-size: 0.85rem; } }
.quick-action-btn:active { transform: scale(0.97); }
.quick-action-btn.active { background: #10b981; color: white; }
.settings-divider { height: 1px; background: rgba(0, 0, 0, 0.1); margin: 15px 0; }

.settings-modal {
    display: none; position: fixed; bottom: 70px; right: 10px; left: 10px; background: white;
    border-radius: 24px; box-shadow: var(--shadow-xl); z-index: 1001; animation: slideUp 0.3s ease; overflow: hidden;
}
@media (min-width: 768px) { .settings-modal { bottom: 80px; right: 20px; left: auto; width: 360px; border-radius: 28px; } }
@keyframes slideUp { from { transform: translateY(100px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.settings-header { padding: 12px 16px; background: var(--gradient); color: #333; display: flex; justify-content: space-between; align-items: center; }
@media (min-width: 768px) { .settings-header { padding: 15px 20px; } }
.settings-header h3 { font-size: 0.9rem; font-weight: 600; }
@media (min-width: 768px) { .settings-header h3 { font-size: 1rem; } }
.close-settings { background: none; border: none; color: #333; font-size: 1.4rem; cursor: pointer; line-height: 1; }
@media (min-width: 768px) { .close-settings { font-size: 1.5rem; } }
.settings-body { padding: 16px; max-height: 55vh; overflow-y: auto; }
@media (min-width: 768px) { .settings-body { padding: 20px; max-height: 60vh; } }
.setting-item { margin-bottom: 16px; }
@media (min-width: 768px) { .setting-item { margin-bottom: 18px; } }
.setting-item label { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 600; color: var(--dark); margin-bottom: 8px; }
@media (min-width: 768px) { .setting-item label { gap: 10px; font-size: 0.85rem; margin-bottom: 10px; } }
.setting-item input[type="range"] { width: 100%; margin: 6px 0; accent-color: #3b82f6; }
.setting-value { font-size: 0.75rem; color: var(--gray); text-align: right; }
@media (min-width: 768px) { .setting-value { font-size: 0.8rem; } }

.settings-select {
    width: 100%; padding: 8px 12px; border-radius: 8px; border: 1px solid rgba(0, 0, 0, 0.1);
    background: var(--light); font-family: inherit; font-size: 0.85rem; color: var(--dark);
    margin: 6px 0; outline: none; cursor: pointer;
}
.checkbox-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.checkbox-item label { margin-bottom: 0; }
.checkbox-item input[type="checkbox"] { width: 18px; height: 18px; accent-color: #10b981; cursor: pointer; }

.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); z-index: 1000; backdrop-filter: blur(2px); }

.toast {
    position: fixed; bottom: 70px; left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, 0.9);
    color: white; padding: 6px 14px; border-radius: 50px; font-size: 0.75rem; z-index: 2000; animation: fadeInUp 0.3s ease; white-space: nowrap;
}
@media (min-width: 768px) { .toast { bottom: 80px; padding: 8px 18px; font-size: 0.85rem; } }
@media (max-width: 768px) { .toast { white-space: normal; max-width: 80%; text-align: center; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateX(-50%) translateY(20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

body:fullscreen .top-bar, body:fullscreen .bottom-nav, body:fullscreen .app-footer { background: rgba(0, 0, 0, 0.9); }
body:fullscreen .flashcard { max-height: none; }

.swipe-indicator { display: none; }
@media (max-width: 768px) {
    .swipe-indicator {
        display: block; position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.5); color: white; padding: 4px 10px; border-radius: 30px;
        font-size: 0.6rem; z-index: 15; pointer-events: none; opacity: 0.6; white-space: nowrap;
    }
}