:root {
            --bg-body: #f8fafc;
            --text-main: #0f172a;
            --text-muted: #475569;
            --surface: #ffffff;
            --border: #e2e8f0;

            --primary: #4f46e5;
            --primary-light: #e0e7ff;

            --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
            --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
            --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);

            --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }

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

        body {
            background-color: var(--bg-body);
            color: var(--text-main);
            line-height: 1.5;
            -webkit-font-smoothing: antialiased;
        }

        /* --- LAYOUT --- */
        .app-container {
            max-width: 1600px;
            margin: 0 auto;
            padding: 2rem;
            display: grid;
            /* Sol Sidebar | Main (geniş) | Sağ Sidebar */
            grid-template-columns: minmax(260px, 280px) 1fr minmax(280px, 320px);
            gap: 1.5rem;
            align-items: start;
        }
        /* Sağ sidebar boşken: 2 kolon + ortalanmış container */
        .app-container.no-right-sidebar {
            max-width: 1200px;
            grid-template-columns: minmax(260px, 280px) 1fr;
        }
        .app-container.no-right-sidebar > .sidebar-right { display: none !important; }

        /* Desktop görünüm sırası: Sol → Main → Sağ (HTML sırası farklı olsa da) */
        .app-container > .sidebar-left { order: 1; }
        .app-container > .main-content { order: 2; }
        .app-container > .sidebar-right { order: 3; }

        /* --- SIDEBAR (SİSTEM KURALLARI) --- */
        .sidebar {
            position: sticky;
            top: 2rem;
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
            z-index: 10;
            max-height: calc(100vh - 4rem);
            overflow-y: auto;
            padding-right: 4px;
            scrollbar-width: thin;
            scrollbar-color: transparent transparent;
        }

        .sidebar::-webkit-scrollbar {
            width: 4px;
        }

        .sidebar::-webkit-scrollbar-track {
            background: transparent;
        }

        .sidebar::-webkit-scrollbar-thumb {
            background: transparent;
        }

        .sidebar:hover::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 10px;
        }

        #confetti-canvas {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 9999;
        }

        .profile-card {
            background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
            border-radius: 20px;
            padding: 2rem;
            color: white;
            box-shadow: var(--shadow-lg);
            text-align: center;
        }

        .profile-avatar {
            width: 80px;
            height: 80px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 2.5rem;
            backdrop-filter: blur(10px);
            border: 2px solid rgba(255, 255, 255, 0.4);
            margin-bottom: 1rem;
        }

        .profile-card h1 {
            font-family: 'Outfit', sans-serif;
            font-size: 1.75rem;
            margin-bottom: 0.25rem;
        }

        .profile-card p {
            font-size: 0.95rem;
            opacity: 0.9;
        }

        .video-card {
            background: var(--surface);
            border-radius: 20px;
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border);
            overflow: hidden;
            display: flex;
        }

        .video-card iframe {
            width: 100%;
            aspect-ratio: 16 / 9;
        }

        .rule-card {
            background: var(--surface);
            border-radius: 20px;
            padding: 1.5rem;
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border);
        }

        .rule-card-header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 1.25rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid var(--border);
        }

        .rule-card-header h3 {
            font-family: 'Outfit', sans-serif;
            font-size: 1.15rem;
            color: var(--text-main);
        }

        .rule-list {
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 0.85rem;
        }

        .rule-item {
            display: flex;
            gap: 0.75rem;
            font-size: 0.9rem;
            color: var(--text-muted);
        }

        .rule-item-icon {
            color: var(--primary);
            font-size: 1.1rem;
            flex-shrink: 0;
            line-height: 1.2;
        }

        .rule-item strong {
            color: var(--text-main);
        }

        .pill-group {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
            margin-top: 1rem;
        }

        .pill {
            background: var(--bg-body);
            border: 1px solid var(--border);
            padding: 0.35rem 0.75rem;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 600;
            color: var(--text-muted);
        }

        .pill.hi {
            color: #ef4444;
            border-color: #fecaca;
            background: #fef2f2;
        }

        .pill.md {
            color: #f59e0b;
            border-color: #fde68a;
            background: #fffbeb;
        }

        .pill.lo {
            color: #10b981;
            border-color: #a7f3d0;
            background: #f0fdf4;
        }

        /* --- TARGET SCHOOLS CARD --- */
        .target-schools-scroll {
            max-height: 280px;
            overflow-y: auto;
            padding-right: 0.5rem;
            margin-top: 0.5rem;
            position: relative;
            /* Alt fade efekti — okunan içeriğin altta kesildiğini hissettirir */
            mask-image: linear-gradient(to bottom, black 0%, black 88%, transparent 100%);
            -webkit-mask-image: linear-gradient(to bottom, black 0%, black 88%, transparent 100%);
        }
        /* Scroll bittiğinde fade kaybolsun */
        .target-schools-scroll.scrolled-end {
            mask-image: none;
            -webkit-mask-image: none;
        }

        .target-schools-scroll::-webkit-scrollbar {
            width: 4px;
        }

        .target-schools-scroll::-webkit-scrollbar-track {
            background: #f1f5f9;
            border-radius: 10px;
        }

        .target-schools-scroll::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 10px;
        }

        .school-section-title {
            font-size: 0.65rem;
            font-weight: 800;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin: 1.25rem 0 0.65rem 0.25rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .school-section-title:first-child {
            margin-top: 0;
        }

        .school-section-title::after {
            content: "";
            flex: 1;
            height: 1px;
            background: var(--border);
        }

        .school-item {
            padding: 0.75rem;
            background: var(--bg-body);
            border-radius: 12px;
            border: 1px solid var(--border);
            margin-bottom: 0.5rem;
            transition: var(--transition);
        }

        .school-item:hover {
            border-color: var(--primary);
            background: var(--surface);
            transform: translateX(4px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
        }

        .school-name {
            font-size: 0.85rem;
            font-weight: 700;
            color: var(--text-main);
            margin-bottom: 0.2rem;
        }

        .school-stats {
            font-size: 0.75rem;
            color: var(--text-muted);
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }

        /* --- TEACHER NOTES PANEL --- */
        .note-panel {
            margin-top: 1rem;
            background: #fffbeb;
            border: 1px solid #fde68a;
            border-radius: 12px;
            padding: 0.85rem 1rem;
        }

        .note-panel-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.6rem;
        }

        .note-panel-title {
            font-size: 0.72rem;
            font-weight: 800;
            color: #92400e;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            display: flex;
            align-items: center;
            gap: 0.35rem;
        }

        .note-badge {
            font-size: 0.6rem;
            font-weight: 800;
            padding: 0.1rem 0.45rem;
            border-radius: 8px;
            background: #f59e0b;
            color: white;
        }

        .note-row {
            margin-bottom: 0.5rem;
        }

        .note-row-label {
            font-size: 0.7rem;
            font-weight: 700;
            color: #92400e;
            margin-bottom: 0.2rem;
        }

        .note-row-content {
            font-size: 0.82rem;
            color: #451a03;
            line-height: 1.45;
            min-height: 1.2rem;
        }

        .note-row-empty {
            font-size: 0.78rem;
            color: #d97706;
            font-style: italic;
        }

        .note-textarea {
            width: 100%;
            border: 1px solid #fcd34d;
            border-radius: 8px;
            padding: 0.4rem 0.6rem;
            font-size: 0.8rem;
            font-family: 'Inter', sans-serif;
            resize: vertical;
            background: white;
            color: var(--text-main);
            min-height: 42px;
            outline: none;
        }

        .note-textarea:focus {
            border-color: #f59e0b;
            box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
        }

        .note-edit-row {
            display: flex;
            gap: 0.4rem;
            margin-top: 0.5rem;
            justify-content: flex-end;
        }

        .btn-note-edit {
            font-size: 0.72rem;
            font-weight: 700;
            padding: 0.3rem 0.75rem;
            border-radius: 8px;
            border: 1px solid #fcd34d;
            background: white;
            color: #92400e;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-note-edit:hover {
            background: #fef3c7;
        }

        .btn-note-save {
            font-size: 0.72rem;
            font-weight: 700;
            padding: 0.3rem 0.75rem;
            border-radius: 8px;
            border: none;
            background: #f59e0b;
            color: white;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-note-save:hover {
            background: #d97706;
        }

        .btn-add-new-card {
            width: 100%;
            padding: 1rem;
            background: white;
            border: 2px dashed var(--border);
            border-radius: 12px;
            color: var(--text-muted);
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            margin-top: 1rem;
        }

        .btn-add-new-card:hover {
            border-color: var(--primary);
            color: var(--primary);
            background: var(--primary-light);
        }

        .btn-danger {
            color: #ef4444;
            border-color: #fecaca;
            background: #fef2f2;
        }

        .btn-danger:hover {
            background: #fee2e2;
        }

        /* --- PROGRESS WIDGET --- */
        .progress-widget {
            background: var(--surface);
            border-radius: 20px;
            padding: 1.5rem 1.5rem 1.75rem;
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border);
            position: relative;
            transition: all 0.4s ease;
        }

        .progress-widget.success {
            border-color: #10b981;
            box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
        }

        .progress-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.25rem;
            gap: 0.5rem;
        }

        .progress-title {
            font-family: 'Outfit', sans-serif;
            font-size: 1.05rem;
            color: var(--text-main);
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 0.4rem;
            white-space: nowrap;
        }

        .progress-percentage {
            font-family: 'Outfit', sans-serif;
            font-weight: 900;
            font-size: 2rem;
            color: var(--primary);
            transition: color 0.4s;
            line-height: 1;
            flex-shrink: 0;
            letter-spacing: -0.02em;
        }

        .progress-widget.success .progress-percentage {
            color: #10b981;
        }

        .progress-bar-bg {
            width: 100%;
            height: 14px;
            background: #eef2f6;
            border-radius: 12px;
            margin: 1rem 0 0.5rem;
            overflow: hidden;
            box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
            border: 1px solid rgba(0,0,0,0.04);
        }

        .progress-bar-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--primary), #818cf8);
            width: 0%;
            border-radius: 10px;
            transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.4s;
        }

        .progress-widget.success .progress-bar-fill {
            background: linear-gradient(90deg, #10b981, #34d399);
        }

        .todo-list {
            display: flex;
            flex-direction: column;
            gap: 0.85rem;
        }

        .todo-item {
            display: flex;
            align-items: center;
            gap: 0.85rem;
            padding: 0.85rem;
            border-radius: 14px;
            background: var(--bg-body);
            border: 1px solid transparent;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            user-select: none;
        }

        .todo-item:hover {
            background: var(--primary-light);
            border-color: rgba(79, 70, 229, 0.2);
            transform: translateX(4px);
        }

        .progress-widget.success .todo-item:hover {
            background: #f0fdf4;
            border-color: rgba(16, 185, 129, 0.2);
        }

        .todo-item.completed {
            background: transparent;
            border-color: var(--border);
            opacity: 0.6;
        }

        .todo-item.completed:hover {
            transform: none;
        }

        .todo-item.completed .todo-text {
            text-decoration: line-through;
            color: var(--text-muted);
        }

        .custom-checkbox {
            width: 24px;
            height: 24px;
            border-radius: 8px;
            border: 2px solid #cbd5e1;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            background: white;
            flex-shrink: 0;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
        }

        .todo-item.completed .custom-checkbox {
            background: var(--primary);
            border-color: var(--primary);
            box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
        }

        .progress-widget.success .todo-item.completed .custom-checkbox {
            background: #10b981;
            border-color: #10b981;
            box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
        }

        .custom-checkbox svg {
            width: 14px;
            height: 14px;
            fill: none;
            stroke: white;
            stroke-width: 3;
            stroke-linecap: round;
            stroke-linejoin: round;
            opacity: 0;
            transform: scale(0.5) rotate(-10deg);
            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .todo-item.completed .custom-checkbox svg {
            opacity: 1;
            transform: scale(1) rotate(0deg);
        }

        .todo-text {
            font-weight: 500;
            font-size: 0.95rem;
            color: var(--text-main);
            transition: color 0.3s;
            flex-grow: 1;
        }

        /* --- NAV LINK CARD --- */
        .nav-link-card {
            text-decoration: none;
            display: block;
        }

        .nav-link-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.85rem;
            background: linear-gradient(135deg, rgba(79,70,229,0.04), rgba(139,92,246,0.06));
            border: 1px solid rgba(79,70,229,0.12);
            border-radius: 14px;
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            cursor: pointer;
            color: var(--text-main);
            font-weight: 700;
        }

        .nav-link-item:hover {
            border-color: var(--primary);
            background: linear-gradient(135deg, rgba(79,70,229,0.08), rgba(139,92,246,0.12));
            transform: translateX(4px);
            box-shadow: 0 4px 12px rgba(79,70,229,0.12);
        }

        .nav-link-item:hover .nav-link-arrow {
            transform: translateX(3px);
            opacity: 1;
        }

        .nav-link-arrow {
            font-size: 0.8rem;
            opacity: 0.5;
            transition: all 0.3s;
        }

        .todo-category {
            font-size: 0.75rem;
            font-weight: 700;
            padding: 0.25rem 0.6rem;
            border-radius: 6px;
            background: white;
            border: 1px solid var(--border);
            color: var(--text-muted);
            letter-spacing: 0.5px;
        }

        .success-message {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: #059669;
            font-size: 0.9rem;
            font-weight: 600;
            opacity: 0;
            visibility: hidden;
            transform: translateY(10px);
            transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
            max-height: 0;
            margin-top: 0;
            padding-top: 0;
            border-top: 1px dashed transparent;
        }

        .progress-widget.success .success-message {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
            max-height: 50px;
            margin-top: 1.25rem;
            padding-top: 1.25rem;
            border-color: #a7f3d0;
        }

        /* --- GAME UNLOCK BADGE --- */
        .game-unlock-badge {
            display: none;
            align-items: center;
            gap: 0.75rem;
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            color: white;
            padding: 1rem;
            border-radius: 16px;
            margin-top: 1rem;
            font-weight: 700;
            font-size: 0.95rem;
            box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
            animation: pulseGame 2s infinite;
            border: 2px solid rgba(255, 255, 255, 0.2);
        }

        @keyframes pulseGame {
            0% {
                transform: scale(1);
                box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
            }

            50% {
                transform: scale(1.02);
                box-shadow: 0 4px 25px rgba(245, 158, 11, 0.5);
            }

            100% {
                transform: scale(1);
                box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
            }
        }

        .game-unlock-badge.visible {
            display: flex;
            animation: popIn 0.8s cubic-bezier(0.175, 0.885, 1) 0.5s forwards;
            opacity: 0;
        }

        /* --- REWARD OVERLAY --- */
        .reward-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(15, 23, 42, 0.8);
            backdrop-filter: blur(12px);
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            visibility: hidden;
            transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .reward-overlay.active {
            opacity: 1;
            visibility: visible;
        }

        .reward-content {
            background: linear-gradient(145deg, #ffffff, #fdfcfb);
            padding: 3.5rem;
            border-radius: 32px;
            text-align: center;
            box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
            transform: scale(0.7) translateY(40px);
            transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
            max-width: 480px;
            width: 90%;
            position: relative;
            overflow: hidden;
        }

        .reward-overlay.active .reward-content {
            transform: scale(1) translateY(0);
        }

        .reward-glow {
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
            animation: rotateGlow 10s linear infinite;
            pointer-events: none;
        }

        @keyframes rotateGlow {
            from {
                transform: rotate(0deg);
            }

            to {
                transform: rotate(360deg);
            }
        }

        .reward-icon {
            font-size: 5rem;
            margin-bottom: 1.5rem;
            filter: drop-shadow(0 10px 15px rgba(245, 158, 11, 0.4));
            display: inline-block;
            animation: bounceReward 2s infinite;
        }

        @keyframes bounceReward {

            0%,
            100% {
                transform: translateY(0);
            }

            50% {
                transform: translateY(-15px);
            }
        }

        .reward-title {
            font-family: 'Outfit', sans-serif;
            font-size: 2.25rem;
            font-weight: 800;
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 1rem;
        }

        .reward-text {
            color: #475569;
            font-size: 1.15rem;
            font-weight: 600;
            margin-bottom: 2.5rem;
            line-height: 1.6;
        }

        .btn-reward-close {
            background: #0f172a;
            color: white;
            border: none;
            padding: 1.25rem 2.5rem;
            border-radius: 16px;
            font-weight: 700;
            font-size: 1.1rem;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 10px 20px -5px rgba(15, 23, 42, 0.3);
        }

        .btn-reward-close:hover {
            transform: translateY(-3px);
            box-shadow: 0 15px 30px -5px rgba(15, 23, 42, 0.4);
            background: #1e293b;
        }

        @keyframes popIn {
            0% {
                transform: scale(0) rotate(-10deg);
                opacity: 0;
                filter: blur(10px);
            }

            50% {
                opacity: 1;
                filter: blur(0);
            }

            100% {
                transform: scale(1) rotate(0);
                opacity: 1;
            }
        }

        /* --- MOTIVATION ENGINE --- */
        .motivation-card {
            background: #0f172a;
            color: white;
            border-radius: 18px;
            padding: 1.25rem 1.5rem;
            display: flex;
            align-items: center;
            gap: 1.25rem;
            box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.4);
            border: 1px solid rgba(255, 255, 255, 0.08);
            position: relative;
            overflow: hidden;
        }

        .motivation-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--primary), #ec4899);
        }

        .motivation-icon {
            font-size: 2rem;
            opacity: 0.9;
            flex-shrink: 0;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
        }

        .motivation-content {
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
        }

        .motivation-text {
            font-family: 'Outfit', sans-serif;
            font-size: 1.5rem;
            font-weight: 700;
            letter-spacing: 0.3px;
            color: #f8fafc;
            transition: opacity 0.4s ease;
            line-height: 1.3;
        }

        .motivation-text.fade-out {
            opacity: 0;
        }

        .motivation-subline {
            font-size: 0.75rem;
            font-weight: 800;
            color: #818cf8;
            text-transform: uppercase;
            letter-spacing: 1.5px;
        }

        /* --- MAIN VIEW (GÜNLÜK PLAN) --- */
        .main-content {
            display: flex;
            flex-direction: column;
            gap: 2rem;
        }

        .tabs-wrapper {
            display: flex;
            gap: 0.5rem;
            background: var(--surface);
            padding: 0.75rem;
            border-radius: 20px;
            box-shadow: var(--shadow-sm);
            border: 1px solid var(--border);
            overflow-x: auto;
        }

        .tabs-wrapper::-webkit-scrollbar {
            display: none;
        }

        .day-tab {
            flex-shrink: 0;
            padding: 0.55rem 0.75rem;
            border-radius: 12px;
            font-family: 'Outfit', sans-serif;
            font-size: 0.85rem;
            font-weight: 700;
            color: var(--text-muted);
            background: transparent;
            border: none;
            cursor: pointer;
            transition: var(--transition);
            position: relative;
            white-space: nowrap;
        }
        @media (max-width: 1400px) {
            .day-tab { padding: 0.5rem 0.6rem; font-size: 0.78rem; }
        }

        .day-tab:hover {
            color: var(--primary);
            background: var(--bg-body);
        }

        .day-tab.active {
            background: var(--primary);
            color: white;
            box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
            transform: translateY(-2px);
        }

        /* --- SCHEDULE RENDER AREA --- */
        .day-header {
            margin-bottom: 2rem;
            animation: fadeIn 0.4s ease;
        }

        .day-header h2 {
            font-family: 'Outfit', sans-serif;
            font-size: 2.5rem;
            font-weight: 800;
            margin-bottom: 0.5rem;
            transition: color 0.3s;
        }

        .day-theme-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            border-radius: 30px;
            font-weight: 600;
            font-size: 0.95rem;
            transition: all 0.3s;
        }

        .timeline {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .time-block {
            display: flex;
            background: var(--surface);
            border-radius: 20px;
            box-shadow: var(--shadow-md);
            border: 1px solid var(--border);
            overflow: hidden;
            transition: var(--transition);
            animation: slideUp 0.4s ease backwards;
        }

        .time-block:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-lg);
        }

        /* Timeline Left indicator (Time) */
        .time-col {
            width: 140px;
            padding: 1.5rem;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            border-right: 1px dashed var(--border);
            background: var(--bg-body);
            flex-shrink: 0;
        }

        .time-text {
            font-family: 'Outfit', sans-serif;
            font-weight: 700;
            font-size: 1.1rem;
            color: var(--text-main);
            text-align: center;
            line-height: 1.2;
        }

        /* Content Area */
        .content-col {
            padding: 1.5rem;
            flex-grow: 1;
        }

        .mola-block {
            background: repeating-linear-gradient(45deg, var(--bg-body), var(--bg-body) 10px, rgba(0, 0, 0, 0.02) 10px, rgba(0, 0, 0, 0.02) 20px);
            opacity: 0.8;
            box-shadow: none;
        }

        .block-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.5rem;
        }

        .block-title {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            font-family: 'Outfit', sans-serif;
            font-size: 1.35rem;
            color: var(--text-main);
        }

        .block-desc {
            color: var(--text-muted);
            font-size: 0.95rem;
            margin-bottom: 1rem;
        }

        .stats-badge {
            background: var(--primary);
            color: white;
            padding: 0.5rem 1rem;
            border-radius: 12px;
            font-weight: 800;
            font-size: 1.1rem;
            white-space: nowrap;
            box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
            font-family: 'Outfit', sans-serif;
            text-transform: uppercase;
        }

        .task-list {
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            background: var(--bg-body);
            padding: 1rem;
            border-radius: 12px;
            border: 1px solid var(--border);
        }

        .task-item {
            display: flex;
            align-items: flex-start;
            gap: 0.5rem;
            font-size: 0.9rem;
            color: var(--text-main);
        }

        .task-item::before {
            content: '•';
            color: var(--primary);
            font-weight: bold;
        }

        /* --- RESPONSIVE --- */
        @media (max-width: 1280px) {
            /* Tablet: 2 kolon → Main (sol) + Sağ Sidebar; Sol sidebar altta */
            .app-container {
                grid-template-columns: 1fr minmax(280px, 320px);
            }
            .app-container > .main-content { order: 1; grid-column: 1; }
            .app-container > .sidebar-right { order: 2; grid-column: 2; }
            .app-container > .sidebar-left { order: 3; grid-column: 1 / -1; }
        }

        @media (max-width: 992px) {
            /* Mobil: tek kolon, sıra: Sol → Main → Sağ */
            .app-container {
                grid-template-columns: 1fr;
            }
            .app-container > .sidebar-left { order: 1; grid-column: 1; }
            .app-container > .main-content { order: 2; grid-column: 1; }
            .app-container > .sidebar-right { order: 3; grid-column: 1; }

            .sidebar {
                position: relative;
                top: 0;
            }

            .time-block {
                flex-direction: column;
            }

            .time-col {
                width: 100%;
                padding: 1rem;
                border-right: none;
                border-bottom: 1px dashed var(--border);
                align-items: flex-start;
                background: transparent;
            }
        }

        /* --- ANIMATIONS --- */
        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        .fade-container {
            animation: fadeIn 0.3s ease;
        }

        /* --- DYNAMIC ADDITIONS --- */
        .block-title {
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .block-title.completed {
            opacity: 0.7;
        }

        .block-title.completed .block-text {
            text-decoration: line-through;
            color: var(--text-muted);
        }

        .block-title .custom-checkbox {
            margin-right: 0.25rem;
            cursor: pointer;
        }

        .block-title.completed .custom-checkbox {
            background: var(--primary);
            border-color: var(--primary);
            box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
        }

        .block-title.completed .custom-checkbox svg {
            opacity: 1;
            transform: scale(1) rotate(0deg);
        }

        .app-success .block-title.completed .custom-checkbox {
            background: #10b981;
            border-color: #10b981;
            box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
        }

        /* --- ERROR BANK STYLES --- */
        .btn-add-error {
            background: rgba(79, 70, 229, 0.05);
            color: var(--primary);
            border: 1px dashed var(--primary);
            padding: 0.35rem 0.65rem;
            border-radius: 8px;
            font-size: 0.75rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 0.35rem;
            margin-top: 0.5rem;
        }

        .btn-add-error:hover {
            background: var(--primary);
            color: white;
            border-style: solid;
        }

        /* Error Tab Summary Cards */
        .error-summary-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 1rem;
            margin-bottom: 2rem;
        }

        .error-summary-card {
            background: white;
            padding: 1.5rem;
            border-radius: 20px;
            border: 1px solid var(--border);
            text-align: center;
            box-shadow: var(--shadow-sm);
        }

        .error-summary-val {
            font-size: 2rem;
            font-weight: 800;
            color: var(--primary);
            font-family: 'Outfit', sans-serif;
            display: block;
        }

        .error-summary-label {
            font-size: 0.85rem;
            color: var(--text-muted);
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        /* Error List */
        .error-day-group {
            margin-bottom: 2.5rem;
        }

        .error-day-title {
            font-family: 'Outfit', sans-serif;
            font-size: 1.25rem;
            font-weight: 700;
            margin-bottom: 1rem;
            padding-bottom: 0.5rem;
            border-bottom: 2px solid var(--primary-light);
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .error-item {
            background: white;
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 1rem 1.5rem;
            margin-bottom: 0.75rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: var(--transition);
        }

        .error-item:hover {
            transform: translateX(5px);
            border-color: var(--primary-light);
            box-shadow: var(--shadow-md);
        }

        .error-item.resolved {
            opacity: 0.6;
            background: var(--bg-body);
        }

        .error-main-info {
            display: flex;
            align-items: center;
            gap: 1rem;
            flex-grow: 1;
        }

        .error-badge {
            padding: 0.25rem 0.6rem;
            border-radius: 6px;
            font-size: 0.7rem;
            font-weight: 800;
            text-transform: uppercase;
        }

        .error-badge-type {
            background: #fef3c7;
            color: #92400e;
        }

        .error-badge-lesson {
            background: #e0e7ff;
            color: #3730a3;
        }

        .error-text-content {
            display: flex;
            flex-direction: column;
        }

        .error-topic {
            font-weight: 700;
            font-size: 1rem;
            color: var(--text-main);
        }

        .error-note {
            font-size: 0.85rem;
            color: var(--text-muted);
        }

        .error-actions {
            display: flex;
            gap: 0.5rem;
        }

        .btn-action {
            width: 36px;
            height: 36px;
            border-radius: 10px;
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
        }

        .btn-resolve {
            background: #ecfdf5;
            color: #059669;
        }

        .btn-resolve:hover {
            background: #059669;
            color: white;
        }

        .btn-delete {
            background: #fef2f2;
            color: #dc2626;
        }

        .btn-delete:hover {
            background: #dc2626;
            color: white;
        }

        /* Modal Styles */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(15, 23, 42, 0.6);
            backdrop-filter: blur(4px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 10000;
        }

        .modal-overlay.active {
            display: flex;
        }

        .modal-content {
            background: white;
            width: 100%;
            max-width: 450px;
            border-radius: 24px;
            padding: 2rem;
            box-shadow: var(--shadow-lg);
            animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        @keyframes modalIn {
            from {
                transform: scale(0.9);
                opacity: 0;
            }

            to {
                transform: scale(1);
                opacity: 1;
            }
        }

        .modal-header {
            margin-bottom: 1.5rem;
        }

        .modal-header h3 {
            font-family: 'Outfit', sans-serif;
            font-size: 1.5rem;
            color: var(--text-main);
        }

        .form-group {
            margin-bottom: 1.25rem;
        }

        .form-group label {
            display: block;
            font-size: 0.85rem;
            font-weight: 700;
            color: var(--text-muted);
            margin-bottom: 0.5rem;
            text-transform: uppercase;
        }

        .form-control {
            width: 100%;
            padding: 0.75rem 1rem;
            border-radius: 12px;
            border: 1px solid var(--border);
            font-size: 1rem;
            outline: none;
            transition: border-color 0.2s;
        }

        .form-control:focus {
            border-color: var(--primary);
        }

        .type-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.5rem;
        }

        .type-btn {
            padding: 0.5rem;
            border-radius: 10px;
            border: 1px solid var(--border);
            background: white;
            font-size: 0.8rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

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

        .modal-footer {
            display: flex;
            gap: 1rem;
            margin-top: 2rem;
        }

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

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

        .btn-save:hover {
            background: #4338ca;
        }

        .btn-cancel {
            background: var(--bg-body);
            color: var(--text-muted);
        }

        .error-filters {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1.5rem;
            overflow-x: auto;
            padding-bottom: 0.5rem;
        }

        .filter-btn {
            white-space: nowrap;
            padding: 0.5rem 1rem;
            border-radius: 30px;
            background: white;
            border: 1px solid var(--border);
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .filter-btn.active {
            background: var(--text-main);
            color: white;
            border-color: var(--text-main);
        }

        /* WEEKLY REPORT STYLES */
        .report-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 1.25rem;
            margin-bottom: 2rem;
        }

        .report-summary-card {
            background: white;
            padding: 1.5rem;
            border-radius: 20px;
            border: 1px solid var(--border);
            text-align: center;
            box-shadow: var(--shadow-sm);
            transition: transform 0.2s;
        }

        .report-val {
            display: block;
            font-size: 1.75rem;
            font-weight: 800;
            color: var(--text-main);
            margin-bottom: 0.5rem;
        }

        .report-label {
            font-size: 0.85rem;
            color: var(--text-muted);
            font-weight: 600;
        }

        .day-report-list {
            display: flex;
            flex-direction: column;
            gap: 1rem;
            background: white;
            padding: 1.5rem;
            border-radius: 24px;
            border: 1px solid var(--border);
        }

        .day-progress-row {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .day-progress-row .day-name {
            width: 100px;
            font-weight: 700;
            color: var(--text-main);
        }

        .day-progress-row .bar-container {
            flex: 1;
            height: 12px;
            background: #f1f5f9;
            border-radius: 6px;
            overflow: hidden;
        }

        .day-progress-row .bar-fill {
            height: 100%;
            background: var(--text-main);
            border-radius: 6px;
            transition: width 0.6s ease;
        }

        .day-progress-row .percentage {
            width: 50px;
            text-align: right;
            font-weight: 800;
            color: var(--text-main);
            font-size: 0.9rem;
        }

        .week-selector-container {
            margin-bottom: 1.5rem;
            display: flex;
            justify-content: flex-end;
            align-items: center;
            gap: 1rem;
        }

        .week-select {
            padding: 0.6rem 1.2rem;
            border-radius: 12px;
            border: 1px solid var(--border);
            background: white;
            font-weight: 600;
            color: var(--text-main);
            cursor: pointer;
            outline: none;
        }

        /* --- KRONOMETRE STYLES --- */
        .timer-container {
            background: white;
            padding: 3.5rem 2rem;
            border-radius: 24px;
            border: 1px solid var(--border);
            box-shadow: var(--shadow-sm);
            text-align: center;
            margin-top: 1rem;
            position: relative;
            overflow: hidden;
        }

        .timer-circle {
            width: 280px;
            height: 280px;
            margin: 0 auto 2.5rem;
            border-radius: 50%;
            background: var(--bg-body);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            position: relative;
            box-shadow: 0 0 0 12px var(--primary-light), inset 0 8px 16px rgba(0, 0, 0, 0.05);
            border: 4px solid white;
            transition: all 0.4s ease;
        }

        .timer-circle.break-mode {
            box-shadow: 0 0 0 12px #ecfccb, inset 0 8px 16px rgba(0, 0, 0, 0.05);
        }

        .timer-display {
            font-family: 'Outfit', sans-serif;
            font-size: 5.5rem;
            font-weight: 800;
            color: var(--text-main);
            line-height: 1;
            letter-spacing: -2px;
        }

        .timer-label {
            font-size: 1.1rem;
            font-weight: 800;
            color: var(--primary);
            text-transform: uppercase;
            letter-spacing: 2px;
            margin-top: 0.5rem;
            opacity: 0.9;
        }

        .timer-circle.break-mode {
            box-shadow: 0 0 0 12px #ecfccb, inset 0 8px 16px rgba(0, 0, 0, 0.05);
        }

        .timer-circle.sozel-mode {
            box-shadow: 0 0 0 12px #fdf2f8, inset 0 8px 16px rgba(0, 0, 0, 0.05);
        }

        .timer-circle.sayisal-mode {
            box-shadow: 0 0 0 12px #eff6ff, inset 0 8px 16px rgba(0, 0, 0, 0.05);
        }

        .timer-controls {
            display: flex;
            justify-content: center;
            gap: 1.25rem;
            margin-bottom: 2.5rem;
        }

        .btn-timer {
            width: 64px;
            height: 64px;
            border-radius: 50%;
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: var(--shadow-md);
        }

        .btn-timer-play {
            background: var(--primary);
            color: white;
            box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
        }

        .btn-timer-play:hover {
            transform: scale(1.1);
            box-shadow: 0 12px 25px rgba(79, 70, 229, 0.4);
        }

        .btn-timer-pause {
            background: #f59e0b;
            color: white;
            box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
        }

        .btn-timer-pause:hover {
            transform: scale(1.1);
            box-shadow: 0 12px 25px rgba(245, 158, 11, 0.4);
        }

        .btn-timer-reset {
            background: var(--surface);
            color: var(--text-muted);
            border: 1px solid var(--border);
            box-shadow: none;
        }

        .btn-timer-reset:hover {
            background: var(--bg-body);
            transform: scale(1.1);
        }

        .timer-modes {
            display: flex;
            justify-content: center;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .btn-mode {
            padding: 0.85rem 1.5rem;
            border-radius: 16px;
            border: 1px solid var(--border);
            background: white;
            font-weight: 700;
            font-size: 0.95rem;
            color: var(--text-muted);
            cursor: pointer;
            transition: all 0.2s;
            font-family: 'Outfit', sans-serif;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .btn-mode:hover {
            background: var(--bg-body);
        }

        .btn-mode.active-study {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
            box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
        }

        .btn-mode.active-break {
            background: #65a30d;
            color: white;
            border-color: #65a30d;
            box-shadow: 0 4px 12px rgba(101, 163, 13, 0.2);
        }

        .btn-mode.active-sozel {
            background: #ec4899;
            color: white;
            border-color: #ec4899;
            box-shadow: 0 4px 12px rgba(236, 72, 153, 0.2);
        }

        .btn-mode.active-sayisal {
            background: #3b82f6;
            color: white;
            border-color: #3b82f6;
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
        }

        /* --- DETAILED STATS TABLE --- */
        .detailed-stats-container {
            background: white;
            padding: 1.5rem;
            border-radius: 20px;
            border: 1px solid var(--border);
            box-shadow: var(--shadow-sm);
            margin-bottom: 2rem;
            overflow: hidden;
        }

        .stats-table-wrapper {
            overflow-x: auto;
            margin-top: 1rem;
        }

        .stats-table {
            width: 100%;
            border-collapse: collapse;
            text-align: left;
            font-size: 0.9rem;
        }

        .stats-table th {
            padding: 1rem;
            background: var(--bg-body);
            color: var(--text-muted);
            font-weight: 700;
            text-transform: uppercase;
            font-size: 0.75rem;
            letter-spacing: 0.5px;
            border-bottom: 2px solid var(--border);
        }

        .stats-table td {
            padding: 1rem;
            border-bottom: 1px solid var(--border);
            color: var(--text-main);
            vertical-align: middle;
        }

        .stats-table tr:last-child td {
            border-bottom: none;
        }

        .stats-table tr:hover {
            background: rgba(79, 70, 229, 0.02);
        }

        .lesson-cell {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            font-weight: 700;
        }

        .lesson-icon {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
            background: var(--bg-body);
        }

        .progress-mini-bar {
            width: 120px;
            height: 8px;
            background: #f1f5f9;
            border-radius: 4px;
            overflow: hidden;
            display: inline-block;
            vertical-align: middle;
            margin-right: 0.5rem;
        }

        .progress-mini-fill {
            height: 100%;
            border-radius: 4px;
            transition: width 0.6s ease;
        }

        .badge-success {
            padding: 0.25rem 0.5rem;
            border-radius: 6px;
            background: #ecfdf5;
            color: #059669;
            font-weight: 800;
            font-size: 0.75rem;
        }

        .badge-warning {
            padding: 0.25rem 0.5rem;
            border-radius: 6px;
            background: #fffbeb;
            color: #d97706;
            font-weight: 800;
            font-size: 0.75rem;
        }

        .badge-danger {
            padding: 0.25rem 0.5rem;
            border-radius: 6px;
            background: #fef2f2;
            color: #dc2626;
            font-weight: 800;
            font-size: 0.75rem;
        }

        /* --- ERROR DETAIL HOVER STYLES --- */
        .error-analysis-item {
            position: relative;
            margin-bottom: 1.25rem;
            cursor: help;
        }

        .error-detail-popup {
            position: absolute;
            bottom: 110%;
            left: 50%;
            transform: translateX(-50%) translateY(10px);
            width: 300px;
            background: white;
            border-radius: 16px;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
            border: 1px solid var(--border);
            padding: 1.25rem;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            pointer-events: none;
        }

        .error-analysis-item:hover .error-detail-popup {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(0);
        }

        .error-detail-popup::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            margin-left: -8px;
            border-width: 8px;
            border-style: solid;
            border-color: white transparent transparent transparent;
        }

        .popup-title {
            font-weight: 800;
            font-size: 0.9rem;
            color: var(--text-main);
            margin-bottom: 0.75rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            border-bottom: 1px solid var(--border);
            padding-bottom: 0.5rem;
        }

        .popup-section-label {
            font-size: 0.7rem;
            font-weight: 800;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 0.5rem;
        }

        .popup-list {
            list-style: none;
            padding: 0;
            margin: 0 0 1rem 0;
        }

        .popup-list-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.8rem;
            margin-bottom: 0.35rem;
            color: var(--text-main);
        }

        .popup-badge {
            font-size: 0.65rem;
            font-weight: 700;
            padding: 0.15rem 0.4rem;
            border-radius: 4px;
            background: var(--bg-body);
            color: var(--text-muted);
        }

        .popup-note-box {
            background: var(--bg-body);
            padding: 0.6rem;
            border-radius: 8px;
            font-size: 0.75rem;
            font-style: italic;
            color: var(--text-muted);
            line-height: 1.4;
            max-height: 80px;
            overflow-y: auto;
        }

        .week-select {
            appearance: none;
            background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236366f1' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") no-repeat right 0.8rem center;
            padding-right: 2.2rem !important;
            font-weight: 800;
            color: var(--primary);
            cursor: pointer;
            transition: all 0.2s;
            box-shadow: var(--shadow-sm);
            border: 1px solid var(--border);
            border-radius: 10px;
        }

        .week-select:hover {
            border-color: var(--primary);
            box-shadow: var(--shadow-md);
        }
