/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --bg-input: #1a1a26;
    --border: #2a2a3a;
    --border-light: #3a3a4f;
    --text-primary: #e8e8f0;
    --text-secondary: #9898b0;
    --text-muted: #6a6a82;
    --accent-purple: #7c3aed;
    --accent-purple-light: #a78bfa;
    --accent-indigo: #6366f1;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-amber: #f59e0b;
    --gradient-purple: linear-gradient(135deg, #7c3aed, #4f46e5);
    --gradient-hero: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(99,102,241,0.08), rgba(59,130,246,0.06));
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: 0.2s ease;
}

html {
    scroll-behavior: smooth;
    background: var(--gradient-hero), var(--bg-primary);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gradient-hero), var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

main {
    padding: 11px;
}

/* ===== Hero ===== */
.hero {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 11px;
    background: transparent;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.hero-bg {
    position: relative;
    width: fit-content;
    max-width: 100%;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(124,58,237,0.08) 0%, transparent 70%);
    animation: heroGlow 8s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0) scale(1); opacity: 0.6; }
    100% { transform: translate(10%, -5%) scale(1.1); opacity: 1; }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-subtitles {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 11px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 11px;
    text-decoration: none;
    color: inherit;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-purple-light), var(--accent-indigo), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.alpha-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(245,158,11,0.45);
    background: rgba(245,158,11,0.14);
    color: #fcd34d;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 4px 10px;
    line-height: 1;
    white-space: nowrap;
    transform: translateY(-1px);
    box-shadow: 0 0 0 rgba(252,211,77,0);
    animation: alphaPulse 1.8s ease-in-out infinite;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 560px;
    margin: 0;
}

/* ===== Controls ===== */
.controls-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 22px;
}

.controls-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 150px;
}

.control-group label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.control-group select,
.control-group input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 10px 14px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.control-group select:hover,
.control-group input:hover {
    border-color: var(--border-light);
}

.control-group select:focus,
.control-group input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}

.control-group--btn {
    flex: 0 0 auto;
    min-width: auto;
}

.control-group--manual {
    min-width: 0;
}

#analysisModeGroup {
    grid-column: 1;
}

#coinCountGroup,
#manualCoinGroup {
    grid-column: 2;
}

.manual-search-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.manual-search-row input {
    flex: 1 1 auto;
    min-width: 0;
}

.manual-search-row .btn-secondary {
    flex: 0 0 auto;
}

.manual-coin-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 34px;
    margin-top: 2px;
}

.manual-empty {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.manual-coin-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    border: 1px solid rgba(124,58,237,0.4);
    background: rgba(124,58,237,0.13);
    color: #ddd6fe;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 10px;
    line-height: 1;
}

.manual-chip-remove {
    border: none;
    background: transparent;
    color: #c4b5fd;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.manual-chip-remove:hover {
    color: #f5f3ff;
}

.controls-actions {
    width: 100%;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 16px;
    margin-top: 0;
}

.controls-actions .control-group--btn {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
}

.controls-actions .control-group--btn:first-child {
    justify-content: flex-end;
}

.controls-actions .control-group--btn:last-child {
    justify-content: flex-start;
}

.control-group--unlock {
    position: relative;
}

.controls-actions .control-group--btn > button {
    width: min(100%, 240px);
    min-height: 42px;
    margin: 0;
    justify-content: center;
    padding: 10px 16px;
    font-size: 0.9rem;
}

.premium-unlock-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(360px, 92vw);
    max-height: min(80vh, 520px);
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: 0 0 0 100vmax rgba(0,0,0,0.45), var(--shadow-lg);
    padding: 12px;
    z-index: 1200;
}

.premium-unlock-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.premium-unlock-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.premium-unlock-row input {
    height: 34px;
    padding: 8px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
}

.premium-unlock-row input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.14);
}

