@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-dark: #0f172a;
    --surface: #1e293b;
    --surface-hover: #334155;
    --primary: #10b981;
    --primary-hover: #059669;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --accent: #8b5cf6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
}

.view { display: none; width: 100%; }
.view.active { display: block; }

/* ----------- LANDING PAGE ----------- */
#auth-view { background: var(--bg-dark); }

/* NAVBAR */
.landing-nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(15,23,42,0.92); backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.landing-nav-inner {
    max-width: 1100px; margin: 0 auto;
    padding: 16px 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.landing-logo { font-size: 1.4rem; font-weight: 800; color: white; letter-spacing: -0.5px; }
.landing-logo span { color: var(--primary); }
.landing-nav-actions { display: flex; gap: 10px; }
.landing-login-btn {
    background: transparent; border: 1px solid var(--border);
    color: var(--text-muted); padding: 9px 18px; border-radius: 8px;
    cursor: pointer; font-size: 0.9rem; font-weight: 600; transition: 0.2s;
}
.landing-login-btn:hover { color: white; border-color: white; }
.landing-cta-btn {
    background: var(--primary); border: none; color: white;
    padding: 9px 18px; border-radius: 8px; cursor: pointer;
    font-size: 0.9rem; font-weight: 700; transition: 0.2s;
    white-space: nowrap;
}
.landing-cta-btn:hover { background: var(--primary-hover); }

/* HERO */
.landing-hero {
    max-width: 800px; margin: 0 auto;
    padding: 90px 24px 60px; text-align: center;
}
.hero-badge {
    display: inline-block; background: rgba(16,185,129,0.12);
    border: 1px solid rgba(16,185,129,0.3); color: var(--primary);
    padding: 6px 16px; border-radius: 20px; font-size: 0.85rem; font-weight: 600;
    margin-bottom: 28px;
}
.hero-title {
    font-size: clamp(2.2rem, 6vw, 3.8rem); font-weight: 800;
    line-height: 1.15; margin-bottom: 20px; letter-spacing: -1px;
}
.hero-gradient {
    background: linear-gradient(135deg, #6366f1, #10b981);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub {
    font-size: 1.05rem; color: var(--text-muted); line-height: 1.7;
    margin-bottom: 36px; max-width: 600px; margin-left: auto; margin-right: auto;
}
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.hero-main-btn {
    background: linear-gradient(135deg, #6366f1, #10b981); border: none; color: white;
    padding: 16px 32px; border-radius: 12px; cursor: pointer;
    font-size: 1rem; font-weight: 700; transition: 0.2s; letter-spacing: 0.3px;
    box-shadow: 0 4px 24px rgba(99,102,241,0.35);
}
.hero-main-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(99,102,241,0.5); }
.hero-main-btn.large { padding: 18px 40px; font-size: 1.1rem; }
.hero-secondary-btn {
    display: inline-flex; align-items: center;
    background: transparent; border: 1px solid var(--border);
    color: var(--text-muted); padding: 16px 28px; border-radius: 12px;
    cursor: pointer; font-size: 1rem; font-weight: 600; text-decoration: none; transition: 0.2s;
}
.hero-secondary-btn:hover { color: white; border-color: white; }
.hero-stats {
    display: flex; gap: 24px; justify-content: center; flex-wrap: wrap;
}
.hero-stat {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.85rem; color: var(--text-muted); font-weight: 500;
}

/* APP MOCKUP */
.landing-mockup-section {
    display: flex; justify-content: center; padding: 20px 24px 60px;
}
.mockup-phone {
    width: 260px; background: #1e293b;
    border-radius: 32px; padding: 20px;
    border: 6px solid #334155;
    box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
}
.mockup-screen { display: flex; flex-direction: column; gap: 10px; }
.mock-header { display: flex; align-items: center; justify-content: space-between; }
.mock-logo { font-size: 0.8rem; font-weight: 800; color: var(--primary); }
.mock-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:0.4} }
.mock-timer {
    text-align: center; font-size: 2.8rem; font-weight: 800;
    color: white; padding: 16px 0; letter-spacing: -2px;
    border: 3px solid var(--primary); border-radius: 50%;
    width: 110px; height: 110px; display: flex; align-items: center;
    justify-content: center; margin: 8px auto;
    box-shadow: 0 0 20px rgba(16,185,129,0.3);
}
.mock-label { text-align: center; font-size: 0.75rem; color: var(--primary); font-weight: 600; }
.mock-users { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.mock-user {
    background: #0f172a; border-radius: 8px; padding: 7px 10px;
    font-size: 0.72rem; color: var(--text-muted); border: 1px solid var(--border);
}

/* FEATURES */
.landing-features {
    max-width: 1100px; margin: 0 auto;
    padding: 60px 24px;
}
.landing-section-label {
    text-align: center; font-size: 0.75rem; font-weight: 700;
    letter-spacing: 0.15em; color: var(--primary); margin-bottom: 12px;
}
.landing-section-title {
    text-align: center; font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800; margin-bottom: 48px; letter-spacing: -0.5px;
}
.landing-section-sub {
    text-align: center; color: var(--text-muted);
    font-size: 1rem; margin-bottom: 40px; max-width: 560px;
    margin-left: auto; margin-right: auto;
}
.features-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px;
}
.feature-card {
    background: #1e293b; border: 1px solid var(--border);
    border-radius: 16px; padding: 28px 24px; transition: 0.2s;
}
.feature-card:hover { border-color: #6366f1; transform: translateY(-3px); box-shadow: 0 8px 30px rgba(99,102,241,0.15); }
.feature-icon { font-size: 2rem; margin-bottom: 14px; }
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; }

