/* =========================================
   1. DEĞİŞKENLER & GLOBAL AYARLAR
   ========================================= */
:root {
    /* Renk Paleti */
    --primary: #6366f1;       /* İndigo Ana Renk */
    --primary-glow: rgba(99, 102, 241, 0.5);
    --secondary: #a855f7;     /* Mor İkincil Renk */
    --accent: #f59e0b;        /* Turuncu (Uyarı/Premium) */
    
    /* Metin Renkleri */
    --text-main: #ffffff;
    --text-dim: #94a3b8;
    
    /* Glassmorphism (Cam Efekti) Ayarları */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: 20px;
    
    /* Layout */
    --max-width: 1200px;
    --header-height: 80px;
}

/* Genel Sıfırlama */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased; /* Fontları pürüzsüzleştirir */
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #0f172a; /* Fallback renk */
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =========================================
   2. DİNAMİK ARKA PLAN SİSTEMİ
   ========================================= */
.bg-gradient {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -2;
    transition: background 1s ease-in-out;
}

/* Tema Tanımları */
.theme-ocean .bg-gradient { 
    background: radial-gradient(circle at top right, #1e3a8a, #0f172a); 
}
.theme-pink .bg-gradient { 
    background: radial-gradient(circle at top right, #be185d, #0f172a); 
}
.theme-space .bg-gradient { 
    background: radial-gradient(circle at bottom, #312e81, #000000); 
}
.theme-forest .bg-gradient { 
    background: linear-gradient(to bottom right, #064e3b, #022c22); 
}
.theme-cyberpunk .bg-gradient { 
    background: repeating-linear-gradient(45deg, #2e1065, #000 100px); 
}

/* =========================================
   3. NAVİGASYON (HEADER)
   ========================================= */
.top-nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}
.logo span { color: var(--primary); font-weight: 300; }

.nav-links.desktop-only a {
    color: var(--text-dim);
    text-decoration: none;
    margin: 0 15px;
    font-size: 0.95rem;
    transition: 0.3s;
}
.nav-links a:hover { color: white; }

/* Modern Giriş Butonu */
.btn-login-modern {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-login-modern:hover {
    background: white;
    color: black;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,255,255,0.2);
}

/* =========================================
   4. ANA LAYOUT (GRID SİSTEMİ)
   ========================================= */
.main-layout {
    display: grid;
    /* Sol Reklam | Ana İçerik | Sağ Panel */
    grid-template-columns: 200px 1fr 300px; 
    gap: 2rem;
    max-width: var(--max-width);
    margin: 2rem auto;
    padding: 0 2rem;
    flex: 1; /* Footer'ı aşağı itmek için */
}

/* =========================================
   5. ORTA ALAN: POMODORO KARTI
   ========================================= */
.focus-area {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timer-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    padding: 3rem;
    width: 100%;
    max-width: 600px;
    text-align: center;
    backdrop-filter: blur(var(--glass-blur));
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

/* Mod Seçici (Ortalama Sorunu Çözümü) */
.mode-capsule {
    background: rgba(0, 0, 0, 0.3);
    padding: 6px;
    border-radius: 100px;
    display: flex;          /* Yan yana dizer */
    justify-content: center;/* İçeriği ortalar */
    gap: 5px;
    width: fit-content;     /* İçerik kadar genişlik */
    margin: 0 auto 2rem;    /* Sayfada ortalar */
    border: 1px solid var(--glass-border);
}

.mode-item {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 10px 20px;
    border-radius: 100px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
}

.mode-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Sayaç Metni */
.timer-display {
    font-size: clamp(4rem, 10vw, 8rem); /* Mobil/PC uyumlu font */
    font-weight: 800;
    line-height: 1;
    margin-bottom: 2rem;
    font-variant-numeric: tabular-nums; /* Sayıların titremesini önler */
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Kontrol Butonları */
.timer-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-main-action {
    background: white;
    color: black;
    border: none;
    padding: 18px 40px;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-main-action:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 10px 25px rgba(255,255,255,0.3);
}

.btn-reset-modern {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    transition: 0.4s;
}
.btn-reset-modern:hover {
    background: white; color: black;
    transform: rotate(-180deg);
}

/* =========================================
   6. YAN PANEL & REKLAMLAR
   ========================================= */
.side-panel, .ads-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.panel-section {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

.panel-header {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-dim);
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.theme-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s;
    margin-bottom: 5px;
}
.theme-row:hover { background: rgba(255,255,255,0.08); }
.theme-row.active { background: rgba(99, 102, 241, 0.2); border: 1px solid var(--primary); }

.dot { width: 10px; height: 10px; border-radius: 50%; }
.d-ocean { background: #3b82f6; box-shadow: 0 0 8px #3b82f6; }
.d-pink { background: #ec4899; box-shadow: 0 0 8px #ec4899; }
.d-space { color: var(--accent); display: flex; align-items: center; font-size: 0.8rem; }

/* Reklam Kutuları */
.ad-placeholder-vertical, .ad-placeholder-square {
    background: rgba(0,0,0,0.2);
    border: 2px dashed rgba(255,255,255,0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
}
.ad-placeholder-vertical { height: 600px; width: 100%; }
.ad-placeholder-square { height: 250px; width: 100%; margin: 1rem 0; }
.ad-label { font-size: 0.7rem; color: var(--text-dim); margin-bottom: 5px; opacity: 0.5; }

/* Premium Parlayan Buton */
.premium-box {
    margin-top: auto;
    padding: 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    border-radius: 20px;
    border: 1px solid rgba(168, 85, 247, 0.2);
    text-align: center;
}
.premium-box p { font-size: 0.85rem; margin-bottom: 12px; color: #ddd; }

.btn-premium-shiny {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 14px;
    border-radius: 14px;
    font-weight: 800;
    width: 100%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: 0.3s;
    box-shadow: 0 5px 20px rgba(168, 85, 247, 0.4);
}
.btn-premium-shiny:hover { transform: scale(1.02); filter: brightness(1.1); }

/* =========================================
   7. SEO İÇERİK & FOOTER
   ========================================= */
.seo-content {
    background: var(--glass-bg);
    border-radius: 24px;
    padding: 2rem;
    margin-top: 3rem;
    color: #cbd5e1;
    border: 1px solid var(--glass-border);
}
.seo-content h2 { color: var(--primary); margin-bottom: 1rem; font-size: 1.5rem; }
.seo-content p, .seo-content li { margin-bottom: 1rem; font-size: 1rem; line-height: 1.7; }

.footer-main {
    margin-top: auto;
    padding: 2rem;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.2);
}
.footer-links a { color: var(--text-dim); text-decoration: none; font-size: 0.9rem; transition: 0.2s; }
.footer-links a:hover { color: white; }
.sep { margin: 0 10px; color: var(--glass-border); }
.copyright { margin-top: 1rem; font-size: 0.8rem; opacity: 0.4; }

/* =========================================
   8. MODAL (POPUP)
   ========================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
    display: none; align-items: center; justify-content: center;
    z-index: 1000;
}
.modal-content {
    background: #1e293b;
    padding: 3rem;
    border-radius: 30px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    border: 1px solid var(--primary);
    position: relative;
}
.modal-icon { font-size: 3rem; color: var(--accent); margin-bottom: 1rem; }
.modal-features { text-align: left; list-style: none; margin: 2rem 0; }
.modal-features li { margin: 10px 0; color: #cbd5e1; display: flex; align-items: center; gap: 10px; }
.modal-features i { color: #10b981; }

.btn-upgrade-modal {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: white; border: none; border-radius: 50px;
    font-weight: 800; cursor: pointer;
}
.close-modal {
    position: absolute; top: 20px; right: 25px;
    background: none; border: none; color: white; font-size: 2rem; cursor: pointer;
}

/* =========================================
   9. RESPONSIVE (MOBİL UYUMLULUK)
   ========================================= */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr 300px; /* Soldaki reklamı gizle */
    }
    .ads-left { display: none; }
}

@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr; /* Tek sütun */
        padding: 0 1rem;
    }
    .top-nav { padding: 0 1rem; }
    .nav-links.desktop-only { display: none; } /* Mobilde menüyü gizle */
    
    .timer-display { font-size: 5rem; }
    .btn-main-action { padding: 15px 30px; }
    
    /* Yan paneli içerik altına al */
    .side-panel { margin-top: 2rem; }
}

.user-profile { display: flex; align-items: center; gap: 15px; }
.btn-logout { background: none; border: 1px solid var(--glass-border); color: #ef4444; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.todo-section { width: 100%; max-width: 600px; margin-top: 20px; background: var(--glass-bg); padding: 20px; border-radius: 20px; border: 1px solid var(--glass-border); }
.todo-input-group { display: flex; gap: 10px; margin-bottom: 15px; }
.todo-input-group input { flex: 1; background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border); padding: 10px; border-radius: 10px; color: white; }
.sound-controls { display: flex; justify-content: space-around; margin-top: 10px; }
.sound-btn { background: var(--glass-bg); border: 1px solid var(--glass-border); color: white; width: 45px; height: 45px; border-radius: 12px; cursor: pointer; transition: 0.3s; }
.sound-btn.active { background: var(--primary); border-color: white; }

/* Ana Layout Düzenlemesi */
.main-layout {
    display: grid;
    grid-template-columns: 200px 1fr 300px; /* Standart (Reklamlı) */
    gap: 2rem;
    max-width: var(--max-width);
    margin: 2rem auto;
    padding: 0 2rem;
    align-items: start;
}

/* Premium Üye İçin Grid Düzenlemesi */
.premium-mode.main-layout {
    grid-template-columns: 1fr 350px !important; /* Reklam sütununu iptal et */
}

/* Timer Kartı Genişlik Ayarı */
.timer-card {
    width: 100%;
    max-width: 550px; /* İç içe geçmeyi önlemek için sabit genişlik */
    margin: 0 auto;
}

/* To-Do List Stilleri */
.todo-section {
    width: 100%;
    max-width: 550px;
    margin: 2rem auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 20px;
    border-radius: 24px;
    backdrop-filter: blur(10px);
}

#todo-list { list-style: none; margin-top: 15px; }
.todo-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    margin-bottom: 8px;
    border-radius: 10px;
    animation: fadeIn 0.3s ease;
}
.todo-item.completed { opacity: 0.5; text-decoration: line-through; }

/* Premium Grid Düzenlemesi */
.premium-mode.main-layout {
    grid-template-columns: 1fr 350px !important;
    max-width: 1100px;
}

/* Tema Gizleme Mantığı */
.theme-hidden { display: none !important; }

/* Temalar İçin Özel Animasyonlar */
.theme-cosmic .bg-gradient { background: radial-gradient(circle at top, #2e1065, #000); animation: pulseBg 10s infinite; }
.theme-matrix .bg-gradient { background: #003b00; background-image: linear-gradient(rgba(0, 255, 0, .1) 1px, transparent 1px); background-size: 100% 3px; }
.theme-lava .bg-gradient { background: linear-gradient(45deg, #450a0a, #991b1b); }
.theme-aurora .bg-gradient { background: linear-gradient(270deg, #064e3b, #1e3a8a, #4c1d95); background-size: 600% 600%; animation: auroraShift 15s ease infinite; }

@keyframes auroraShift {
    0%{background-position:0% 50%}
    50%{background-position:100% 50%}
    100%{background-position:0% 50%}
}

@keyframes pulseBg {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Daha Fazla Göster Butonu */
.btn-more-themes {
    width: 100%; padding: 10px; margin-top: 10px;
    background: rgba(255,255,255,0.05); color: var(--text-dim);
    border: 1px dashed var(--glass-border); border-radius: 10px;
    cursor: pointer; font-size: 0.8rem;
}

/* Renk Noktaları */
.d-cosmic { background: #8b5cf6; box-shadow: 0 0 10px #8b5cf6; }
.d-sunset { background: #f59e0b; box-shadow: 0 0 10px #f59e0b; }
.d-matrix { background: #10b981; box-shadow: 0 0 10px #10b981; }
.d-lava { background: #ef4444; box-shadow: 0 0 10px #ef4444; }
.d-aurora { background: #34d399; box-shadow: 0 0 10px #34d399; }

/* --- PREMIUM ANİMASYONLU ARKA PLANLAR --- */

/* 1. Kozmik Tema: Derin mor ve hareketli nebulalar */
.theme-cosmic .bg-gradient {
    background: linear-gradient(125deg, #1a0b2e 0%, #09090b 50%, #2e1065 100%);
    background-size: 400% 400%;
    animation: meshFlow 15s ease infinite;
}

/* 2. Matrix: Akan kod efekti için temel */
.theme-matrix .bg-gradient {
    background: #000;
    position: relative;
}
.theme-matrix .bg-overlay {
    background: repeating-linear-gradient(0deg, rgba(0, 255, 70, 0.03) 0px, rgba(0, 255, 70, 0.03) 1px, transparent 1px, transparent 2px);
    background-size: 100% 3px;
}

/* 3. Cyberpunk: Neon pembe ve mavi geçişleri */
.theme-cyber .bg-gradient {
    background: linear-gradient(-45deg, #ff0055, #00d2ff, #2e1065, #050505);
    background-size: 400% 400%;
    animation: meshFlow 10s ease infinite;
}

/* 4. Aurora: Kuzey ışıkları efekti */
.theme-aurora .bg-gradient {
    background: linear-gradient(132deg, #004d40, #00acc1, #512da8, #1a237e);
    background-size: 400% 400%;
    animation: meshFlow 20s ease infinite;
}

@keyframes meshFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- KART TASARIMI GÜNCELLEME --- */
.timer-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 40px 100px rgba(0,0,0,0.5);
}

.is-premium-user .timer-card {
    border: 1px solid rgba(255, 215, 0, 0.2); /* Premium üyelere altın dokunuş */
}