.premium-reveal-btn {
    height: 34px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: rgba(14,165,233,0.12);
    color: #bae6fd;
    padding: 0 10px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.premium-reveal-btn:hover {
    background: rgba(14,165,233,0.2);
}

.premium-unlock-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.premium-unlock-submit,
.premium-unlock-api,
.premium-unlock-cancel {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-secondary);
    padding: 6px 10px;
    font-size: 0.76rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.premium-unlock-submit {
    background: rgba(16,185,129,0.14);
    border-color: rgba(16,185,129,0.5);
    color: #86efac;
}

.premium-unlock-api {
    background: rgba(14,165,233,0.14);
    border-color: rgba(125,211,252,0.45);
    color: #bae6fd;
}

.premium-unlock-status {
    min-height: 16px;
    margin-top: 8px;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.premium-unlock-status.is-error {
    color: #fca5a5;
}

.premium-unlock-status.is-success {
    color: #86efac;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gradient-purple);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
    box-shadow: 0 2px 12px rgba(124,58,237,0.3);
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(124,58,237,0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(14,165,233,0.12);
    color: #7dd3fc;
    border: 1px solid rgba(125,211,252,0.35);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
    white-space: nowrap;
}

.btn-secondary:hover {
    background: rgba(14,165,233,0.2);
    border-color: rgba(125,211,252,0.55);
    color: #d7f4ff;
    transform: translateY(-1px);
}

.btn-secondary.is-unlocked {
    background: rgba(16,185,129,0.14);
    border-color: rgba(16,185,129,0.45);
    color: #86efac;
}

/* ===== Stats Cards ===== */
.stats-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 22px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 11px;
    transition: transform var(--transition), box-shadow var(--transition);
    animation: fadeInUp 0.4s ease both;
}

.stat-card:nth-child(2) { animation-delay: 0.05s; }
.stat-card:nth-child(3) { animation-delay: 0.1s; }
.stat-card:nth-child(4) { animation-delay: 0.15s; }

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card--purple { border-left: 3px solid var(--accent-purple); }
.stat-card--red { border-left: 3px solid var(--accent-red); }
.stat-card--green { border-left: 3px solid var(--accent-green); }
.stat-card--blue { border-left: 3px solid var(--accent-blue); }

.stat-icon {
    font-size: 1.6rem;
    line-height: 1;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
}

.stat-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.results-section .stats-section {
    max-width: none;
    margin: 14px 0;
    padding: 0;
}

.results-section .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.results-section .stat-card {
    gap: 10px;
    padding: 8px 10px;
}

.results-section .stat-icon {
    font-size: 1.2rem;
}

.results-section .stat-label {
    font-size: 0.65rem;
}

.results-section .stat-value {
    font-size: 0.95rem;
}

/* ===== Progress ===== */
.progress-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 22px;
}

.progress-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
}

.progress-text {
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--accent-purple-light);
}

.progress-bar-track {
    width: 100%;
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-purple);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-detail {
    margin-top: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ===== Results Table ===== */
.results-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 22px;
    font-size: 0.84rem;
}

.results-header {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 22px;
}

.results-header .stats-section {
align-self: stretch;
width: 100%;
}

.results-header h2 {
font-size: 1.1rem;
font-weight: 700;
}

.results-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.results-toolbar select,
.results-toolbar input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 7px 12px;
    font-size: 0.82rem;
    font-family: inherit;
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.results-toolbar select:focus,
.results-toolbar input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}

.results-toolbar input {
    min-width: 180px;
}

.results-count {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.metric-note {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.table-wrapper {
    overflow-x: auto;
    margin: 14px 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.vol-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    font-family: inherit;
}

.vol-table thead th {
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    padding: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.vol-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
    cursor: pointer;
}

.vol-table tbody tr:last-child { border-bottom: none; }

.vol-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.vol-table td {
    padding: 10px;
    white-space: nowrap;
    font-size: 12px;
    font-family: inherit;
    text-align: center;
}

.vol-table .th-coin,
.vol-table td:nth-child(2),
.vol-table #volatilityHeader,
.vol-table td:nth-child(8),
.vol-table #totalMovementHeader,
.vol-table td:nth-child(9) {
    white-space: normal;
    line-height: 1.2;
}

.vol-table td:nth-child(2) {
    text-align: left;
}

.th-rank, .td-rank { width: 50px; text-align: center; }
.th-vol { color: var(--accent-purple-light) !important; }

.coin-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
}

.coin-cell > span {
    min-width: 0;
}

.coin-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.coin-meta > span {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.row-analyze-btn {
    border: 1px solid var(--border-light);
    background: rgba(124,58,237,0.12);
    color: var(--accent-purple-light);
    border-radius: 999px;
    padding: 3px 7px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    flex: 0 0 auto;
    margin-left: auto;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
    box-shadow: 0 0 0 rgba(124,58,237,0);
    animation: analyzePulse 1.8s ease-in-out infinite;
}

.row-analyze-btn:hover {
    background: rgba(124,58,237,0.2);
    border-color: var(--accent-purple);
    color: #e7dcff;
}

.coin-cell img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.coin-name {
    font-weight: 600;
    color: var(--text-primary);
}

.coin-symbol {
    color: var(--text-muted);
    text-transform: uppercase;
    margin-left: 0;
}

.change-positive { color: var(--accent-green); font-weight: 600; }
.change-negative { color: var(--accent-red); font-weight: 600; }

.vol-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(124,58,237,0.12);
    color: var(--accent-purple-light);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
}

.vol-badge--high {
    background: rgba(239,68,68,0.12);
    color: var(--accent-red);
}

.vol-badge--medium {
    background: rgba(245,158,11,0.12);
    color: var(--accent-amber);
}

.vol-badge--low {
    background: rgba(16,185,129,0.12);
    color: var(--accent-green);
}

.sparkline-cell canvas {
    display: block;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 33px;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 33px;
    max-width: 963px;
    width: min(100%, 963px);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    padding: 3px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color var(--transition);
    line-height: 1;
}

.modal-close:hover { color: var(--text-primary); }

.modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
}

