﻿        :root {
            --primary-color: #ff8c00; /* 元気なオレンジ */
            --secondary-color: #ffcf00; /* 明るいイエロー */
            --bg-color: #fffdf0; /* 優しいクリーム色 */
            --text-color: #5a4b3b; /* 濃いめの茶色（読みやすさ重視） */
            --white: #ffffff;
            --success: #66bb6a; /* 優しいグリーン */
            --error: #ef5350; /* ソフトなレッド */
            --gray: #b0bec5;
            --sky-blue: #81d4fa;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Zen Maru Gothic', sans-serif; /* 丸文字フォントを適用 */
        }

        body {
            background-color: var(--bg-color);
            background-image: radial-gradient(var(--secondary-color) 1px, transparent 1px);
            background-size: 20px 20px; /* ドット柄背景 */
            color: var(--text-color);
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            overflow: hidden;
        }

        .container {
            background-color: var(--white);
            width: 90%;
            max-width: 550px;
            padding: 2.5rem;
            border-radius: 40px; /* 角をさらに丸く */
            border: 8px solid var(--secondary-color); /* 太めの枠線で可愛く */
            box-shadow: 0 15px 0 rgba(0,0,0,0.05); /* 平面的な影 */
            text-align: center;
            position: relative;
            max-height: 95vh;
            overflow-y: auto;
        }

        .screen { display: none; }
        .screen.active { display: block; animation: bounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

        @keyframes bounceIn {
            from { opacity: 0; transform: scale(0.9); }
            to { opacity: 1; transform: scale(1); }
        }

        h1 { 
            color: var(--primary-color); 
            margin-bottom: 1.5rem; 
            font-size: 2.2rem;
            text-shadow: 2px 2px 0px #fff, 4px 4px 0px var(--secondary-color);
        }

        /* アイコンのスタイル調整 */
        .icon-inline {
            vertical-align: middle;
            margin: 0 4px;
            display: inline-block;
            width: 1.2em;
            height: 1.2em;
            stroke-width: 2.5px;
        }

        .btn-group { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-top: 1rem; }
        .btn-row { display: flex; gap: 1rem; width: 100%; max-width: 450px; justify-content: center; }
        
        .btn {
            background-color: var(--primary-color); 
            color: white; 
            border: none; 
            padding: 15px 30px;
            font-size: 1.4rem; 
            border-radius: 100px; /* カプセル型 */
            cursor: pointer; 
            transition: all 0.2s;
            box-shadow: 0 6px 0 #d47500; /* 押しボタン風 */
            width: 100%; 
            max-width: 250px;
            font-weight: bold;
            position: relative;
        }
        .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 #d47500; }
        .btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #d47500; }
        
        .btn.hard { background-color: var(--sky-blue); box-shadow: 0 6px 0 #0288d1; }
        .btn.hard:hover { box-shadow: 0 8px 0 #0288d1; }
        .btn.hard:active { box-shadow: 0 2px 0 #0288d1; }

        .btn.secondary { background-color: var(--gray); font-size: 1rem; box-shadow: 0 6px 0 #78909c; }
        .btn.skip { background-color: #cfd8dc; font-size: 1rem; padding: 10px 20px; width: auto; margin-top: 15px; box-shadow: 0 4px 0 #90a4ae; color: #546e7a; }
        .btn.admin { background-color: #546e7a; font-size: 0.8rem; padding: 6px 12px; box-shadow: none; border-radius: 8px; }

        #admin-panel {
            margin-top: 25px; padding: 15px; border: 3px dashed var(--secondary-color); border-radius: 20px;
            background: #fffef9; display: none; text-align: left;
        }
        .admin-title { font-size: 0.9rem; margin-bottom: 10px; font-weight: bold; color: var(--primary-color); }
        .admin-link { position: absolute; bottom: 15px; right: 25px; font-size: 0.8rem; color: var(--gray); cursor: pointer; }

        .stats { display: flex; justify-content: space-between; margin-bottom: 1.5rem; font-weight: bold; font-size: 1.2rem; gap: 10px; }
        .stat-item { 
            background: #fff9c4; 
            padding: 12px; 
            border-radius: 20px; 
            flex: 1; 
            border: 3px solid var(--secondary-color);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
        }
        .progress-info { font-size: 1rem; color: #8d6e63; margin-bottom: 0.8rem; font-weight: bold; }
        .timer-val { color: var(--error); font-size: 1.4rem; }

        .time-bonus {
            position: absolute; top: -30px; right: 10px; color: var(--success); font-weight: bold; font-size: 1.5rem;
            animation: floatUp 0.8s ease-out forwards; pointer-events: none; opacity: 0;
        }
        @keyframes floatUp { 0% { transform: translateY(0) scale(1); opacity: 1; } 100% { transform: translateY(-40px) scale(1.5); opacity: 0; } }

        .display-area { margin: 1.5rem 0; padding: 1rem; background: #f0f4f8; border-radius: 30px; border: 4px inset #fff; }
        .word-display { font-size: 3.5rem; font-weight: bold; letter-spacing: 2px; color: var(--primary-color); margin-bottom: 0.5rem; text-shadow: 2px 2px 0 #fff; }
        .meaning-display { font-size: 1.5rem; color: #795548; height: 1.8rem; margin-bottom: 1rem; }

        .input-container { position: relative; width: 100%; }
        .input-field {
            width: 100%; padding: 18px; font-size: 2rem; border: 4px solid var(--secondary-color);
            border-radius: 25px; outline: none; text-align: center; transition: all 0.2s;
            background: #fff; color: var(--text-color);
            box-shadow: inset 0 4px 6px rgba(0,0,0,0.05);
        }
        .input-field:focus { border-color: var(--primary-color); background-color: #fffde7; }
        .input-field.input-correct { border-color: var(--success); color: var(--success); background-color: #e8f5e9; }
        .input-field.input-error { border-color: var(--error); color: var(--error); background-color: #ffebee; }

        .correct-flash { animation: flashSuccess 0.3s ease; }
        @keyframes flashSuccess { 0% { transform: scale(1); } 50% { transform: scale(1.05); background-color: #c8e6c9; } 100% { transform: scale(1); } }
        .error-shake { animation: shakeError 0.3s ease; }
        @keyframes shakeError { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-8px); } }

        .combo-pop { animation: pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
        @keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.5) rotate(5deg); } 100% { transform: scale(1); } }

        .result-score { font-size: 5rem; font-weight: bold; color: var(--primary-color); margin: 0.5rem 0; text-shadow: 3px 3px 0 var(--secondary-color); }
        .time-bonus-text { color: var(--sky-blue); font-size: 1.2rem; margin-bottom: 1rem; font-weight: bold; }
        .high-score-notice { font-size: 1.5rem; color: var(--success); font-weight: bold; margin-bottom: 1rem; animation: bounce 1s infinite; }
        @keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
        .history { margin: 1.5rem 0; font-size: 1.1rem; color: #8d6e63; font-weight: bold; display: flex; align-items: center; justify-content: center; gap: 8px; }

        .review-section { margin-top: 1.5rem; text-align: left; }
        .review-toggle { width: 100%; background: #e1f5fe; border: none; padding: 12px; border-radius: 15px; cursor: pointer; font-weight: bold; display: flex; justify-content: space-between; align-items: center; color: #0288d1; }
        .review-content { display: none; background: #fff; border: 2px solid #e1f5fe; padding: 10px; border-radius: 0 0 15px 15px; max-height: 150px; overflow-y: auto; }
        .review-content.show { display: block; }
        .review-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed #eee; font-size: 1.1rem; }
        .review-item .en { font-weight: bold; color: var(--primary-color); }

        @media (max-width: 480px) {
            .word-display { font-size: 2.5rem; }
            .container { padding: 1.5rem; border-width: 5px; }
            .btn { font-size: 1.2rem; }
        }