/* HOW IT WORKS */
.landing-how {
    max-width: 900px; margin: 0 auto; padding: 60px 24px;
}
.steps-row {
    display: flex; align-items: center; justify-content: center;
    gap: 16px; flex-wrap: wrap;
}
.step-card {
    flex: 1; min-width: 200px; max-width: 260px;
    background: #1e293b; border: 1px solid var(--border);
    border-radius: 16px; padding: 28px 20px; text-align: center;
}
.step-num {
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #10b981);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; font-weight: 800; margin: 0 auto 16px;
}
.step-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.step-card p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }
.step-arrow { font-size: 1.8rem; color: var(--border); flex-shrink: 0; }

/* FREE FOREVER */
.landing-free {
    padding: 60px 24px; display: flex; justify-content: center;
}
.free-card {
    background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(16,185,129,0.08));
    border: 1px solid rgba(99,102,241,0.3); border-radius: 24px;
    padding: 56px 48px; max-width: 640px; width: 100%; text-align: center;
}
.free-badge {
    display: inline-block; background: rgba(16,185,129,0.15);
    border: 1px solid rgba(16,185,129,0.3); color: var(--primary);
    padding: 6px 16px; border-radius: 20px; font-size: 0.8rem; font-weight: 700;
    margin-bottom: 24px; letter-spacing: 0.05em;
}
.free-card h2 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; line-height: 1.2; }
.free-card > p { color: var(--text-muted); margin-bottom: 28px; }
.free-list {
    list-style: none; text-align: left; display: inline-block;
    margin-bottom: 32px;
}
.free-list li { padding: 7px 0; font-size: 0.95rem; color: #cbd5e1; }

/* MOBİL KURULUM */
.landing-mobile {
    max-width: 900px; margin: 0 auto; padding: 60px 24px;
}
.install-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.install-card {
    background: #1e293b; border: 1px solid var(--border);
    border-radius: 16px; padding: 28px 24px;
}
.install-icon { font-size: 2.4rem; margin-bottom: 14px; }
.install-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; }
.install-steps { padding-left: 20px; }
.install-steps li { font-size: 0.875rem; color: var(--text-muted); padding: 5px 0; line-height: 1.5; }
.install-steps strong { color: white; }

/* SON CTA */
.landing-final-cta {
    padding: 80px 24px; text-align: center;
    background: linear-gradient(180deg, transparent, rgba(99,102,241,0.06));
}
.landing-final-cta h2 { font-size: clamp(1.8rem, 5vw, 3rem); font-weight: 800; margin-bottom: 14px; line-height: 1.2; }
.landing-final-cta p { color: var(--text-muted); font-size: 1rem; margin-bottom: 36px; }

/* FOOTER */
.landing-footer {
    padding: 24px; text-align: center;
    border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center; gap: 24px;
    color: var(--text-muted); font-size: 0.85rem; flex-wrap: wrap;
}

/* AUTH MODAL */
.auth-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.85); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; padding: 20px;
}
.auth-modal-overlay.hidden { display: none; }
.auth-card {
    background-color: var(--surface); position: relative;
    padding: 40px; border-radius: var(--radius);
    width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    text-align: center;
}
.auth-modal-close {
    position: absolute; top: 16px; right: 16px;
    background: none; border: none; color: var(--text-muted);
    font-size: 1.2rem; cursor: pointer; transition: 0.2s;
}
.auth-modal-close:hover { color: white; }
.logo { font-weight: 700; font-size: 2rem; margin-bottom: 8px; }
.logo span { color: var(--primary); }
.subtitle { color: var(--text-muted); margin-bottom: 32px; }

