:root {
            --bg-primary: #f0f9ff;
            --bg-secondary: #ffffff;
            --bg-accent: #e0f2fe;
            --text-primary: #0c4a6e;
            --text-secondary: #0369a1;
            --text-accent: #0284c7;
            --border-color: #bae6fd;
            --shadow-color: rgba(2, 132, 199, 0.2);
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
        }

        /* Utility-Klassen für CSS-Variablen (Tailwind-kompatibel) */
        .text-secondary    { color: var(--text-secondary); }
        .text-accent       { color: var(--text-accent); }
        .bg-accent         { background-color: var(--bg-accent); }
        .bg-secondary      { background-color: var(--bg-secondary); }
        .border-border-color { border-color: var(--border-color); }
        /* Hover-Varianten (Doppelpunkt muss in CSS-Klassen escaped werden) */
        .hover\:bg-accent:hover        { background-color: var(--bg-accent); }
        .hover\:text-accent:hover      { color: var(--text-accent); }
        .hover\:bg-border-color:hover  { background-color: var(--border-color); }

        .dark {
            --bg-primary: #0c2a4d;
            --bg-secondary: #0f3460;
            --bg-accent: #1a3d6d;
            --text-primary: #f0f9ff;
            --text-secondary: #bae6fd;
            --text-accent: #7dd3fc;
            --border-color: #1e40af;
            --shadow-color: rgba(56, 189, 248, 0.2);
            --success: #34d399;
            --warning: #fbbf24;
            --danger: #f87171;
        }

        body {
            font-family: 'Nunito', sans-serif;
            -webkit-tap-highlight-color: transparent;
            background-color: var(--bg-primary);
            color: var(--text-primary);
            transition: background-color 0.3s, color 0.3s;
            font-size: 16px;
            line-height: 1.6;
        }

        .modal-open {
            overflow: hidden;
        }

        .modal-content {
            animation: slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            background-color: var(--bg-primary);
        }

        @keyframes slide-up {
            from {
                transform: translateY(100%);
            }
            to {
                transform: translateY(0);
            }
        }
        .konfetti {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 9999;
            overflow: hidden;
        }

        .konfetti-stueck {
            position: absolute;
            top: -10px;
            width: 10px;
            height: 10px;
            border-radius: 2px;
            animation: konfetti-fallen 3s ease-in forwards;
        }

        @keyframes konfetti-fallen {
            0% {
                transform: translateY(-100vh) rotateZ(0deg);
                opacity: 1;
            }
            100% {
                transform: translateY(100vh) rotateZ(720deg);
                opacity: 0;
            }
        }

        .today-card {
            border: 3px solid var(--text-accent);
            transform: scale(1.02);
            box-shadow: 0 10px 25px -5px var(--shadow-color), 0 8px 10px -6px var(--shadow-color);
        }

        .tag-container {
            scroll-snap-type: x mandatory;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
        }

        .tag-container::-webkit-scrollbar {
            display: none;
        }

        .tag-karte {
            scroll-snap-align: center;
            transition: transform 0.3s ease;
            background-color: var(--bg-secondary);
        }

        .header-title {
            background: linear-gradient(45deg, #0284c7, #38bdf8);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            font-size: 2.25rem;
        }

        @media (min-width: 640px) {
            .header-title {
                font-size: 2.75rem;
            }
        }

        .dark .header-title {
            background: linear-gradient(45deg, #7dd3fc, #0284c7);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .task-card {
            animation: pop-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
            opacity: 0;
            transform: scale(0.95);
        }

        @keyframes pop-in {
            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        .progress-ring circle {
            transition: stroke-dashoffset 0.5s ease;
        }

        .task-input:focus {
            box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.3);
        }

        .category-btn.active {
            transform: translateY(-2px);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        }

        .empty-state {
            animation: fade-in 0.5s ease;
        }

        @keyframes fade-in {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }

        .pulse {
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0% {
                box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.4);
            }
            70% {
                box-shadow: 0 0 0 10px rgba(2, 132, 199, 0);
            }
            100% {
                box-shadow: 0 0 0 0 rgba(2, 132, 199, 0);
            }
        }

        .game-card {
            transition: all 0.3s ease;
        }

        .game-card:hover {
            transform: translateY(-5px);
        }

        .level-up {
            animation: level-up 1s ease;
        }

        @keyframes level-up {
            0% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.2);
            }
            100% {
                transform: scale(1);
            }
        }

        .coin {
            animation: coin-spin 2s infinite linear;
        }

        @keyframes coin-spin {
            0% {
                transform: rotateY(0);
            }
            100% {
                transform: rotateY(360deg);
            }
        }

        .minigame-modal {
            animation: slide-in 0.3s ease-out;
        }

        @keyframes slide-in {
            from {
                transform: translateY(20px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        /* Mobile-first responsive design */
        .task-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 1rem;
        }

        @media (min-width: 768px) {
            .task-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (min-width: 1024px) {
            .task-grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        .memory-card {
            aspect-ratio: 3/4;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
        }

        @media (min-width: 640px) {
            .memory-card {
                font-size: 2rem;
            }
        }

        .quiz-option {
            padding: 0.75rem;
            border-radius: 0.5rem;
            transition: all 0.2s;
        }

        .quiz-option:hover {
            transform: translateY(-2px);
        }

        .floating-button {
            position: fixed;
            z-index: 50;
            bottom: 2rem;
            right: 1rem;
        }

        @media (min-width: 640px) {
            .floating-button {
                right: 2rem;
            }
        }

        .nav-button {
            padding: 0.5rem 1rem;
            border-radius: 0.5rem;
            font-weight: 700;
            transition: all 0.2s;
        }

        @media (min-width: 640px) {
            .nav-button {
                padding: 0.5rem 1.5rem;
            }
        }

        .task-card-button {
            width: 2rem;
            height: 2rem;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
        }

        .progress-container {
            height: 0.5rem;
            border-radius: 0.25rem;
            overflow: hidden;
        }

        .progress-bar {
            height: 100%;
            transition: width 0.5s ease;
        }

        .stats-card {
            padding: 1rem;
            border-radius: 1rem;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        }

        /* Dark mode stats card text fix */
        .dark .stats-card {
            color: #f0f9ff;
        }

        .dark .stats-card .text-secondary {
            color: #bae6fd;
        }

        .dark .stats-card .text-sm {
            color: #bae6fd;
        }

        @media (min-width: 640px) {
            .stats-card {
                padding: 1.5rem;
            }
        }

        .game-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 1rem;
        }

        @media (min-width: 640px) {
            .game-grid {
                grid-template-columns: 1fr 1fr;
            }
        }

        .game-card {
            padding: 1rem;
            border-radius: 0.75rem;
            cursor: pointer;
        }


        .button-group {
            display: flex;
            gap: 1rem;
        }

        .btn {
            flex: 1;
            padding: 0.75rem;
            border-radius: 0.5rem;
            font-weight: 700;
            transition: all 0.2s;
        }

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

        .btn-primary:hover {
            background-color: #0369a1;
            transform: translateY(-2px);
        }

        .btn-secondary {
            background-color: var(--bg-accent);
            color: var(--text-secondary);
        }

        .btn-secondary:hover {
            background-color: var(--border-color);
        }

        .task-category-badge {
            font-size: 0.75rem;
            padding: 0.25rem 0.5rem;
            border-radius: 9999px;
            display: inline-block;
            margin-top: 0.25rem;
        }

        .task-name {
            font-weight: 700;
        }

        .task-duration {
            font-size: 0.875rem;
            font-weight: 400;
        }

        .task-actions {
            display: flex;
            gap: 0.25rem;
        }

        .task-card {
            padding: 1rem;
            border-radius: 0.75rem;
            border: 1px solid var(--border-color);
            background-color: var(--bg-accent);
            transition: all 0.2s;
        }

        .task-card.completed {
            opacity: 0.7;
        }

        .task-card.completed .task-name {
            text-decoration: line-through;
        }

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

        .day-title {
            font-size: 1.25rem;
            font-weight: 700;
        }

        .day-date {
            font-size: 0.875rem;
            font-weight: 400;
            color: var(--text-secondary);
        }

        .day-score {
            font-size: 1rem;
            font-weight: 700;
            padding: 0.25rem 0.75rem;
            border-radius: 9999px;
            background-color: #fef3c7;
            color: #92400e;
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }

        .tasks-container {
            min-height: 10rem;
        }

        .empty-tasks {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 2rem;
            border: 2px dashed var(--border-color);
            border-radius: 0.75rem;
        }

        .empty-tasks-icon {
            width: 4rem;
            height: 4rem;
            margin-bottom: 1rem;
            color: var(--text-secondary);
        }

        .empty-tasks-title {
            font-weight: 700;
            margin-bottom: 0.25rem;
        }

        .empty-tasks-text {
            font-size: 0.875rem;
            color: var(--text-secondary);
        }

        .week-navigation {
            display: flex;
            justify-content: space-around;
            background-color: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(4px);
            position: sticky;
            top: 1rem;
            z-index: 20;
            padding: 0.5rem;
            border-radius: 0.75rem;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            margin-bottom: 1.5rem;
        }

        .dark .week-navigation {
            background-color: rgba(15, 52, 96, 0.7);
        }

        .motivation-text {
            font-size: 1.125rem;
            color: var(--text-secondary);
            margin-top: 0.5rem;
        }

        .header-container {
            text-align: center;
            margin: 1.5rem 0;
            position: relative;
        }

        .theme-toggle {
            position: absolute;
            top: 0.5rem;
            right: 0.5rem;
            padding: 0.5rem;
            border-radius: 50%;
        }

        .coins-display {
            display: flex;
            align-items: center;
            gap: 0.25rem;
            padding: 0.25rem 0.75rem;
            border-radius: 9999px;
            background-color: #fef3c7;
            color: #92400e;
            font-weight: 700;
        }

        .game-section {
            background-color: var(--bg-secondary);
            border-radius: 1rem;
            padding: 1rem;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            margin-bottom: 1.5rem;
        }

        .game-section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
            font-size: 1.25rem;
            font-weight: 700;
        }

        .memory-board {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 0.5rem;
            margin-bottom: 1rem;
        }

        .quiz-progress {
            display: flex;
            justify-content: space-between;
            font-size: 0.875rem;
            color: var(--text-secondary);
            margin-bottom: 0.5rem;
        }

        .quiz-question {
            font-size: 1.125rem;
            font-weight: 700;
            text-align: center;
            margin-bottom: 1rem;
        }

        .quiz-options {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            margin-bottom: 1rem;
        }

        .ripple {
            position: absolute;
            border-radius: 50%;
            background-color: rgba(255, 255, 255, 0.7);
            transform: scale(0);
            animation: ripple 0.6s linear;
        }

        @keyframes ripple {
            to {
                transform: scale(4);
                opacity: 0;
            }
        }

        /* Modal Styles */
        .modal {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            max-width: 90vw;
            max-height: 80vh;
            background-color: var(--bg-secondary);
            border-radius: 1rem;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            padding: 1rem;
            z-index: 1000;
            overflow-y: auto;
        }

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

        .modal-title {
            font-size: 1.5rem;
            font-weight: 700;
        }

        .close-modal {
            cursor: pointer;
        }

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

        .form-label {
            display: block;
            font-size: 0.875rem;
            font-weight: 700;
            margin-bottom: 0.5rem;
        }

        .form-input {
            width: 100%;
            padding: 0.75rem;
            border-radius: 0.5rem;
            border: 1px solid var(--border-color);
            background-color: var(--bg-accent);
            transition: all 0.2s;
        }

        .button-group {
            display: flex;
            gap: 1rem;

        .btn {
            flex: 1;
            padding: 0.75rem;
            border-radius: 0.5rem;
            font-weight: 700;
            transition: all 0.2s;

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

        .btn-primary:hover {
            background-color: #0369a1;
            transform: translateY(-2px);

        .btn-secondary {
            background-color: var(--bg-accent);
            color: var(--text-secondary);

        .btn-secondary:hover {
            background-color: var(--border-color);
