        @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&family=Poppins:wght@400;600&display=swap');

        :root {
            --primary-color: #2c3e50;
            --secondary-color: #3498db;
            --bg-color: #f4f7f6;
            --card-bg: #ffffff;
            --text-color: #333;
            --remember-color: #2ecc71;
            --forget-color: #e74c3c;
        }

        * {
            box-sizing: border-box;
            user-select: none;
        }

        /* GANTI SELURUH BLOK body ANDA DENGAN INI */
			body {
				font-family: 'Poppins', 'Noto Sans JP', sans-serif;
				background-color: var(--bg-color);
				color: var(--text-color);
				margin: 0;
				padding: 0;
				display: flex;
				justify-content: center;
				align-items: center;
				overflow: hidden;

				/* --- Aturan Default untuk DESKTOP --- */
				height: 100vh;
			}

			/* --- Aturan KHUSUS untuk MOBILE --- */
			/* (Hanya aktif jika lebar layar 768px ke bawah) */
			@media (max-width: 768px) {
				body {
					/* Menggunakan unit yang memperhitungkan UI browser/sistem operasi */
					height: 100svh; /* svh = Smallest Viewport Height */
					/* Fallback untuk browser yang lebih lama */
					height: -webkit-fill-available;
				}
			}

        .app-container {
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            align-items: center;
            padding: 15px;
        }

        .header-container {
            width: 100%;
            max-width: 420px;
            flex-shrink: 0;
            margin-bottom: 10px;
        }
        
        #progress-text {
            text-align: center;
            font-weight: 600;
            color: var(--primary-color);
            margin-bottom: 8px;
            font-size: 1.1em;
        }
        
        .progress-bar-outer {
            width: 100%;
            height: 12px;
            background-color: #e0e0e0;
            border-radius: 6px;
            overflow: hidden;
        }

        .progress-bar-inner {
            height: 100%;
            width: 0%;
            background-color: var(--secondary-color);
            border-radius: 6px;
            transition: width 0.4s ease-in-out;
        }
        
        .stats-container {
            display: flex;
            justify-content: space-between;
            margin-top: 8px;
            font-size: 1.1em;
            font-weight: 600;
        }
        
        .stat-box {
            padding: 5px 10px;
            border-radius: 8px;
            color: white;
        }
        
        #lupa-box { background-color: var(--forget-color); }
        #ingat-box { background-color: var(--remember-color); }

        .deck-container {
            flex-grow: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
            perspective: 1000px;
            padding: 10px 0;
        }

        .flashcard {
            position: relative;
            cursor: pointer;
            transition: transform 0.3s ease-out;
            height: 100%; 
            aspect-ratio: 5 / 7; 
            max-width: 400px; 
			
        }
		
		        
        .flashcard-inner {
            position: absolute;
            width: 100%;
            height: 100%;
            transform-style: preserve-3d;
            transition: transform 0.6s;
            box-shadow: 0 0 15px 5px rgba(0, 0, 0, 0.3);
            border-radius: 20px;
        }
        
        .flashcard.is-flipped .flashcard-inner {
            transform: rotateY(180deg);
        }

        .flashcard-front, .flashcard-back {
            position: absolute;
            width: 100%;
            height: 100%;
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
            border-radius: 20px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding: 20px;
            background-color: var(--card-bg);
        }

        .flashcard-back {
            transform: rotateY(180deg);
            justify-content: center;
            text-align: center;
        }
        
        /* [KUNCI PERBAIKAN] Ukuran font responsif */
        .kanji-char { font-size: clamp(3em, 15vw, 5.5em); white-space: nowrap;}
        .reading { font-weight: 600; color: var(--secondary-color); font-size: clamp(0.9em, 5vw, 1.3em); margin-bottom: 5px; }
        .meaning { font-weight: bold; font-size: clamp(1em, 6vw, 1.6em); margin-bottom: 10px; }
        .divider { width: 80%; border: 0; border-top: 1px solid #ddd; margin: 10px auto; }
        .example { font-weight: bold; font-size: clamp(0.8em, 4.5vw, 1.2em); line-height: 1.6; }
        .example-trans { font-style: italic; font-size: clamp(0.7em, 3.5vw, 0.9em); color: #7f8c8d; margin-top: 10px; }
		.kanji-char-medium {
			font-size: clamp(3em, 15vw, 5.5em) !important;
		}
		.kanji-char-long {
			font-size: clamp(2.5em, 12vw, 4.5em) !important;
		}

        /* [KUNCI PERBAIKAN] Ukuran Kartu Mobile Dibuat Lebih Ringkas */
        @media (max-width: 600px) {
            .flashcard {
                /* Menggunakan unit viewport height, tapi dibatasi agar tidak terlalu besar */
                height: 65vh; 
                max-height: 480px;
            }
        }


        .actions-container {
            display: flex;
            justify-content: space-around;
            width: 100%;
            max-width: 400px;
            padding-top: 10px;
            flex-shrink: 0;
        }

        .action-btn {
            padding: 15px 30px;
            font-size: 1.2em;
            font-weight: 600;
            border: 2px solid var(--primary-color);
            border-radius: 10px;
            background-color: transparent;
            color: var(--primary-color);
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        #lupa-btn:hover { background-color: #ffdde0; border-color: var(--forget-color); }
        #ingat-btn:hover { background-color: #d4efdf; border-color: var(--remember-color); }

        #lupa-btn.feedback { background-color: var(--forget-color); color: white; border-color: var(--forget-color); }
        #ingat-btn.feedback { background-color: var(--remember-color); color: white; border-color: var(--remember-color); }

        .swipe-overlay {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            border-radius: 20px; opacity: 0; display: flex; justify-content: center;
            align-items: center; font-size: 4em; color: white; font-weight: bold; pointer-events: none;
            z-index: 10;
        }
        .swipe-overlay.forget { background-color: rgba(231, 76, 60, 0.7); }
        .swipe-overlay.remember { background-color: rgba(46, 204, 113, 0.7); }

        .flashcard.show-forget-feedback .flashcard-inner::after,
        .flashcard.show-remember-feedback .flashcard-inner::after {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            border-radius: 20px;
            z-index: 5;
            opacity: 1;
            transition: opacity 0.4s ease-out;
        }
        .flashcard.show-forget-feedback .flashcard-inner::after { background-color: rgba(231, 76, 60, 0.5); }
        .flashcard.show-remember-feedback .flashcard-inner::after { background-color: rgba(46, 204, 113, 0.5); }

        .results-screen {
            display: flex; flex-direction: column; justify-content: center; align-items: center;
            text-align: center; width: 100%; max-width: 500px; padding: 30px;
        }
        .results-card {
            background-color: var(--card-bg); padding: 30px; border-radius: 20px;
            box-shadow: 0 0 15px 5px rgba(0, 0, 0, 0.3); text-align: center;
            width: 90%; max-width: 500px;         
        }
        .results-card h2 { font-size: 2.2em; color: var(--primary-color); margin-bottom: 20px; }
        .chart-container { position: relative; width: 180px; height: 180px; margin: 10px auto 25px; }
        .chart-container svg { width: 100%; height: 100%; transform: rotate(-90deg); }
        .chart-circle { stroke-width: 15px; fill: none; }
        .chart-background { stroke: #e6e6e6; }
        .chart-progress { stroke: var(--remember-color); stroke-linecap: round; transition: stroke-dashoffset 1.5s ease-out; }
        .chart-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 2.5em; font-weight: 700; color: var(--primary-color); }
        .results-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 25px; }
        .results-stat-box { padding: 15px; border-radius: 10px; }
        .results-stat-box .label { font-size: 1em; font-weight: 600; }
        .results-stat-box .count { font-size: 2em; font-weight: 700; }
        .stat-ingat { background-color: #d4efdf; color: var(--remember-color); }
        .stat-lupa { background-color: #ffdde0; color: var(--forget-color); }
        .results-conclusion { font-size: 1.1em; font-weight: 600; margin-bottom: 30px; }
        .restart-btn { padding: 15px 40px; font-size: 1.2em; font-weight: 600; cursor: pointer; background-color: var(--secondary-color); color: white; border: none; border-radius: 10px; transition: filter 0.2s ease; }
        .restart-btn:hover { filter: brightness(110%); }

        .hidden { display: none; }
   