/* PWA POPUP */
.pwa-popup {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: #1e293b; border: 1px solid var(--border); border-radius: 16px;
    padding: 16px 20px; max-width: 360px; width: calc(100% - 32px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4); z-index: 999;
    display: flex; flex-direction: column; gap: 12px;
}
.pwa-popup.hidden { display: none; }
.pwa-content { display: flex; align-items: center; gap: 12px; }
.pwa-content span { font-size: 2rem; flex-shrink: 0; }
.pwa-content strong { display: block; font-size: 0.95rem; margin-bottom: 4px; }
.pwa-content p { font-size: 0.8rem; color: var(--text-muted); margin: 0; }
.pwa-install-btn {
    background: var(--primary); border: none; color: white;
    border-radius: 10px; padding: 10px; font-weight: 700;
    cursor: pointer; font-size: 0.9rem; transition: 0.2s;
}
.pwa-install-btn:hover { background: var(--primary-hover); }
.pwa-close {
    position: absolute; top: 10px; right: 12px;
    background: none; border: none; color: var(--text-muted);
    font-size: 1rem; cursor: pointer;
}

/* ----------- AUTH ----------- */

.input-group { text-align: left; margin-bottom: 16px; }
.input-group label { display: block; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-muted); }

input[type="text"], input[type="password"], input[type="email"], input[type="number"], select {
    width: 100%; padding: 12px;
    background-color: #0f172a; border: 1px solid var(--border);
    border-radius: 8px; color: white; font-size: 1rem;
    outline: none; transition: 0.3s;
}
input:focus, select:focus { border-color: var(--primary); }

.btn {
    width: 100%; padding: 12px; border: none;
    border-radius: 8px; font-size: 1rem; font-weight: 600;
    cursor: pointer; transition: 0.3s; color: white;
}
.btn.small-btn { padding: 8px 12px; font-size: 0.85rem; }
.btn.large-btn { padding: 16px; font-size: 1.1rem; }

.primary-btn { background-color: var(--primary); }
.primary-btn:hover { background-color: var(--primary-hover); }
.danger-btn { background-color: var(--danger); }
.danger-btn:hover { background-color: var(--danger-hover); }
.success-btn { background-color: var(--primary); box-shadow: 0 0 15px rgba(16,185,129,0.5); }
.outline-btn { background-color: transparent; border: 1px solid var(--border); }
.outline-btn:hover { background-color: var(--surface-hover); }

.error-msg { color: var(--danger); margin-top: 16px; font-size: 0.9rem; min-height: 20px; }
.success-msg { color: var(--primary); margin-top: 16px; font-size: 0.9rem; min-height: 20px; }

.auth-toggle { display: flex; gap: 10px; margin-bottom: 24px; }
.toggle-btn {
    flex: 1; padding: 10px;
    background: transparent; color: var(--text-muted);
    border: 1px solid var(--border); border-radius: 8px;
    cursor: pointer; transition: 0.3s; font-weight: 600;
}
.toggle-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ----------- APP LAYOUT ----------- */
#app-view { display: none; align-items: stretch; }
#app-view.active {
    display: grid;
    grid-template-columns: 300px 1fr 340px;
}

