:root{--accent: #3b82f6;--panel: #ffffff;--panel-2: #f9fafb;--border: #e5e7eb;--text-strong: #1f2937;--text-muted: #6b7280;--gold: #f59e0b;--gold-light: #fbbf24;--red: #dc2626;--red-dark: #b91c1c}.tool-container{max-width:900px;margin:0 auto}.tool-header{margin-bottom:20px}.tool-header h1{margin:0 0 8px;font-size:22px;color:var(--text-strong)}.tool-header p{margin:0;font-size:14px;color:var(--text-muted)}.scratch-game{display:grid;grid-template-columns:1fr 1fr;gap:20px}@media (max-width: 768px){.scratch-game{grid-template-columns:1fr}}.scratch-settings{background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:24px;box-shadow:0 1px 3px #0000001a}.section-title{font-size:16px;font-weight:600;color:var(--text-strong);margin:0 0 16px;padding-bottom:12px;border-bottom:1px solid var(--border)}.denomination-list{display:flex;flex-direction:column;gap:10px;margin-bottom:24px}.denomination-item{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;background:var(--panel-2);border:2px solid transparent;border-radius:12px;cursor:pointer;transition:all .2s}.denomination-item:hover{background:#fef3c7;border-color:#f59e0b}.denomination-item.active{background:linear-gradient(135deg,#fef3c7,#fde68a);border-color:#f59e0b;box-shadow:0 2px 8px #f59e0b4d}.denomination-value{font-size:18px;font-weight:700;color:#92400e}.denomination-info{font-size:13px;color:var(--text-muted)}.game-type-list{display:flex;gap:12px;margin-bottom:24px}.game-type-item{flex:1;display:flex;flex-direction:column;align-items:center;padding:16px 12px;background:var(--panel-2);border:2px solid transparent;border-radius:12px;cursor:pointer;transition:all .2s}.game-type-item:hover{background:#dbeafe;border-color:#3b82f6}.game-type-item.active{background:linear-gradient(135deg,#dbeafe,#bfdbfe);border-color:#3b82f6;box-shadow:0 2px 8px #3b82f64d}.game-type-icon{font-size:28px;margin-bottom:8px}.game-type-name{font-size:16px;font-weight:700;color:#1e40af;margin-bottom:4px}.game-type-desc{font-size:12px;color:var(--text-muted)}.rules-list{margin:0 0 24px;padding-left:20px;list-style:none}.rules-list li{position:relative;padding:8px 0 8px 24px;font-size:14px;color:var(--text-strong);border-bottom:1px dashed var(--border)}.rules-list li:before{content:"✓";position:absolute;left:0;top:50%;transform:translateY(-50%);width:20px;height:20px;background:#10b981;color:#fff;border-radius:50%;font-size:12px;display:flex;align-items:center;justify-content:center}.rules-list li:last-child{border-bottom:none}.scratch-area{background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:24px;box-shadow:0 1px 3px #0000001a;display:flex;flex-direction:column;align-items:center}.scratch-card{width:100%;max-width:500px;background:linear-gradient(135deg,#fff7ed,#ffedd5);border-radius:16px;overflow:hidden;box-shadow:0 4px 16px #00000026;border:3px solid #f59e0b}.card-header{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;background:linear-gradient(135deg,#dc2626,#b91c1c)}.card-title{font-size:20px;font-weight:700;color:#fff;text-shadow:1px 1px 2px rgba(0,0,0,.3)}.card-denomination{font-size:24px;font-weight:700;color:#fbbf24;text-shadow:1px 1px 2px rgba(0,0,0,.3)}.card-main{padding:20px}.winning-numbers,.my-numbers{margin-bottom:20px}.my-numbers:last-child{margin-bottom:0}.section-label{font-size:12px;font-weight:600;color:#92400e;text-transform:uppercase;margin-bottom:10px;letter-spacing:1px}.numbers-row{display:flex;gap:8px;justify-content:center}.scratch-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;max-width:450px;margin:0 auto}.number{width:48px;height:48px;background:linear-gradient(135deg,#fbbf24,#f59e0b);border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700;color:#92400e;box-shadow:0 2px 4px #0000001a}.scratch-cell{position:relative;background:#fff;border-radius:12px;padding:10px;text-align:center;box-shadow:0 2px 4px #0000000d;border:2px solid #f3f4f6;overflow:hidden;min-height:70px}.scratch-canvas{position:absolute;top:0;left:0;width:100%;height:100%;cursor:crosshair;z-index:2}.cell-content{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px 0}.cell-value{font-size:22px;font-weight:700;color:#92400e;margin-bottom:4px}.cell-value.dragon{font-size:26px}.cell-value.fa{font-size:24px}.cell-value.xi,.cell-value.double-xi{font-size:24px;color:#dc2626}.cell-value.empty{font-size:20px;color:#9ca3af}.cell-prize{font-size:12px;color:#dc2626;font-weight:600}.cell-prize.win{color:#10b981}.scratch-cell.win{background:linear-gradient(135deg,#d4edda,#c3e6cb);border-color:#10b981}.card-footer{display:flex;flex-direction:column;align-items:center;padding:20px;background:linear-gradient(135deg,#fbbf24,#f59e0b)}.total-prize{font-size:32px;font-weight:700;color:#dc2626;text-shadow:1px 1px 2px rgba(255,255,255,.8)}.prize-label{font-size:14px;font-weight:600;color:#92400e;margin-top:4px}.game-message{margin-top:16px;padding:12px 20px;border-radius:8px;font-size:14px;font-weight:600;text-align:center;display:none;min-width:200px}.game-message.show{display:block}.game-message.win{background:linear-gradient(135deg,#d4edda,#c3e6cb);color:#155724;border:1px solid #10b981}.game-message.lose{background:linear-gradient(135deg,#f8d7da,#f5c6cb);color:#721c24;border:1px solid #dc2626}.scratch-stats{grid-column:1 / -1;background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:24px;box-shadow:0 1px 3px #0000001a}.stats-grid{display:flex;gap:16px;margin-bottom:20px}.stat-item{flex:1;text-align:center;padding:16px;background:var(--panel-2);border-radius:10px}.stat-item.highlight{background:linear-gradient(135deg,#10b981,#059669)}.stat-item.highlight .stat-value,.stat-item.highlight .stat-label{color:#fff}.stat-value{font-size:28px;font-weight:700;color:var(--text-strong)}.stat-label{font-size:13px;color:var(--text-muted);margin-top:4px}.history-list{max-height:200px;overflow-y:auto;border:1px solid var(--border);border-radius:10px;padding:12px}.history-empty{text-align:center;padding:20px;color:var(--text-muted);font-size:14px}.history-item{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-bottom:1px dashed var(--border);font-size:14px}.history-item:last-child{border-bottom:none}.history-prize{font-weight:600;color:var(--text-strong)}.history-time{font-size:12px;color:var(--text-muted)}.btn-group{display:flex;gap:12px}.btn{flex:1;padding:14px 24px;border:none;border-radius:10px;font-size:15px;font-weight:600;cursor:pointer;transition:all .2s}.btn-primary{background:linear-gradient(135deg,#dc2626,#b91c1c);color:#fff;box-shadow:0 2px 8px #dc26264d}.btn-primary:hover{transform:translateY(-1px);box-shadow:0 4px 12px #dc262666}.btn-secondary{background:var(--panel-2);color:var(--text-strong);border:1px solid var(--border)}.btn-secondary:hover{background:var(--border)}[data-theme=dark]{--panel: #1f2937;--panel-2: #374151;--border: #4b5563;--text-strong: #e5e7eb;--text-muted: #9ca3af}[data-theme=dark] .scratch-settings,[data-theme=dark] .scratch-area,[data-theme=dark] .scratch-stats{background:var(--panel);border-color:var(--border)}[data-theme=dark] .denomination-item{background:var(--panel-2)}[data-theme=dark] .denomination-item:hover{background:#4b5563}[data-theme=dark] .denomination-item.active{background:linear-gradient(135deg,#4b5563,#374151)}[data-theme=dark] .denomination-value{color:#fbbf24}[data-theme=dark] .stat-item{background:var(--panel-2)}[data-theme=dark] .btn-secondary{background:var(--panel-2);color:var(--text-strong);border-color:var(--border)}[data-theme=dark] .btn-secondary:hover{background:var(--border)}[data-theme=dark] .history-list{border-color:var(--border)}[data-theme=dark] .scratch-cell{background:#374151;border-color:#4b5563}[data-theme=dark] .cell-value{color:#fbbf24}[data-theme=dark] .card-footer{background:linear-gradient(135deg,#92400e,#78350f)}@media (max-width: 640px){.scratch-settings,.scratch-area,.scratch-stats{padding:16px}.btn-group,.stats-grid{flex-direction:column}.scratch-grid{gap:8px}.scratch-cell{padding:6px}.cell-value{font-size:18px}.cell-prize{font-size:11px}}
