        :root {
            --bg-dark: #0a0a1a; --bg-card: #12122a; --bg-card-hover: #1a1a3a;
            --accent-gold: #ffd700; --accent-cyan: #00f5ff; --accent-pink: #ff006e; --accent-purple: #8b5cf6;
            --text-primary: #ffffff; --text-secondary: #a0a0c0;
            --ball-yellow: linear-gradient(135deg, #ffd700, #ffed4a, #ffd700);
            --ball-blue: linear-gradient(135deg, #3b82f6, #60a5fa, #3b82f6);
            --ball-red: linear-gradient(135deg, #ef4444, #f87171, #ef4444);
            --ball-gray: linear-gradient(135deg, #374151, #6b7280, #374151);
            --ball-green: linear-gradient(135deg, #10b981, #34d399, #10b981);
            --ball-bonus: linear-gradient(135deg, #8b5cf6, #a78bfa, #8b5cf6);
            --grade-excellent: #10b981; --grade-good: #3b82f6; --grade-normal: #fbbf24; --grade-caution: #f97316; --grade-bad: #ef4444;
        }
        :root[data-theme="light"],
        html[data-theme="light"],
        body[data-theme="light"] {
            --bg-dark: #f0f2f5; --bg-card: #ffffff; --bg-card-hover: #f8f9fa;
            --text-primary: #1a1a2e; --text-secondary: #555577;
            --accent-gold: #b8860b; --accent-cyan: #0088aa;
            --accent-pink: #c0392b; --accent-purple: #6c3483;
            --ball-yellow: linear-gradient(135deg, #f39c12, #f1c40f, #f39c12);
            --ball-blue: linear-gradient(135deg, #2471a3, #2e86c1, #2471a3);
            --ball-red: linear-gradient(135deg, #c0392b, #e74c3c, #c0392b);
            --ball-gray: linear-gradient(135deg, #566573, #7f8c8d, #566573);
            --ball-green: linear-gradient(135deg, #1e8449, #27ae60, #1e8449);
            --ball-bonus: linear-gradient(135deg, #6c3483, #8e44ad, #6c3483);
            --grade-excellent: #1e8449; --grade-good: #2471a3; --grade-normal: #b7950b; --grade-caution: #d35400; --grade-bad: #c0392b;
        }
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            font-family: 'Noto Sans KR', sans-serif; background: var(--bg-dark); color: var(--text-primary); min-height: 100vh;
            transition: background 0.3s ease, color 0.3s ease;
            background-image: radial-gradient(circle at 20% 80%, rgba(139,92,246,0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(0,245,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(255,0,110,0.05) 0%, transparent 70%);
        }
        [data-theme="light"] body, body[data-theme="light"] { background-image: none !important; }
        .container { max-width: 900px; margin: 0 auto; padding: 20px; }
        header { text-align: center; padding: 40px 20px; position: relative; }
        .header-controls { position: absolute; top: 20px; right: 20px; z-index: 10; }
        .theme-toggle {
            width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2);
            background: var(--bg-card); color: var(--text-primary); font-size: 1.2rem;
            cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center;
        }
        .theme-toggle:hover { transform: scale(1.1); border-color: var(--accent-cyan); }
        .card, .status, .input-field, .btn, .number-btn, .sim-input, .stat-item, .pred-card, .dual-box, .detail-metric, .math-item {
            transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
        }
        .title {
            font-family: 'Black Han Sans', sans-serif; font-size: clamp(2rem, 6vw, 3.5rem);
            background: linear-gradient(135deg, var(--accent-gold), var(--accent-cyan));
            -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
            animation: titleGlow 3s ease-in-out infinite;
        }
        @keyframes titleGlow {
            0%, 100% { filter: drop-shadow(0 0 20px rgba(255,215,0,0.4)); }
            50% { filter: drop-shadow(0 0 30px rgba(0,245,255,0.6)); }
        }
        .card {
            background: var(--bg-card); border-radius: 20px; padding: 25px; margin-bottom: 20px;
            border: 1px solid rgba(255,255,255,0.05); box-shadow: 0 10px 40px rgba(0,0,0,0.3); transition: all 0.3s ease;
        }
        .card:hover { background: var(--bg-card-hover); border-color: rgba(139,92,246,0.3); }
        .card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
        .card-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
        .card-icon.gold { background: linear-gradient(135deg, #ffd700, #ff9500); }
        .card-icon.cyan { background: linear-gradient(135deg, #00f5ff, #00a0ff); }
        .card-title { font-family: 'Black Han Sans', sans-serif; font-size: 1.3rem; }
        .balls-container { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 20px 0; }
        .ball {
            width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
            font-family: 'Orbitron', sans-serif; font-weight: 700; font-size: 1.1rem; color: #fff;
            box-shadow: 0 4px 15px rgba(0,0,0,0.4), inset 0 -3px 10px rgba(0,0,0,0.3), inset 0 3px 10px rgba(255,255,255,0.3);
            animation: ballPop 0.5s ease-out backwards; position: relative;
        }
        .ball::after { content: ''; position: absolute; top: 8px; left: 12px; width: 12px; height: 8px; background: rgba(255,255,255,0.5); border-radius: 50%; transform: rotate(-30deg); }
        .ball.yellow { background: var(--ball-yellow); color: #333; }
        .ball.blue { background: var(--ball-blue); }
        .ball.red { background: var(--ball-red); }
        .ball.gray { background: var(--ball-gray); }
        .ball.green { background: var(--ball-green); }
        .ball.bonus { background: var(--ball-bonus); }
        @keyframes ballPop { 0% { transform: scale(0) rotate(-180deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
        .ball:nth-child(1) { animation-delay: 0.1s; } .ball:nth-child(2) { animation-delay: 0.2s; } .ball:nth-child(3) { animation-delay: 0.3s; }
        .ball:nth-child(4) { animation-delay: 0.4s; } .ball:nth-child(5) { animation-delay: 0.5s; } .ball:nth-child(6) { animation-delay: 0.6s; } .ball:nth-child(8) { animation-delay: 0.8s; }
        .plus-sign { display: flex; align-items: center; font-size: 1.5rem; color: var(--accent-gold); padding: 0 5px; }
        .input-group { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
        .input-field {
            flex: 1; min-width: 120px; padding: 15px 20px; border: 2px solid rgba(255,255,255,0.1); border-radius: 12px;
            background: rgba(0,0,0,0.3); color: var(--text-primary); font-size: 1.1rem; font-family: 'Orbitron', sans-serif; transition: all 0.3s ease;
        }
        .input-field:focus { outline: none; border-color: var(--accent-cyan); box-shadow: 0 0 20px rgba(0,245,255,0.3); }
        .btn { padding: 15px 30px; border: none; border-radius: 12px; font-family: 'Noto Sans KR', sans-serif; font-weight: 700; font-size: 1rem; cursor: pointer; transition: all 0.3s ease; display: inline-flex; align-items: center; gap: 8px; }
        .btn-primary { background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple)); color: white; box-shadow: 0 4px 20px rgba(0,245,255,0.3); }
        .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,245,255,0.5); }
        .btn-primary:disabled { background: #444; cursor: not-allowed; transform: none; box-shadow: none; }
        .btn-secondary { background: rgba(255,255,255,0.1); color: var(--text-primary); border: 1px solid rgba(255,255,255,0.2); }
        .btn-gold { background: linear-gradient(135deg, #ffd700, #ff9500); color: #1a1a1a; box-shadow: 0 4px 20px rgba(255,215,0,0.3); }
        .btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255,215,0,0.5); }
        .status { padding: 15px 20px; border-radius: 12px; margin: 15px 0; display: flex; align-items: center; gap: 10px; }
        .status.success { background: rgba(16,185,129,0.2); border: 1px solid rgba(16,185,129,0.5); color: #34d399; }
        .status.error { background: rgba(239,68,68,0.2); border: 1px solid rgba(239,68,68,0.5); color: #f87171; }
        .status.info { background: rgba(59,130,246,0.2); border: 1px solid rgba(59,130,246,0.5); color: #60a5fa; }
        .status.warning { background: rgba(245,158,11,0.2); border: 1px solid rgba(245,158,11,0.5); color: #fbbf24; }
        .progress-container { width: 100%; height: 20px; background: rgba(0,0,0,0.3); border-radius: 10px; overflow: hidden; margin: 15px 0; }
        .progress-bar { height: 100%; background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple), var(--accent-pink)); background-size: 200% 100%; animation: progressGradient 2s linear infinite; transition: width 0.3s ease; border-radius: 10px; }
        @keyframes progressGradient { 0% { background-position: 0% 50%; } 100% { background-position: 200% 50%; } }
        .progress-text { font-family: 'Orbitron', sans-serif; font-size: 0.9rem; color: var(--accent-cyan); text-align: center; margin-top: 8px; }
        
        /* 개선된 분석 그리드 스타일 */
        .analysis-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-top: 20px; }
        .analysis-item { 
            background: rgba(0,0,0,0.2); padding: 18px; border-radius: 12px; 
            border: 1px solid rgba(255,255,255,0.05); position: relative;
            transition: all 0.3s ease;
        }
        .analysis-item:hover { background: rgba(0,0,0,0.3); border-color: rgba(255,255,255,0.1); }
        .analysis-item.grade-excellent { border-left: 4px solid var(--grade-excellent); }
        .analysis-item.grade-good { border-left: 4px solid var(--grade-good); }
        .analysis-item.grade-normal { border-left: 4px solid var(--grade-normal); }
        .analysis-item.grade-caution { border-left: 4px solid var(--grade-caution); }
        .analysis-item.grade-bad { border-left: 4px solid var(--grade-bad); }
        
        .analysis-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
        .analysis-label { font-size: 0.8rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; gap: 6px; }
        .analysis-value { font-family: 'Orbitron', sans-serif; font-size: 1.5rem; color: var(--accent-cyan); margin: 5px 0; }
        .analysis-detail { font-size: 0.85rem; color: var(--text-secondary); margin-top: 8px; line-height: 1.5; }
        .analysis-badge { 
            font-size: 0.65rem; font-weight: 700; padding: 4px 8px; border-radius: 20px; 
            text-transform: uppercase; letter-spacing: 0.5px;
        }
        .badge-excellent { background: rgba(16,185,129,0.2); color: var(--grade-excellent); }
        .badge-good { background: rgba(59,130,246,0.2); color: var(--grade-good); }
        .badge-normal { background: rgba(251,191,36,0.2); color: var(--grade-normal); }
        .badge-caution { background: rgba(249,115,22,0.2); color: var(--grade-caution); }
        .badge-bad { background: rgba(239,68,68,0.2); color: var(--grade-bad); }
        
        /* 도움말 툴팁 */
        .help-icon {
            display: inline-flex; align-items: center; justify-content: center;
            width: 16px; height: 16px; border-radius: 50%;
            background: rgba(255,255,255,0.1); color: var(--text-secondary);
            font-size: 0.65rem; cursor: help; position: relative;
        }
        .help-icon:hover .tooltip { display: block; }
        .tooltip {
            display: none; position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%);
            background: #1e1e3f; border: 1px solid rgba(255,255,255,0.2); border-radius: 8px;
            padding: 12px; width: 250px; font-size: 0.75rem; color: var(--text-primary);
            line-height: 1.5; z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            margin-bottom: 8px;
        }
        .tooltip::after {
            content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
            border: 6px solid transparent; border-top-color: #1e1e3f;
        }
        .tooltip-title { font-weight: 700; color: var(--accent-cyan); margin-bottom: 6px; }
        
        /* 종합 점수 카드 */
        .score-card {
            background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(0,245,255,0.2));
            border: 1px solid rgba(139,92,246,0.3); border-radius: 16px;
            padding: 25px; margin: 20px 0; text-align: center;
        }
        .score-main {
            font-family: 'Orbitron', sans-serif; font-size: 3rem; font-weight: 900;
            background: linear-gradient(135deg, var(--accent-gold), var(--accent-cyan));
            -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
        }
        .score-label { font-size: 0.9rem; color: var(--text-secondary); margin-top: 5px; }
        .score-breakdown { display: flex; justify-content: center; gap: 20px; margin-top: 20px; flex-wrap: wrap; }
        .score-item { text-align: center; padding: 10px 15px; background: rgba(0,0,0,0.2); border-radius: 10px; min-width: 80px; }
        .score-item-value { font-family: 'Orbitron', sans-serif; font-size: 1.2rem; }
        .score-item-label { font-size: 0.7rem; color: var(--text-secondary); margin-top: 3px; }
        
        /* 해석 박스 */
        .interpretation-box {
            background: rgba(0,0,0,0.2); border-radius: 12px; padding: 20px; margin-top: 20px;
            border-left: 4px solid var(--accent-purple);
        }
        .interpretation-title { font-weight: 700; color: var(--accent-gold); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
        .interpretation-content { color: var(--text-secondary); line-height: 1.8; font-size: 0.9rem; }
        .interpretation-content strong { color: var(--text-primary); }
        
        /* 시뮬레이션 통계 해석 */
        .sim-interpretation {
            background: linear-gradient(135deg, rgba(16,185,129,0.1), rgba(59,130,246,0.1));
            border: 1px solid rgba(16,185,129,0.3); border-radius: 12px;
            padding: 20px; margin-top: 20px;
        }
        .sim-interpretation h4 { color: var(--accent-cyan); margin-bottom: 15px; }
        .sim-stat-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
        .sim-stat-row:last-child { border-bottom: none; }
        .sim-stat-label { color: var(--text-secondary); }
        .sim-stat-value { font-family: 'Orbitron', sans-serif; color: var(--accent-gold); }
        .sim-stat-note { font-size: 0.8rem; color: var(--text-secondary); margin-top: 5px; }
        
        .stats-row { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; margin: 20px 0; }
        .stat-item { text-align: center; padding: 15px 25px; background: rgba(0,0,0,0.2); border-radius: 12px; min-width: 100px; position: relative; }
        .stat-value { font-family: 'Orbitron', sans-serif; font-size: 1.5rem; color: var(--accent-gold); }
        .stat-label { font-size: 0.75rem; color: var(--text-secondary); margin-top: 5px; }
        .stat-help { position: absolute; top: 8px; right: 8px; }
        
        .number-grid { display: grid; grid-template-columns: repeat(9, 1fr); gap: 8px; margin: 20px 0; }
        @media (max-width: 600px) { .number-grid { grid-template-columns: repeat(9, 1fr); gap: 5px; } }
        .number-btn { aspect-ratio: 1; min-height: 44px; border: 2px solid rgba(255,255,255,0.1); border-radius: 10px; background: rgba(0,0,0,0.3); color: var(--text-primary); font-family: 'Orbitron', sans-serif; font-weight: 700; font-size: 0.9rem; cursor: pointer; transition: all 0.2s ease; -webkit-tap-highlight-color: rgba(139,92,246,0.4); touch-action: manipulation; }
        @media (max-width: 480px) { .number-btn { min-height: 40px; font-size: 0.8rem; } }
        .number-btn:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.3); }
        .number-btn.selected { transform: scale(1.1); box-shadow: 0 0 15px currentColor; }
        .number-btn.selected.yellow { background: var(--ball-yellow); color: #333; border-color: #ffd700; }
        .number-btn.selected.blue { background: var(--ball-blue); border-color: #3b82f6; }
        .number-btn.selected.red { background: var(--ball-red); border-color: #ef4444; }
        .number-btn.selected.gray { background: var(--ball-gray); border-color: #6b7280; }
        .number-btn.selected.green { background: var(--ball-green); border-color: #10b981; }
        .collapsible { background: rgba(0,0,0,0.2); border-radius: 12px; margin-top: 15px; overflow: hidden; }
        .collapsible-header { padding: 15px 20px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background 0.3s ease; }
        .collapsible-header:hover { background: rgba(255,255,255,0.05); }
        .collapsible-content { padding: 0 20px 20px; display: none; }
        .collapsible.open .collapsible-content { display: block; }
        .collapsible-icon { transition: transform 0.3s ease; }
        .collapsible.open .collapsible-icon { transform: rotate(180deg); }
        .portal-result { display: flex; align-items: center; gap: 10px; padding: 10px; margin: 5px 0; background: rgba(0,0,0,0.2); border-radius: 8px; }
        .portal-name { font-weight: 700; min-width: 60px; }
        .portal-status { font-size: 1.2rem; }
        .match-highlight { background: linear-gradient(135deg, rgba(16,185,129,0.3), rgba(52,211,153,0.3)); border: 2px solid #10b981; padding: 15px; border-radius: 12px; text-align: center; margin-top: 20px; }
        .match-count { font-family: 'Orbitron', sans-serif; font-size: 2rem; color: #34d399; }
        .sponsor-box { background: linear-gradient(135deg, rgba(139,92,246,0.3), rgba(255,0,110,0.3)); border: 1px solid rgba(139,92,246,0.5); border-radius: 20px; padding: 30px; text-align: center; margin-top: 30px; }
        .sponsor-title { font-family: 'Black Han Sans', sans-serif; font-size: 1.5rem; color: var(--accent-gold); margin-bottom: 15px; }
        .sponsor-name { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; }
        .sponsor-account { font-family: 'Orbitron', sans-serif; font-size: 1.3rem; color: var(--accent-cyan); background: rgba(0,0,0,0.3); padding: 15px 25px; border-radius: 12px; display: inline-block; }
        .sim-controls { display: flex; gap: 15px; flex-wrap: wrap; align-items: center; justify-content: center; margin: 20px 0; }
        .sim-input { width: 150px; padding: 12px 15px; border: 2px solid rgba(255,255,255,0.1); border-radius: 10px; background: rgba(0,0,0,0.3); color: var(--text-primary); font-family: 'Orbitron', sans-serif; font-size: 1rem; }
        .sim-input:focus { outline: none; border-color: var(--accent-purple); }
        .hidden { display: none !important; }
        .section-bar { display: flex; gap: 3px; margin-top: 10px; }
        .section-segment { flex: 1; height: 35px; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; opacity: 0.3; transition: all 0.3s ease; flex-direction: column; }
        .section-segment.active { opacity: 1; transform: scaleY(1.1); }
        .section-segment.s1 { background: var(--ball-yellow); color: #333; }
        .section-segment.s2 { background: var(--ball-blue); }
        .section-segment.s3 { background: var(--ball-red); }
        .section-segment.s4 { background: var(--ball-gray); }
        .section-segment.s5 { background: var(--ball-green); }
        .discovery-animation { animation: discovery 0.5s ease-out; }
        @keyframes discovery { 0% { transform: scale(0.8); opacity: 0; } 50% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }
        .prediction-list { 
            max-height: 800px; overflow-y: auto; margin-top: 15px; 
            -webkit-overflow-scrolling: touch; /* iOS 스크롤 개선 */
            overscroll-behavior: contain;
        }
        .prediction-item { background: rgba(0,0,0,0.2); border-radius: 12px; padding: 15px; margin-bottom: 10px; border-left: 4px solid var(--accent-purple); }
        .prediction-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
        .prediction-number { font-family: 'Orbitron', sans-serif; color: var(--accent-gold); }
        .prediction-meta { font-size: 0.8rem; color: var(--text-secondary); }
        
        /* 당첨 등급 정보 */
        .prize-info {
            background: rgba(0,0,0,0.2); border-radius: 12px; padding: 20px; margin-top: 20px;
        }
        .prize-info h4 { color: var(--accent-gold); margin-bottom: 15px; }
        .prize-table { width: 100%; border-collapse: collapse; }
        .prize-table th, .prize-table td { padding: 10px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.05); }
        .prize-table th { color: var(--text-secondary); font-size: 0.8rem; }
        .prize-table td { font-family: 'Orbitron', sans-serif; }
        .prize-rank { color: var(--accent-gold); }
        .prize-condition { color: var(--text-secondary); font-size: 0.85rem; }
        .prize-prob { color: var(--accent-cyan); }
        
        /* 발견된 예측 번호 상세 분석 스타일 */
        .prediction-item-expanded { margin-bottom: 20px; }
        
        .pred-card {
            background: var(--bg-card); border-radius: 16px; overflow: hidden;
            border: 1px solid rgba(255,255,255,0.08); transition: all 0.3s ease;
        }
        .pred-card:hover { border-color: rgba(139,92,246,0.4); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
        
        .pred-card-header {
            padding: 15px 20px; background: rgba(0,0,0,0.2); cursor: pointer;
            display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
            -webkit-tap-highlight-color: rgba(139,92,246,0.3); touch-action: manipulation; user-select: none;
            position: relative; z-index: 10;
        }
        .pred-card-header:active { background: rgba(0,0,0,0.35); }
        .pred-card-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
        .pred-card-meta { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-secondary); }
        
        .pred-score-badge {
            font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 15px;
        }
        .pred-score-badge.score-excellent { background: rgba(16,185,129,0.2); color: var(--grade-excellent); }
        .pred-score-badge.score-good { background: rgba(59,130,246,0.2); color: var(--grade-good); }
        .pred-score-badge.score-normal { background: rgba(251,191,36,0.2); color: var(--grade-normal); }
        .pred-score-badge.score-caution { background: rgba(249,115,22,0.2); color: var(--grade-caution); }
        .pred-score-badge.score-bad { background: rgba(239,68,68,0.2); color: var(--grade-bad); }
        
        .pred-grade-badge {
            font-size: 0.7rem; font-weight: 700; padding: 3px 8px; border-radius: 12px;
        }
        .pred-grade-badge.grade-jackpot { background: linear-gradient(135deg, #ffd700, #ff9500); color: #1a1a1a; }
        .pred-grade-badge.grade-high { background: rgba(16,185,129,0.3); color: #34d399; }
        .pred-grade-badge.grade-mid { background: rgba(59,130,246,0.3); color: #60a5fa; }
        .pred-grade-badge.grade-low { background: rgba(139,92,246,0.3); color: #a78bfa; }
        
        .expand-icon { transition: transform 0.3s ease; font-size: 0.8rem; }
        
        .pred-balls-row { display: flex; justify-content: center; gap: 8px; padding: 20px; flex-wrap: wrap; }
        
        .pred-match-info {
            display: flex; align-items: center; justify-content: center; gap: 10px;
            padding: 12px; background: rgba(16,185,129,0.15); border-top: 1px solid rgba(16,185,129,0.3);
            font-size: 0.9rem; flex-wrap: wrap;
        }
        .pred-match-info.no-match { background: rgba(100,100,100,0.1); border-top-color: rgba(100,100,100,0.2); color: var(--text-secondary); }
        .match-label { color: #34d399; }
        .match-numbers { font-family: 'Orbitron', sans-serif; color: var(--accent-cyan); }
        .match-count-badge { background: #10b981; color: white; padding: 2px 8px; border-radius: 10px; font-size: 0.8rem; font-weight: 700; }
        
        .pred-quick-stats {
            display: flex; justify-content: center; gap: 15px; padding: 15px;
            background: rgba(0,0,0,0.15); flex-wrap: wrap;
        }
        .quick-stat { text-align: center; min-width: 60px; }
        .quick-stat-label { font-size: 0.7rem; color: var(--text-secondary); display: block; }
        .quick-stat-value { font-family: 'Orbitron', sans-serif; font-size: 1rem; color: var(--accent-cyan); }
        
        .pred-detail-section {
            background: rgba(0,0,0,0.1);
            overflow: hidden;
        }
        
        .pred-toggle-btn {
            width: 100%; padding: 8px; border: none; background: rgba(139,92,246,0.2);
            color: var(--accent-purple); font-weight: 600; cursor: pointer; transition: all 0.3s ease;
            font-size: 0.8rem; -webkit-tap-highlight-color: rgba(139,92,246,0.3); touch-action: manipulation;
            user-select: none; -webkit-user-select: none; position: relative; z-index: 10;
        }
        .pred-toggle-btn:hover, .pred-toggle-btn:active { background: rgba(139,92,246,0.4); }
        
        /* 상세 분석 내부 스타일 */
        .detail-section { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.05); }
        .detail-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
        .detail-title { font-weight: 700; color: var(--accent-cyan); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
        
        .score-breakdown-detail { display: flex; flex-direction: column; gap: 10px; }
        .score-bar-item { }
        .score-bar-header { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 4px; }
        .score-bar-bg { height: 8px; background: rgba(0,0,0,0.3); border-radius: 4px; overflow: hidden; }
        .score-bar-fill { height: 100%; border-radius: 4px; transition: width 0.5s ease; }
        
        .detail-interpretation {
            background: rgba(0,0,0,0.2); padding: 15px; border-radius: 10px;
            font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6;
        }
        .detail-interpretation strong { color: var(--text-primary); }
        
        .detail-metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
        .detail-metric {
            background: rgba(0,0,0,0.2); padding: 12px; border-radius: 10px;
            border-left: 3px solid var(--accent-purple);
        }
        .metric-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
        .metric-label { font-size: 0.8rem; color: var(--text-secondary); }
        .metric-grade { font-size: 0.65rem; padding: 2px 6px; border-radius: 8px; }
        .metric-value { font-family: 'Orbitron', sans-serif; font-size: 1.4rem; color: var(--accent-gold); }
        .metric-range { font-size: 0.75rem; color: var(--text-secondary); margin-top: 3px; }
        .metric-detail { font-size: 0.8rem; margin-top: 5px; }
        
        .dual-analysis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
        .dual-box { background: rgba(0,0,0,0.2); padding: 15px; border-radius: 10px; }
        .dual-header { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
        .dual-ratio { font-family: 'Orbitron', sans-serif; font-size: 1.5rem; color: var(--accent-gold); margin-bottom: 10px; }
        .dual-detail { font-size: 0.85rem; line-height: 1.6; }
        
        .section-visual { }
        .section-bar-detail { display: flex; gap: 4px; margin-bottom: 10px; }
        .section-seg {
            flex: 1; padding: 10px 5px; border-radius: 8px; text-align: center;
            opacity: 0.3; transition: all 0.3s ease;
        }
        .section-seg.active { opacity: 1; }
        .section-seg.s1 { background: var(--ball-yellow); color: #333; }
        .section-seg.s2 { background: var(--ball-blue); color: white; }
        .section-seg.s3 { background: var(--ball-red); color: white; }
        .section-seg.s4 { background: var(--ball-gray); color: white; }
        .section-seg.s5 { background: var(--ball-green); color: white; }
        .seg-count { font-family: 'Orbitron', sans-serif; font-size: 1.2rem; display: block; }
        .seg-label { font-size: 0.65rem; }
        .section-numbers { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
        .section-num-item { font-size: 0.8rem; background: rgba(0,0,0,0.2); padding: 4px 10px; border-radius: 15px; }
        
        .consecutive-groups { display: flex; flex-wrap: wrap; gap: 8px; }
        .consec-group {
            background: rgba(139,92,246,0.2); border: 1px solid rgba(139,92,246,0.4);
            padding: 5px 12px; border-radius: 15px; font-family: 'Orbitron', sans-serif; font-size: 0.9rem;
        }
        .gap-stats { display: flex; gap: 15px; font-size: 0.9rem; margin-bottom: 8px; flex-wrap: wrap; }
        .gap-stats strong { color: var(--accent-cyan); }
        .gap-sequence { font-size: 0.85rem; color: var(--text-secondary); }
        
        .math-props { display: flex; flex-direction: column; gap: 10px; }
        .math-item { display: flex; justify-content: space-between; padding: 8px 12px; background: rgba(0,0,0,0.2); border-radius: 8px; }
        .math-label { color: var(--text-secondary); font-size: 0.85rem; }
        .math-value { color: var(--accent-cyan); font-size: 0.85rem; }
        
        .prize-section { background: linear-gradient(135deg, rgba(255,215,0,0.1), rgba(16,185,129,0.1)); padding: 15px; border-radius: 12px; }
        .prize-analysis { text-align: center; }
        .prize-current { margin-bottom: 15px; }
        .prize-match-count { font-family: 'Orbitron', sans-serif; font-size: 2rem; color: var(--accent-gold); margin-left: 10px; }
        .prize-tier { padding: 10px 20px; border-radius: 10px; font-weight: 700; margin-bottom: 10px; }
        .prize-tier.tier-1 { background: linear-gradient(135deg, #ffd700, #ff9500); color: #1a1a1a; }
        .prize-tier.tier-3 { background: rgba(16,185,129,0.3); color: #34d399; }
        .prize-tier.tier-4 { background: rgba(59,130,246,0.3); color: #60a5fa; }
        .prize-tier.tier-5 { background: rgba(139,92,246,0.3); color: #a78bfa; }
        .matching-balls-detail { margin-top: 15px; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
        
        @media (max-width: 480px) {
            .container { padding: 8px; }
            .card { padding: 14px; }
            .ball { width: 44px; height: 44px; font-size: 1rem; }
            .balls-container { gap: 8px; }
            .btn { padding: 14px 22px; font-size: 0.95rem; min-height: 44px; }
            .input-field { padding: 14px 16px; font-size: 1rem; min-height: 44px; }
            .collapsible-header { padding: 16px 18px; min-height: 44px; }
            .sim-controls { flex-direction: column; gap: 10px; }
            .sim-input { width: 100%; padding: 14px 16px; }
            .stats-row { gap: 10px; }
            .stat-item { min-width: 70px; padding: 10px 12px; }
            .stat-value { font-size: 1.1rem; }
            .score-main { font-size: 2.2rem; }
            .analysis-grid { grid-template-columns: repeat(1, 1fr); }
            .section-seg { padding: 8px 4px; }
            .section-bar { gap: 2px; }
            
            /* 모바일 예측 카드 스타일 */
            .pred-card-header { padding: 12px 15px; flex-direction: column; align-items: flex-start; }
            .pred-card-title { width: 100%; justify-content: flex-start; }
            .pred-card-meta { width: 100%; justify-content: flex-start; margin-top: 8px; }
            .pred-balls-row { padding: 15px 10px; gap: 6px; }
            .pred-balls-row .ball { width: 40px; height: 40px; line-height: 40px; font-size: 0.9rem; }
            .pred-quick-stats { gap: 10px; padding: 12px; }
            .quick-stat { min-width: 50px; }
            .quick-stat-value { font-size: 0.9rem; }
            .pred-detail-section.open { padding: 15px; }
            .pred-toggle-btn { padding: 12px; font-size: 0.9rem; min-height: 44px; }
            
            /* 상세 분석 모바일 스타일 */
            .detail-metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
            .detail-metric { padding: 10px; }
            .metric-value { font-size: 1.2rem; }
            .dual-analysis { grid-template-columns: 1fr; }
            .dual-ratio { font-size: 1.3rem; }
            .section-bar-detail { flex-wrap: wrap; }
            .section-seg { min-width: 50px; flex: 1 1 auto; }
            .seg-count { font-size: 1rem; }
            .score-bar-header { font-size: 0.8rem; }
            .detail-interpretation { font-size: 0.85rem; padding: 12px; }
            .detail-title { font-size: 0.9rem; }
            .math-item { flex-direction: column; gap: 5px; text-align: left; }
            .gap-stats { flex-direction: column; gap: 5px; }
        }

        /* ── 라이트 테마 보정 ── */
        [data-theme="light"] .btn-primary:disabled,
        body[data-theme="light"] .btn-primary:disabled { background: #aaa; }
        [data-theme="light"] .btn-secondary,
        body[data-theme="light"] .btn-secondary { background: rgba(0,0,0,0.05); color: var(--text-primary); border-color: rgba(0,0,0,0.15); }
        [data-theme="light"] .btn-secondary:hover,
        body[data-theme="light"] .btn-secondary:hover { background: rgba(0,0,0,0.1); }
        [data-theme="light"] .status.success,
        body[data-theme="light"] .status.success { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.4); }
        [data-theme="light"] .status.info,
        body[data-theme="light"] .status.info { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.4); }
        [data-theme="light"] .status.warning,
        body[data-theme="light"] .status.warning { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.4); }
        [data-theme="light"] .status.error,
        body[data-theme="light"] .status.error { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.4); }
        [data-theme="light"] .input-field,
        body[data-theme="light"] .input-field { background: #fff; color: #1a1a2e; border-color: rgba(0,0,0,0.2); }
        [data-theme="light"] .sim-input,
        body[data-theme="light"] .sim-input { background: #fff; color: #1a1a2e; border-color: rgba(0,0,0,0.2); }
        [data-theme="light"] .help-icon .tooltip,
        body[data-theme="light"] .help-icon .tooltip { background: #fff; color: #1a1a2e; border-color: rgba(0,0,0,0.15); }
        [data-theme="light"] .theme-toggle,
        body[data-theme="light"] .theme-toggle { border-color: rgba(0,0,0,0.2); }
        [data-theme="light"] .ball,
        body[data-theme="light"] .ball { box-shadow: 0 3px 10px rgba(0,0,0,0.2), inset 0 -2px 6px rgba(0,0,0,0.2), inset 0 2px 6px rgba(255,255,255,0.6); }
        [data-theme="light"] .card,
        body[data-theme="light"] .card { box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
        [data-theme="light"] .btn-gold,
        body[data-theme="light"] .btn-gold { box-shadow: 0 4px 15px rgba(184,134,11,0.3); }