.panel {
    background-color: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* ----------- SOL SIDEBAR ----------- */
.profile-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.avatar {
    width: 56px; height: 56px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 1.4rem; font-weight: bold;
}
.badge {
    background-color: rgba(139,92,246,0.2); color: var(--accent);
    padding: 3px 8px; border-radius: 4px; font-size: 0.72rem; font-weight: 600;
    margin-top: 4px; display: inline-block;
}

.streak-bar {
    display: flex; align-items: center;
    background-color: #0f172a; border-radius: 10px;
    padding: 14px 16px; margin-bottom: 20px; gap: 12px;
}
.streak-item { display: flex; align-items: center; gap: 10px; flex: 1; }
.streak-icon { font-size: 1.5rem; line-height: 1; }
.streak-num { font-size: 1.5rem; font-weight: 700; color: var(--text-main); line-height: 1; }
.streak-lbl { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.streak-divider { width: 1px; height: 36px; background-color: var(--border); flex-shrink: 0; }

h2, h3 { color: var(--text-main); margin-bottom: 12px; }
h3 { font-size: 1rem; color: var(--text-muted); margin-bottom: 8px; }

.status-section, .goal-section, .total-stats {
    background-color: #0f172a; padding: 16px; border-radius: 8px; margin-bottom: 16px;
}
.status-section input { margin-bottom: 12px; }
.goal-input-row { display: flex; gap: 8px; margin-bottom: 12px; }
.progress-bar-container {
    width: 100%; height: 8px; background-color: var(--surface);
    border-radius: 4px; overflow: hidden; margin-bottom: 8px;
}
.progress-bar { height: 100%; background-color: var(--primary); width: 0%; transition: width 0.5s ease; }

/* ----------- DERS HEDEFLERİ ----------- */
.subject-goals-section {
    background-color: #0f172a; padding: 16px; border-radius: 8px; margin-bottom: 16px;
}
.subject-goals-header {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.subject-goals-header h3 { margin-bottom: 0; }
.icon-btn {
    background: none; border: none; cursor: pointer;
    font-size: 1rem; padding: 4px; border-radius: 6px;
    transition: background 0.2s;
}
.icon-btn:hover { background: var(--surface-hover); }

.subject-goal-item { margin-bottom: 10px; }
.subject-goal-row {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 4px;
}
.subject-goal-name { font-size: 0.8rem; font-weight: 500; }
.subject-goal-val { font-size: 0.75rem; color: var(--text-muted); }
.subject-goal-bar {
    height: 5px; background-color: var(--surface);
    border-radius: 3px; overflow: hidden;
}
.subject-goal-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }

/* Goals modal inputs */
.goal-modal-item {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px; gap: 12px;
}
.goal-modal-item label { font-size: 0.9rem; flex: 1; }
.goal-modal-item input {
    width: 70px; padding: 8px; text-align: center;
    font-size: 0.9rem;
}

/* ----------- TIMER ----------- */
.main-content {
    align-items: center; text-align: center;
    display: flex; flex-direction: column;
    justify-content: flex-start; overflow-y: auto; gap: 0;
}
.main-header {
    width: 100%; text-align: left; margin-bottom: 10px;
    display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.mini-stats-row { margin-bottom: 10px; width: 100%; }
.mini-stat-card { padding: 12px 8px; }
.mini-stat-icon { font-size: 1.2rem; margin-bottom: 4px; }
.mini-stat-value { font-size: 1.15rem; }
.quote-box { margin-bottom: 10px; padding: 10px 16px; min-height: 44px; width: 100%; box-sizing: border-box; }
.timer-container { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; }

.timer-circle { position: relative; width: 250px; height: 250px; }
.progress-ring { transform: rotate(-90deg); display: block; }
.progress-ring__circle {
    stroke: var(--primary);
    stroke-dasharray: 722; stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.3s;
}
.time-display {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3.8rem; font-weight: 700; letter-spacing: -2px;
    text-shadow: 0 0 20px rgba(16,185,129,0.4);
}
.timer-label {
    position: absolute; bottom: -30px; left: 0; right: 0;
    color: var(--text-muted); font-weight: 500; font-size: 0.9rem;
}
.timer-controls { width: 300px; display: flex; flex-direction: column; gap: 12px; }
.subject-select { font-size: 1rem; text-align: center; }

/* ----------- MÜZİK OYNATICI ----------- */
.music-widget { position: relative; }
.music-toggle-btn {
    background: var(--surface-hover); border: 1px solid var(--border);
    border-radius: 10px; padding: 8px 12px; cursor: pointer;
    font-size: 1.1rem; transition: 0.2s; color: white;
}
.music-toggle-btn:hover { background: var(--accent); border-color: var(--accent); }
.music-toggle-btn.playing { background: var(--accent); border-color: var(--accent); animation: pulse-music 2s infinite; }
@keyframes pulse-music {
    0%, 100% { box-shadow: 0 0 0 0 rgba(139,92,246,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(139,92,246,0); }
}

.music-panel {
    position: absolute; top: calc(100% + 10px); right: 0;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px; width: 220px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4); z-index: 100;
}
.music-panel-title { font-weight: 600; margin-bottom: 12px; font-size: 0.9rem; }
.music-tracks { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.track-btn {
    background: #0f172a; border: 1px solid var(--border);
    border-radius: 8px; padding: 8px 12px; cursor: pointer;
    color: var(--text-muted); font-size: 0.85rem; text-align: left;
    transition: 0.2s; width: 100%;
}
.track-btn:hover { border-color: var(--accent); color: var(--text-main); }
.track-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(139,92,246,0.1); }
.music-controls { display: flex; flex-direction: column; gap: 10px; }
.volume-row { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.volume-row input { flex: 1; accent-color: var(--accent); }

/* ----------- SAĞ SIDEBAR ----------- */
.right-sidebar { padding: 0; overflow: hidden; }
.tabs { display: flex; border-bottom: 1px solid var(--border); }
.tab {
    flex: 1; padding: 12px 4px; text-align: center;
    cursor: pointer; font-weight: 500; color: var(--text-muted);
    transition: 0.2s; font-size: 0.82rem;
}
.tab.active { color: var(--primary); border-bottom: 2px solid var(--primary); }
.live-dot {
    display: inline-block; width: 7px; height: 7px;
    background-color: var(--danger); border-radius: 50%; margin-left: 4px;
    box-shadow: 0 0 8px var(--danger); animation: blink 2s infinite;
}
@keyframes blink { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } }

.tab-content { display: none; padding: 16px; flex: 1; overflow-y: auto; }
.tab-content.active { display: block; }

.feed-item, .lb-item {
    background-color: rgba(15,23,42,0.6);
    padding: 12px; border-radius: 8px; margin-bottom: 10px;
    display: flex; gap: 12px; align-items: center;
}
.feed-item .feed-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background-color: var(--surface-hover);
    display: flex; justify-content: center; align-items: center;
    font-weight: bold; flex-shrink: 0;
}
.feed-info h4 { font-size: 0.9rem; margin-bottom: 3px; }
.feed-info p { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 2px; }
.feed-info .subject-tag { color: var(--accent); font-weight: 600; }

.lb-item { justify-content: space-between; }
.lb-rank { font-size: 1.1rem; font-weight: bold; color: var(--primary); width: 28px; flex-shrink: 0; }
.empty-state { text-align: center; color: var(--text-muted); margin-top: 24px; font-size: 0.9rem; }

/* ----------- ARKADAŞ SEKMESİ ----------- */
.friends-section-title {
    font-size: 0.78rem; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.08em;
    margin-bottom: 10px;
}
.user-card {
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(15,23,42,0.6); padding: 10px 12px;
    border-radius: 8px; margin-bottom: 8px; gap: 10px;
}
.user-card-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.user-card-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: bold; flex-shrink: 0;
}
.user-card-name { font-size: 0.85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card-hours { font-size: 0.72rem; color: var(--text-muted); }
.follow-btn {
    padding: 5px 10px; border-radius: 6px; border: none;
    font-size: 0.75rem; font-weight: 600; cursor: pointer;
    transition: 0.2s; flex-shrink: 0;
}
.follow-btn.follow { background: var(--primary); color: white; }
.follow-btn.follow:hover { background: var(--primary-hover); }
.follow-btn.unfollow { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.follow-btn.unfollow:hover { border-color: var(--danger); color: var(--danger); }

/* ----------- GEÇMİŞ ----------- */
.history-item {
    background-color: rgba(15,23,42,0.6);
    padding: 12px; border-radius: 8px; margin-bottom: 10px;
    display: flex; align-items: center; gap: 12px;
}
.history-subject-icon { font-size: 1.6rem; width: 36px; text-align: center; flex-shrink: 0; }
.history-info { flex: 1; }
.history-subject { font-weight: 600; font-size: 0.9rem; margin-bottom: 3px; }
.history-meta { font-size: 0.75rem; color: var(--text-muted); }
.history-duration {
    font-size: 0.85rem; font-weight: 700; color: var(--primary);
    background: rgba(16,185,129,0.1); padding: 4px 8px; border-radius: 6px; flex-shrink: 0;
}

/* ----------- MODALLER ----------- */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15,23,42,0.92); backdrop-filter: blur(6px);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000; padding: 16px;
}
.modal-overlay.hidden { display: none; }
.modal {
    background-color: var(--surface); padding: 40px; border-radius: var(--radius);
    text-align: center; width: 100%; max-width: 440px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5); border: 1px solid var(--border);
    max-height: 90vh; overflow-y: auto;
}
.modal h2 { font-size: 1.8rem; margin-bottom: 14px; }
.modal p { font-size: 1rem; color: var(--text-muted); margin-bottom: 28px; line-height: 1.6; }
.modal .time-display { position: relative; font-size: 2.8rem; margin-bottom: 20px; transform: none; left: auto; top: auto; }
.neon-text { color: var(--primary); text-shadow: 0 0 10px rgba(16,185,129,0.4); }
.warning-text { color: #f59e0b; text-shadow: 0 0 10px rgba(245,158,11,0.4); }
.hidden { display: none !important; }
.mt-4 { margin-top: 16px; }

/* ----------- TOAST ----------- */
.toast-container {
    position: fixed; bottom: 80px; right: 20px;
    display: flex; flex-direction: column; gap: 10px;
    z-index: 2000; pointer-events: none;
}
.toast {
    padding: 12px 18px; border-radius: 10px;
    font-size: 0.9rem; font-weight: 500; color: white;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    animation: toast-in 0.3s ease; max-width: 300px;
}
.toast-success { background-color: var(--primary); }
.toast-info { background-color: var(--accent); }
.toast-warning { background-color: #f59e0b; }
.toast-fade-out { animation: toast-out 0.4s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(16px); } }

/* ----------- MOBİL ALT NAV ----------- */
.mobile-bottom-nav {
    display: none; position: fixed; bottom: 0; left: 0; right: 0;
    height: 64px; background-color: var(--surface);
    border-top: 1px solid var(--border);
    justify-content: space-around; align-items: center; z-index: 500;
}
.mob-nav-btn {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; padding: 8px 20px; border-radius: 8px;
    transition: 0.2s; font-size: 0.72rem; font-weight: 600;
}
.mob-nav-btn.active { color: var(--primary); }
.mob-nav-icon { font-size: 1.3rem; }

/* ----------- MİNİ İSTATİSTİKLER ----------- */
.mini-stats-row {
    display: flex; gap: 12px; padding: 0 4px; margin-bottom: 16px;
}
.mini-stat-card {
    flex: 1; background: #0f172a; border-radius: 14px;
    padding: 16px 10px; text-align: center;
    border: 1px solid var(--border); transition: 0.2s;
}
.mini-stat-card:hover { border-color: var(--primary); }
.mini-stat-icon { font-size: 1.4rem; margin-bottom: 6px; }
.mini-stat-value {
    font-size: 1.35rem; font-weight: 800; color: white;
    line-height: 1; margin-bottom: 4px;
}
.mini-stat-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }

