:root {
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.8);
    --border: rgba(255, 255, 255, 0.1);
    --primary: #6366f1;
    --secondary: #10b981;
    --accent: #f43f5e;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; }

body {
    background-color: var(--bg-dark);
    background-image: radial-gradient(circle at top, #1e293b 0%, #0f172a 100%);
    color: var(--text-main);
    min-height: 100vh;
}

.app-container { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* Nav */
.top-nav { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; margin-bottom: 30px; }
.logo { font-size: 1.5rem; font-weight: 800; display: flex; gap: 8px; align-items: center; }
.highlight { color: var(--primary); }
.back-btn { text-decoration: none; color: var(--text-muted); display: flex; align-items: center; gap: 5px; transition: 0.3s; }
.back-btn:hover { color: white; }

/* Wizard Container */
.wizard-container {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    min-height: 600px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

/* Progress Bar */
.progress-header { display: flex; justify-content: center; align-items: center; margin-bottom: 40px; }
.step { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; font-weight: bold; border: 2px solid transparent; transition: 0.3s; }
.step.active { background: var(--primary); border-color: white; box-shadow: 0 0 15px var(--primary); }
.line { width: 50px; height: 2px; background: rgba(255,255,255,0.1); margin: 0 10px; }

/* Step Content */
.step-content { animation: slideUp 0.5s ease; }
.step-content.hidden { display: none; }
.step-content h2 { text-align: center; font-size: 2rem; margin-bottom: 10px; }
.step-content p { text-align: center; color: var(--text-muted); margin-bottom: 30px; }

@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Selection Grid (Step 1) */
.selection-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; max-width: 900px; margin: 0 auto 40px; }
.radio-card input { display: none; }
.card-content { background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 16px; padding: 30px; display: flex; flex-direction: column; align-items: center; gap: 15px; cursor: pointer; transition: 0.3s; }
.card-content i { font-size: 2.5rem; color: var(--text-muted); }
.radio-card input:checked + .card-content { background: rgba(99, 102, 241, 0.2); border-color: var(--primary); transform: translateY(-5px); }
.radio-card input:checked + .card-content i { color: var(--primary); }

/* Step 2: Time */
.form-group { text-align: center; margin-bottom: 30px; }
.form-group label { display: block; font-size: 1.1rem; margin-bottom: 15px; }
input[type=range] { width: 100%; max-width: 400px; accent-color: var(--primary); height: 6px; cursor: pointer; }
.range-value { font-size: 2rem; font-weight: bold; color: var(--primary); margin-top: 10px; }

.day-selector { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.day-check { display: none; }
.day-check + span { padding: 10px 20px; background: rgba(255,255,255,0.05); border-radius: 8px; cursor: pointer; font-weight: 600; transition: 0.2s; border: 1px solid var(--border); }
.day-check:checked + span { background: var(--secondary); color: #0f172a; border-color: var(--secondary); }

/* Step 3: Topics */
.topics-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; max-height: 400px; overflow-y: auto; padding-right: 10px; }
.topic-cat { background: rgba(255,255,255,0.02); padding: 15px; border-radius: 12px; border: 1px solid var(--border); }
.topic-cat h3 { color: var(--primary); margin-bottom: 10px; font-size: 1.1rem; border-bottom: 1px solid var(--border); padding-bottom: 5px; display: flex; justify-content: space-between; }
.t-list { display: flex; flex-direction: column; gap: 8px; }
.t-item { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.9rem; padding: 5px; border-radius: 5px; transition: 0.2s; }
.t-item:hover { background: rgba(255,255,255,0.05); }
.t-item input { accent-color: var(--primary); width: 16px; height: 16px; }

/* Buttons */
.nav-buttons { display: flex; justify-content: space-between; margin-top: 40px; }
.nav-center { display: flex; justify-content: center; margin-top: 40px; }
.next-btn { background: white; color: var(--bg-dark); padding: 12px 30px; border-radius: 10px; font-weight: bold; border: none; cursor: pointer; transition: 0.3s; }
.prev-btn { background: transparent; border: 1px solid var(--border); color: white; padding: 12px 30px; border-radius: 10px; cursor: pointer; transition: 0.3s; }
.next-btn:hover { transform: translateX(5px); }
.magic-btn { width: 100%; max-width: 300px; background: linear-gradient(90deg, var(--primary), #a855f7); color: white; border: none; padding: 14px; border-radius: 10px; font-weight: bold; font-size: 1.1rem; cursor: pointer; transition: 0.3s; margin-left: auto; }
.magic-btn:hover { filter: brightness(1.2); box-shadow: 0 0 20px rgba(99,102,241,0.4); }

/* Calendar Result */
.result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 15px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; background: var(--border); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.cal-cell { background: rgba(15, 23, 42, 0.9); min-height: 120px; padding: 10px; display: flex; flex-direction: column; gap: 5px; }
.cal-head { background: var(--primary); color: white; text-align: center; padding: 10px; font-weight: bold; min-height: auto; }
.cal-rest { background: rgba(239, 68, 68, 0.15); opacity: 0.8; display: flex; align-items: center; justify-content: center; color: #fca5a5; font-weight: bold; letter-spacing: 2px; }

.day-num { font-size: 0.8rem; font-weight: bold; color: var(--text-muted); margin-bottom: 5px; }
.task-badge { background: rgba(99, 102, 241, 0.2); color: #c7d2fe; padding: 4px 6px; border-radius: 4px; font-size: 0.7rem; border-left: 3px solid var(--primary); line-height: 1.2; }

.pdf-btn { background: var(--danger); color: white; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; }
.new-btn { background: transparent; border: 1px solid var(--border); color: white; padding: 10px 20px; border-radius: 8px; cursor: pointer; }
.secondary-btn { background: var(--secondary); color: #0f172a; border: none; padding: 10px 20px; border-radius: 8px; font-weight: bold; cursor: pointer; }

/* Mobile */
@media (max-width: 768px) {
    .calendar-grid { grid-template-columns: 1fr; gap: 10px; background: transparent; border: none; }
    .cal-head { display: none; }
    .cal-cell { border-radius: 10px; border: 1px solid var(--border); min-height: auto; }
    .cal-cell::before { content: attr(data-day); font-weight: bold; color: var(--primary); display: block; margin-bottom: 5px; }
    .selection-grid { grid-template-columns: 1fr; }
}
/* İlerleme Barı */
.prog-container { display: flex; flex-direction: column; gap: 5px; }
.prog-bar-bg { width: 100%; height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px; overflow: hidden; }
.prog-fill { height: 100%; background: var(--secondary); width: 0%; transition: width 0.5s ease; }

/* Takvim Hücresi Güncellemesi */
.cal-cell { 
    min-height: 140px; /* Biraz daha uzun */
    justify-content: flex-start;
}
.rest-cell { background: rgba(239, 68, 68, 0.1); opacity: 0.6; }

.study-slot {
    font-size: 0.75rem; padding: 6px; border-radius: 6px;
    background: rgba(99, 102, 241, 0.15); border-left: 3px solid var(--primary);
    margin-bottom: 4px; line-height: 1.3;
}
.study-slot b { color: #c7d2fe; display: block; font-size: 0.7rem; }

/* PDF Buton */
.pdf-btn { background: #ef4444; color: white; border: none; padding: 12px 24px; border-radius: 8px; cursor: pointer; font-weight: bold; display: flex; align-items: center; gap: 8px; }
.pdf-btn:hover { background: #dc2626; }
/* --- AY SEKMELERİ (MONTH TABS) --- */
.month-tabs-container {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.month-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
    /* Scrollbar gizleme (Opsiyonel) */
    scrollbar-width: none; 
}
.month-tabs::-webkit-scrollbar { display: none; }

.m-tab {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 10px 10px 0 0; /* Üst köşeler yuvarlak */
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s;
    position: relative;
    top: 1px; /* Çizgiye otursun */
}

.m-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.m-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 -5px 15px rgba(99, 102, 241, 0.3);
}

/* Aktif tabın altındaki çizgiyi yok etme illüzyonu */
.m-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0; width: 100%;
    height: 2px;
    background: var(--primary); 
}