.modal-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

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

.modal-header .modal-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.movement-type-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.modal-body canvas {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.calc-panel {
    margin: 33px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(124,58,237,0.08), rgba(124,58,237,0.02));
    padding: 22px;
}

.calc-panel--primary {
    background: linear-gradient(180deg, rgba(59,130,246,0.1), rgba(59,130,246,0.03));
}

.calc-panel-header {
    margin: 11px 0;
}

.calc-panel-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 11px 0;
}

.chart-type-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.chart-controls {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.chart-full-move-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--text-muted);
    user-select: none;
}

.chart-full-move-toggle input {
    width: 14px;
    height: 14px;
    accent-color: var(--accent-indigo);
}

.swing-threshold-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.swing-threshold-control input {
    width: 78px;
    padding: 4px 6px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: inherit;
}

.swing-threshold-count {
    margin-top: 10px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.chart-type-btn {
    border: 1px solid var(--border-light);
    background: var(--bg-input);
    color: var(--text-muted);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.chart-type-btn:hover {
    border-color: var(--accent-indigo);
    color: var(--text-primary);
}

.chart-type-btn.is-active {
    background: rgba(99,102,241,0.18);
    border-color: rgba(99,102,241,0.55);
    color: #c7d2fe;
}

.calc-panel-header h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.calc-panel-header p {
    margin: 11px 0;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.calc-chart-meta {
    font-size: 11px;
    color: #a5a6ba;
    padding-left: 2px;
}

.swing-chart-meta-hit-count {
    color: #34d399;
}

#ChartPriceMovement,
#ChartCandleAnalysis,
#ChartWickThresholdHits {
    margin: 11px 0;
    cursor: grab;
}
#ChartPriceMovement:active,
#ChartCandleAnalysis:active,
#ChartWickThresholdHits:active {
    cursor: grabbing;
}

.modal-stats {
    margin: 33px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.modal-stat {
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}

.modal-stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.modal-stat-value {
    font-size: 1rem;
    font-weight: 700;
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 11px;
    background: transparent;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: auto;
}

.footer p {
    max-width: 1200px;
    margin: 0 auto;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.footer a {
    color: var(--accent-purple-light);
    text-decoration: none;
}

.footer a:hover { text-decoration: underline; }

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes alphaPulse {
    0%, 100% {
        box-shadow: 0 0 0 rgba(252,211,77,0);
        filter: brightness(1);
    }
    50% {
        box-shadow: 0 0 16px rgba(252,211,77,0.35);
        filter: brightness(1.08);
    }
}

@keyframes analyzePulse {
    0%, 100% {
        box-shadow: 0 0 0 rgba(124,58,237,0);
        filter: brightness(1);
    }
    50% {
        box-shadow: 0 0 14px rgba(167,139,250,0.35);
        filter: brightness(1.08);
    }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.row-animate {
    animation: fadeInUp 0.3s ease both;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero { padding: 11px; }
    main { padding: 0; }
    .logo {
        flex-wrap: wrap;
        gap: 10px;
        margin: 8px 0;
    }
    .logo h1 {
        font-size: 1.3rem;
        width: 100%;
        text-align: center;
    }
    .controls-section, .stats-section, .progress-section, .results-section { padding: 22px; }
    .results-section > .stats-section { padding: 0; }
    .controls-bar {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    #analysisModeGroup,
    #coinCountGroup,
    #manualCoinGroup {
        grid-column: auto;
    }
    .control-group { min-width: 120px; }
    .controls-actions {
        width: 100%;
        grid-column: auto;
        grid-template-columns: 1fr;
    }
    .controls-actions .control-group--btn > button {
        width: 100%;
    }
    .controls-actions .control-group--btn {
        justify-content: center;
    }
    .premium-unlock-panel {
        width: min(360px, calc(100vw - 22px));
        max-height: 85vh;
    }
    .vol-table { font-size: 12px; }
    .vol-table td, .vol-table thead th { padding: 10px 10px; }
    .modal { padding: 22px; }
    .th-sparkline, .sparkline-cell { display: none; }
    .row-analyze-btn { padding: 3px 8px; }
}

@media (max-width: 480px) {
    .controls-bar { grid-template-columns: 1fr; }
    .control-group { width: 100%; }
    .logo h1 { font-size: 1.15rem; }
    .manual-search-row {
        flex-direction: column;
        align-items: stretch;
    }
    .manual-search-row .btn-secondary {
        width: 100%;
    }
    .results-section .stats-grid { grid-template-columns: 1fr; }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