/* ----------- MOTİVASYON SÖZÜ ----------- */
.quote-box {
    background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(59,130,246,0.08));
    border: 1px solid rgba(99,102,241,0.25);
    border-radius: 14px; padding: 16px 20px;
    margin-bottom: 20px; text-align: center;
    min-height: 56px; display: flex; align-items: center; justify-content: center;
}
.quote-text {
    font-size: 0.88rem; color: #94a3b8;
    font-style: italic; line-height: 1.5;
    transition: opacity 0.5s;
}

/* ----------- GÖREV LİSTESİ ----------- */
.task-section {
    background-color: #0f172a; padding: 16px; border-radius: 8px; margin-bottom: 16px;
}
.task-section-header {
    display: flex; align-items: center; gap: 8px;
    cursor: pointer; margin-bottom: 12px;
}
.task-section-header h3 { margin-bottom: 0; flex: 1; }
.task-toggle-icon { color: var(--text-muted); font-size: 0.75rem; transition: 0.2s; }
.task-toggle-icon.closed { transform: rotate(-90deg); }
.task-badge {
    background: var(--primary); color: white; border-radius: 10px;
    padding: 1px 7px; font-size: 0.7rem; font-weight: 700;
}
.task-input-row { margin-bottom: 10px; display: flex; gap: 8px; width: 100%; box-sizing: border-box; overflow: hidden; }
.task-input-row input { padding: 9px 12px; font-size: 0.85rem; flex: 1; min-width: 0; width: 0; }
.task-input-row button { flex-shrink: 0; width: 42px; padding: 0; }
.task-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0; border-bottom: 1px solid var(--border);
}
.task-item:last-child { border-bottom: none; }
.task-checkbox {
    width: 18px; height: 18px; accent-color: var(--primary);
    cursor: pointer; flex-shrink: 0;
}
.task-text {
    flex: 1; font-size: 0.85rem; cursor: pointer; word-break: break-word;
    transition: 0.2s;
}
.task-text.done { text-decoration: line-through; color: var(--text-muted); }
.task-delete-btn {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 1rem; padding: 2px 4px;
    border-radius: 4px; flex-shrink: 0; transition: 0.2s;
    opacity: 0;
}
.task-item:hover .task-delete-btn { opacity: 1; }
.task-delete-btn:hover { color: var(--danger); background: rgba(239,68,68,0.1); }

/* ----------- POMODORO AYARLARI ----------- */
.start-row { display: flex; gap: 10px; align-items: stretch; justify-content: center; }
.start-row #start-btn {
    flex: 1; padding: 14px 20px; font-size: 1rem;
    white-space: nowrap; line-height: 1.2;
}
.start-row #pomodoro-settings-btn {
    width: 48px; flex-shrink: 0; padding: 0;
    font-size: 1.1rem; border-radius: 8px;
}
.pomodoro-settings-panel {
    background: #0f172a; border: 1px solid var(--border);
    border-radius: 14px; padding: 16px; margin-top: 12px;
    text-align: left; width: 100%;
}
.pomo-setting-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 0; border-bottom: 1px solid var(--border);
}
.pomo-setting-row:last-of-type { border-bottom: none; }
.pomo-setting-row label { font-size: 0.85rem; color: var(--text-muted); }
.pomo-input-group {
    display: flex; align-items: center; gap: 10px;
    font-size: 0.95rem; font-weight: 700; color: white;
}
.pomo-step-btn {
    width: 28px; height: 28px; border-radius: 8px;
    background: var(--surface-hover); border: 1px solid var(--border);
    color: white; cursor: pointer; font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    transition: 0.15s;
}
.pomo-step-btn:hover { background: var(--primary); border-color: var(--primary); }

/* Görev listesi ana alanda */
.task-section-main {
    width: 100%; max-width: 480px;
    margin-top: 20px; text-align: left;
}
.task-section-main .task-section-header h3 { font-size: 1rem; }

/* ----------- ODA BUTONU ----------- */
.lang-toggle-btn {
    background: var(--surface-hover); border: 1px solid var(--border);
    border-radius: 8px; padding: 8px 12px; cursor: pointer;
    font-size: 0.85rem; font-weight: 600; color: var(--text-main);
    transition: 0.2s;
}
.lang-toggle-btn:hover { background: var(--primary); border-color: var(--primary); }

.room-header-btn {
    background: var(--surface-hover); border: 1px solid var(--border);
    border-radius: 10px; padding: 8px 12px; cursor: pointer;
    font-size: 0.85rem; font-weight: 600; color: var(--text-main);
    transition: 0.2s; white-space: nowrap;
}
.room-header-btn:hover { background: #3b82f6; border-color: #3b82f6; }
.room-header-btn.in-room { background: #3b82f6; border-color: #3b82f6; animation: pulse-room 2s infinite; }
@keyframes pulse-room {
    0%,100% { box-shadow: 0 0 0 0 rgba(59,130,246,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(59,130,246,0); }
}

/* ----------- GRUP ODALARI OVERLAY ----------- */
.room-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.85); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    z-index: 900; padding: 20px;
}
.room-panel {
    background: var(--surface); border-radius: var(--radius);
    width: 100%; max-width: 560px; max-height: 90vh;
    overflow-y: auto; border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.room-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.room-panel-header h2 { margin: 0; font-size: 1.3rem; }

/* Oda içerik alanı */
.room-body { padding: 20px 24px; }
.room-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.room-tab {
    flex: 1; padding: 10px; border-radius: 8px; border: 1px solid var(--border);
    background: transparent; color: var(--text-muted); cursor: pointer;
    font-size: 0.85rem; font-weight: 600; transition: 0.2s;
}
.room-tab.active { background: #3b82f6; border-color: #3b82f6; color: white; }
.room-form-group { margin-bottom: 14px; }
.room-form-group label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; }
.room-form-group input, .room-form-group select {
    padding: 10px 12px; font-size: 0.9rem;
}
.room-code-display {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    background: #0f172a; border-radius: 10px; padding: 16px;
    margin: 16px 0;
}
.room-code {
    font-size: 2rem; font-weight: 800; letter-spacing: 6px;
    color: #3b82f6; font-family: monospace;
}
.copy-btn {
    background: var(--surface-hover); border: 1px solid var(--border);
    border-radius: 8px; padding: 8px 12px; cursor: pointer;
    font-size: 0.8rem; color: var(--text-main); transition: 0.2s;
}
.copy-btn:hover { background: var(--primary); border-color: var(--primary); }
.room-info-card {
    background: #0f172a; border-radius: 10px; padding: 16px; margin-bottom: 16px;
}
.room-info-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.room-info-meta { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 12px; }
.room-members-title {
    font-size: 0.75rem; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 10px;
}
.room-member-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0; border-bottom: 1px solid var(--border);
}
.room-member-item:last-child { border-bottom: none; }
.room-member-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #3b82f6);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: bold; flex-shrink: 0;
}
.room-member-name { flex: 1; font-size: 0.85rem; }
.room-member-status { font-size: 0.75rem; }
.room-member-status.studying { color: var(--primary); }
.room-member-status.idle { color: var(--text-muted); }
.room-danger-btn {
    background: transparent; border: 1px solid var(--danger);
    color: var(--danger); border-radius: 8px; padding: 10px 16px;
    cursor: pointer; font-size: 0.85rem; font-weight: 600;
    transition: 0.2s; width: 100%; margin-top: 12px;
}
.room-danger-btn:hover { background: var(--danger); color: white; }
.room-empty { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 0.9rem; }

/* ----------- TABLET ----------- */
@media (max-width: 1080px) {
    #app-view.active { grid-template-columns: 260px 1fr 300px; gap: 16px; }
}
@media (max-width: 900px) {
    #app-view.active { grid-template-columns: 240px 1fr; grid-template-rows: 1fr auto; }
    .right-sidebar { grid-column: 1 / -1; flex-direction: column; max-height: 380px; }
}

/* ----------- MOBİL ----------- */
@media (max-width: 768px) {
    body { padding: 0; align-items: flex-start; min-height: 100dvh; }

    #auth-view { padding: 16px; align-items: flex-start; padding-top: 40px; }
    .auth-card { width: 100%; max-width: 100%; padding: 28px 20px; border-radius: var(--radius); box-shadow: none; }

    #app-view.active { display: block; padding-bottom: 68px; min-height: 100dvh; max-width: 100%; gap: 0; }

    .panel { border-radius: 0; min-height: calc(100dvh - 68px); width: 100%; }

    .sidebar { display: none; }
    .sidebar.mob-active { display: flex !important; }
    .right-sidebar { display: none; max-height: unset; }
    .right-sidebar.mob-active { display: flex !important; flex-direction: column; }
    .main-content.mob-hidden { display: none !important; }

    .timer-circle { width: 200px; height: 200px; }
    .progress-ring { width: 200px !important; height: 200px !important; }
    .time-display { font-size: 2.8rem; }
    .timer-controls { width: 100%; max-width: 300px; }
    .timer-label { font-size: 0.82rem; }
    .timer-container { gap: 14px; }
    .main-content { padding: 12px 14px; }
    .main-header { margin-bottom: 8px; }
    .task-section-main { max-width: 100%; }
    .main-header h2 { font-size: 1.1rem; }
    .mini-stat-card { padding: 10px 6px; }
    .mini-stat-value { font-size: 1rem; }
    .mini-stat-label { font-size: 0.65rem; }
    .quote-box { padding: 8px 12px; }
    .quote-text { font-size: 0.8rem; }
    .start-row #start-btn { padding: 12px 16px; font-size: 0.95rem; }
    .sidebar { padding: 20px 16px; }
    .tab-content { padding: 12px; }
    .tab { font-size: 0.72rem; padding: 10px 2px; }
    .modal { padding: 28px 20px; }
    .modal h2 { font-size: 1.5rem; }
    .toast-container { bottom: 76px; right: 12px; left: 12px; }
    .toast { max-width: 100%; }
    .mobile-bottom-nav { display: flex; }
    .streak-num { font-size: 1.3rem; }

    .music-panel { right: auto; left: 0; width: 200px; }
    .music-toggle-btn { padding: 6px 10px; font-size: 1rem; }
}

@media (max-width: 380px) {
    .time-display { font-size: 2.6rem; }
    .timer-circle { width: 180px; height: 180px; }
    .progress-ring { width: 180px !important; height: 180px !important; }
    .btn.large-btn { padding: 14px; font-size: 1rem; }
    .logo { font-size: 1.7rem; }
}

/* ----------- LANDING MOBİL ----------- */
@media (max-width: 640px) {
    /* Navbar */
    .landing-nav-inner { padding: 10px 16px; }
    .landing-logo { font-size: 1.15rem; }
    .landing-nav-actions { gap: 8px; }
    .landing-nav-actions .landing-login-btn { display: none; }
    .landing-cta-btn { padding: 8px 14px; font-size: 0.82rem; }
    .lang-toggle-btn { padding: 6px 10px; font-size: 0.78rem; }

    /* Hero */
    .landing-hero { padding: 50px 20px 36px; }
    .hero-badge { font-size: 0.8rem; padding: 5px 14px; margin-bottom: 20px; }
    .hero-title { font-size: clamp(1.8rem, 8vw, 2.6rem); letter-spacing: -0.5px; }
    .hero-sub { font-size: 0.92rem; line-height: 1.6; }
    .hero-btns { flex-direction: column; align-items: center; gap: 12px; }
    .hero-main-btn { width: 100%; max-width: 320px; }
    .hero-secondary-btn { justify-content: center; }
    .hero-stats { gap: 10px; flex-wrap: wrap; justify-content: center; }
    .hero-stat { font-size: 0.8rem; }

    /* Sections */
    .steps-row { flex-direction: column; align-items: center; }
    .step-arrow { transform: rotate(90deg); }
    .install-cards { grid-template-columns: 1fr; }
    .free-card { padding: 32px 20px; }
    .free-card h2 { font-size: 1.5rem; }
    .features-grid { grid-template-columns: 1fr; }
    .landing-section-title { font-size: 1.6rem; }

    /* Mockup */
    .mockup-phone { width: 200px; }
    .mock-timer { width: 90px; height: 90px; font-size: 2.2rem; }
}
