:root {
  --surface: #0a0e14;
  --green: #00ff41;
  --green-dark: #00cc34;
  --green-80: rgba(0, 255, 65, 0.8);
  --green-60: rgba(0, 255, 65, 0.6);
  --green-50: rgba(0, 255, 65, 0.5);
  --green-40: rgba(0, 255, 65, 0.4);
  --green-30: rgba(0, 255, 65, 0.3);
  --green-20: rgba(0, 255, 65, 0.2);
  --green-10: rgba(0, 255, 65, 0.1);
  --green-05: rgba(0, 255, 65, 0.05);
  --blue: #1677ff;
  --radius: 8px;
  --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
}

* { box-sizing: border-box; }
html { background: var(--surface); }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--surface); color: var(--green); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 14px; line-height: 22px; }
button, input, select { font: inherit; }
button, select, a { -webkit-tap-highlight-color: transparent; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon-sprite symbol { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.icon-sprite symbol#icon-bolt { fill: currentColor; stroke-width: 1.5; }

.matrix-canvas, .matrix-glow { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.matrix-canvas { opacity: 0.15; }
.matrix-glow { background: linear-gradient(135deg, var(--green-05), transparent 48%, var(--green-05)); }
.scanlines { position: fixed; inset: 0; z-index: 1; pointer-events: none; background-image: linear-gradient(rgba(0, 255, 65, 0.03) 1px, transparent 1px); background-size: 100% 2px; }
.app-shell { position: relative; z-index: 2; width: min(1280px, 100%); margin: 0 auto; padding: 24px 16px 40px; }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 32px; padding-bottom: 16px; border-bottom: 1px solid var(--green-30); backdrop-filter: blur(8px); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; width: 50px; height: 50px; flex: 0 0 50px; place-items: center; border: 1px solid var(--green-40); border-radius: var(--radius); background: var(--green-05); }
.brand-mark svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
h1, h2, p, dl, dd { margin: 0; }
h1 { color: var(--green); font-size: 24px; font-weight: 700; letter-spacing: 0.025em; line-height: 32px; }
.header-tools { display: flex; flex: 0 1 auto; align-items: center; gap: 8px; }
.header-support { display: none; width: 36px; height: 36px; place-items: center; border: 1px solid var(--blue); border-radius: 50%; background: var(--green-05); color: var(--green); font-size: 18px; text-decoration: none; }
.clock { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; color: var(--green-80); font-size: 14px; font-weight: 700; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green-80); animation: pulse 1.8s ease-in-out infinite; }

.dashboard { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.primary-column { grid-column: span 2; }
.primary-column, .side-column { display: grid; align-content: start; gap: 24px; }
.panel { border: 1px solid var(--green-30); border-radius: var(--radius); background: rgba(10, 14, 20, 0.8); backdrop-filter: blur(8px); transition: border-color 300ms var(--ease-out), box-shadow 300ms var(--ease-out); }
.panel:hover { border-color: var(--green-50); box-shadow: 0 0 20px var(--green-10); }
.panel h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--green); font-size: 20px; font-weight: 700; letter-spacing: 0.05em; line-height: 28px; }
.section-icon, .label-icon, .info-icon, .status-icon, .button-icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.code-manager, .system-info { padding: 24px; }
.manager-copy { display: grid; gap: 12px; color: var(--green-80); }
.manager-copy p { font-size: 16px; font-weight: 600; line-height: 24px; }
.scan-button, .run-button, .support-button { display: flex; width: 100%; min-height: 48px; align-items: center; justify-content: center; border-radius: var(--radius); font-size: 14px; font-weight: 600; line-height: 22px; text-decoration: none; }
.scan-button { min-height: 60px; margin-top: 28px; border: 0; background: linear-gradient(to right, var(--green), var(--green-dark)); color: var(--surface); box-shadow: 0 0 25px rgba(0, 255, 65, 0.5); cursor: pointer; font-size: 18px; font-weight: 700; letter-spacing: 0.025em; transition: transform 150ms var(--ease-out), box-shadow 300ms var(--ease-out); animation: pulse-glow 2s ease-in-out infinite; }
.scan-button:hover { box-shadow: 0 0 40px rgba(0, 255, 65, 0.8); transform: scale(1.03); }
.scan-button:active { transform: scale(0.98); }
.button-icon { margin-right: 8px; }
.scan-button .button-icon { fill: currentColor; stroke-width: 1.5; }

.target-panel { padding: 24px 24px 26px; }
.target-panel h2 { margin-bottom: 16px; }
.field-group { display: grid; gap: 8px; margin-bottom: 16px; }
.field-label { display: flex; align-items: center; gap: 8px; color: var(--green-80); font-size: 14px; font-weight: 600; line-height: 22px; }
.label-icon { width: 16px; height: 16px; }
.select-wrap { position: relative; }
.platform-trigger, input { width: 100%; min-height: 48px; border: 2px solid var(--green-60); border-radius: var(--radius); outline: none; background: var(--surface); color: var(--green); font-size: 14px; font-weight: 600; line-height: 22px; padding: 0 16px; }
.platform-trigger { display: flex; align-items: center; justify-content: space-between; text-align: left; cursor: pointer; }
.platform-trigger[aria-expanded="true"] { border-color: var(--green); }
.chevron-icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; transition: transform 200ms var(--ease-out); }
.platform-trigger[aria-expanded="true"] .chevron-icon { transform: rotate(180deg); }
input::placeholder { color: var(--green-40); }
.platform-trigger:focus-visible, input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.platform-popup { position: fixed; z-index: 9; width: min(774px, calc(100vw - 32px)); padding: 1px; border: 1px solid var(--green-30); border-radius: var(--radius); background: rgba(10, 14, 20, 0.96); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); overflow: auto; }
.platform-popup[hidden] { display: none; }
.platform-option { display: flex; width: 100%; min-height: 70.75px; align-items: stretch; border-bottom: 1px solid var(--green-20); background: transparent; color: var(--green); cursor: pointer; }
.platform-option:last-child { border-bottom: 0; }
.platform-option.is-active .platform-select, .platform-option:hover .platform-select { background: var(--green-05); }
.platform-select { display: flex; width: 220px; min-height: 69.75px; flex: 0 0 220px; align-items: stretch; gap: 12px; border: 0; background: transparent; color: inherit; cursor: pointer; padding: 8px 0 8px 12px; text-align: left; transition: background 200ms var(--ease-out); }
.platform-select:active { background: var(--green-10); }
.platform-name { width: 100px; flex: 0 0 100px; color: var(--green-80); font-size: 12px; line-height: 15px; }
.platform-details { display: flex; width: 96px; min-width: 0; flex: 0 1 96px; flex-direction: column; color: var(--green-60); font-size: 9px; line-height: 11.25px; }
.platform-detail-row { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.platform-detail-row > * { min-width: 0; flex-shrink: 1; }
.platform-detail-row strong { color: var(--green); font-size: 9px; font-weight: 600; line-height: 11.25px; }
.platform-ratio { color: #facc15 !important; font-size: 12px !important; font-weight: 700 !important; line-height: 16px !important; }
.platform-ratio.is-low-ratio { color: #ff3b45 !important; }
.platform-cta { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(to bottom, var(--green-20), var(--green-10)); color: var(--green); font-size: 12px; font-weight: 700; line-height: 17px; padding: 8px; text-align: center; }
.platform-cta strong:last-child { margin-top: 4px; color: #facc15; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.run-button { margin-top: 0; border: 1px solid var(--green-60); background: linear-gradient(to right, var(--green-10), var(--green-05)); color: var(--green); transition: border-color 300ms var(--ease-out), background 300ms var(--ease-out), box-shadow 300ms var(--ease-out); }
.run-button:disabled { opacity: 0.3; cursor: not-allowed; }
.support-button { margin-top: 16px; border: 2px solid var(--green-60); background: var(--surface); color: var(--blue); transition: border-color 200ms var(--ease-out), background 200ms var(--ease-out), transform 150ms var(--ease-out); }
.support-button:hover { border-color: var(--green); background: var(--green-05); transform: translateY(-2px); }
.support-button:active { transform: translateY(2px); }

.live-feed { padding: 16px; }
.live-feed h2 { margin-bottom: 12px; font-size: 18px; letter-spacing: 0.05em; }
.feed-list { display: grid; max-height: 350px; gap: 6px; overflow-y: auto; }
.feed-entry { display: grid; grid-template-columns: auto 1fr; gap: 8px; padding: 8px; border: 1px solid var(--green-20); border-radius: 4px; background: rgba(10, 14, 20, 0.5); }
.feed-entry > span { font-size: 12px; }
.feed-entry p { color: var(--green-80); font-size: 12px; font-weight: 400; line-height: 15px; }
.feed-entry strong { color: var(--green); }
.feed-entry time { display: block; margin-top: 4px; color: var(--green-50); font-size: 10px; line-height: 13px; }
.info-list { display: grid; gap: 12px; }
.info-list div { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 12px; border: 1px solid var(--green-30); border-radius: var(--radius); background: linear-gradient(to right, var(--green-10), var(--green-05)); }
.info-list dt { display: flex; align-items: center; gap: 8px; color: var(--green-60); font-size: 14px; font-weight: 600; }
.info-list dd { color: var(--green); font-size: 14px; font-weight: 600; text-align: right; white-space: nowrap; }
.info-icon { width: 16px; height: 16px; }
.status-panel { display: grid; gap: 12px; padding: 16px; background: linear-gradient(135deg, rgba(10, 14, 20, 0.9), var(--green-05)); }
.status-panel p { display: flex; justify-content: space-between; gap: 16px; font-size: 12px; font-weight: 600; line-height: 18px; }
.status-panel p span { color: var(--green-60); }
.status-panel strong { display: flex; align-items: center; gap: 8px; color: var(--green); }
.status-icon { width: 12px; height: 12px; }
.two-factor { display: grid; gap: 8px; width: 100%; padding: 16px; color: var(--green); text-align: left; font-size: 12px; line-height: 18px; cursor: pointer; transition: border-color 200ms var(--ease-out), background 200ms var(--ease-out); }
.two-factor:hover { border-color: var(--green-60); background: linear-gradient(135deg, rgba(10, 14, 20, 0.9), var(--green-05)); }
.two-factor:active { transform: translateY(2px); }
.two-factor strong { display: flex; align-items: center; gap: 8px; color: var(--green-80); }
.two-factor span { color: var(--green-50); line-height: 18px; }

.scan-modal { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, 0.9); backdrop-filter: blur(8px); }
.scan-modal[hidden], .auth-modal[hidden], .toast[hidden] { display: none; }
.scan-dialog { width: min(448px, 100%); padding: 32px; border: 2px solid var(--green-50); border-radius: var(--radius); background: var(--surface); box-shadow: 0 0 30px var(--green-30); text-align: center; }
.scan-dialog h2 { margin: 24px 0 8px; font-size: 18px; line-height: 28px; letter-spacing: 0.04em; }
.scan-dialog p { color: var(--green-80); font-size: 14px; }
.spinner { display: inline-block; width: 48px; height: 48px; border: 4px solid var(--green-20); border-top-color: var(--green); border-radius: 50%; animation: spin 1s linear infinite; }
.toast { position: fixed; top: 24px; right: 24px; z-index: 11; max-width: min(360px, calc(100% - 32px)); padding: 12px 16px; border: 1px solid var(--green-40); border-radius: var(--radius); background: var(--surface); color: var(--green); font-size: 14px; box-shadow: 0 0 20px var(--green-20); }
.auth-modal { position: fixed; inset: 0; z-index: 12; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, 0.86); backdrop-filter: blur(10px); }
.auth-dialog { width: min(480px, 100%); border: 2px solid var(--green-50); border-radius: 10px; background: var(--surface); box-shadow: 0 0 32px var(--green-30); overflow: hidden; }
.auth-header { display: flex; min-height: 72px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--green-40); padding: 14px 20px; }
.auth-title { display: flex; min-width: 0; align-items: center; gap: 10px; }
.auth-title svg { width: 24px; height: 24px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.auth-title h2, .auth-loading h2, .auth-success h2 { margin: 0; color: var(--green); font-size: 20px; font-weight: 700; letter-spacing: 0.05em; line-height: 1.2; }
.auth-close { width: 32px; height: 32px; border: 0; background: transparent; color: var(--green-60); cursor: pointer; font-size: 32px; font-weight: 300; line-height: 1; transition: color 150ms var(--ease-out), transform 150ms var(--ease-out); }
.auth-close:hover { color: var(--green); transform: scale(1.08); }
.auth-form, .auth-loading, .auth-success { padding: 20px 24px 24px; }
.auth-form > p:first-child { margin-bottom: 16px; color: var(--green); font-size: 16px; line-height: 1.35; }
.auth-form label { display: block; margin-bottom: 8px; color: var(--green); font-size: 14px; font-weight: 600; }
.auth-form input { min-height: 56px; border-color: var(--green-50); border-radius: 8px; font-size: 20px; padding: 0 16px; }
.auth-form input:focus { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-10); }
.auth-error { margin-top: 14px !important; color: #ff6b6b; font-size: 16px; line-height: 1.4; }
.auth-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.auth-secondary, .auth-confirm { min-height: 56px; border: 2px solid var(--green-30); border-radius: 8px; background: var(--surface); color: var(--green); cursor: pointer; font-size: 18px; font-weight: 700; transition: background 200ms var(--ease-out), border-color 200ms var(--ease-out), transform 150ms var(--ease-out); }
.auth-confirm { border-color: var(--green-70, rgba(0, 255, 65, 0.7)); background: var(--green-05); }
.auth-confirm:hover:not(:disabled) { border-color: var(--green); background: var(--green-10); }
.auth-secondary:hover { border-color: var(--green-60); background: var(--green-05); }
.auth-secondary:active, .auth-confirm:active:not(:disabled) { transform: scale(0.98); }
.auth-confirm:disabled { opacity: 0.35; cursor: not-allowed; }
.auth-hint { margin-top: 16px; color: var(--green-50); font-size: 12px; text-align: center; }
.auth-support { display: flex; min-height: 56px; align-items: center; justify-content: center; margin-top: 16px; border: 2px solid #c79b00; border-radius: 8px; background: rgba(199, 155, 0, 0.1); color: #facc15; font-size: 18px; font-weight: 700; text-decoration: none; }
.auth-loading, .auth-success { display: grid; justify-items: center; gap: 12px; min-height: 250px; align-content: center; text-align: center; }
.auth-form[hidden], .auth-loading[hidden], .auth-success[hidden], .auth-support[hidden] { display: none !important; }
.auth-loading p { color: var(--green-70, rgba(0, 255, 65, 0.7)); font-size: 13px; line-height: 1.8; text-align: left; }
.auth-success > svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.auth-success p { color: var(--green-80); font-size: 14px; }
.auth-success .auth-confirm { width: min(240px, 100%); min-height: 48px; font-size: 14px; }
.low-ratio-modal { position: fixed; inset: 0; z-index: 13; display: grid; place-items: center; padding: 16px; background: rgba(18, 3, 3, 0.9); backdrop-filter: blur(10px); }
.low-ratio-modal[hidden] { display: none; }
.low-ratio-dialog { width: min(480px, 100%); padding: 28px 32px 32px; border: 3px solid #ff3b45; border-radius: 12px; background: linear-gradient(180deg, rgba(144, 18, 22, 0.92), rgba(65, 7, 9, 0.97)); box-shadow: 0 0 30px rgba(255, 59, 69, 0.3); color: #ff3b45; text-align: center; }
.low-ratio-icon { display: inline-grid; width: 64px; height: 64px; place-items: center; border-radius: 50%; background: rgba(255, 59, 69, 0.14); }
.low-ratio-icon svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.low-ratio-dialog h2 { margin: 20px 0 14px; font-size: 22px; letter-spacing: 0.06em; line-height: 1.2; }
.low-ratio-dialog p { color: #ff747b; font-size: 16px; line-height: 1.45; }
.low-ratio-dialog button { width: 100%; min-height: 56px; margin-top: 24px; border: 2px solid #d52b35; border-radius: 8px; background: rgba(71, 7, 9, 0.48); color: #ff3b45; cursor: pointer; font-size: 18px; font-weight: 700; transition: background 200ms var(--ease-out), transform 150ms var(--ease-out); }
.low-ratio-dialog button:hover { background: rgba(255, 59, 69, 0.14); }
.low-ratio-dialog button:active { transform: scale(0.98); }
.faq { max-width: 768px; margin: 48px auto 0; padding: 32px 0 0; border-top: 1px solid var(--green-20); }
.faq h2 { margin-bottom: 24px; font-size: 18px; font-weight: 700; letter-spacing: 0.025em; line-height: 28px; }
.faq dl { display: grid; gap: 24px; }
.faq dt { margin-bottom: 8px; font-weight: 700; }
.faq dd { color: var(--green-80); font-size: 16px; line-height: 24px; }

@keyframes pulse { 50% { opacity: 0.45; } }
@keyframes pulse-glow { 50% { box-shadow: 0 0 32px rgba(0, 255, 65, 0.8); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1023px) { .dashboard { grid-template-columns: 1fr; } .primary-column { grid-column: auto; } .side-column { grid-template-columns: 1fr; } }
@media (max-width: 767px) { .app-header { margin-bottom: 32px; } .brand-mark { width: 46px; height: 46px; flex-basis: 46px; } .brand-mark svg { width: 24px; height: 24px; } h1 { font-size: 18px; line-height: 28px; } .header-support { display: grid; } .clock { font-size: 12px; line-height: 18px; } .clock time { max-width: 76px; white-space: normal; } .dashboard, .primary-column, .side-column { gap: 16px; } .side-column { grid-template-columns: 1fr; } .code-manager, .system-info, .target-panel { padding: 16px; } .panel h2 { font-size: 18px; line-height: 28px; } .live-feed h2, .faq h2 { font-size: 16px; line-height: 24px; } .manager-copy p { font-size: 13px; line-height: 20px; } .scan-button { margin-top: 24px; } .platform-select { width: 176px; flex-basis: 176px; gap: 8px; padding-left: 8px; } .platform-name { width: 76px; flex-basis: 76px; font-size: 10px; } .platform-details { font-size: 8px; } .platform-detail-row { gap: 3px; } .platform-detail-row strong, .platform-ratio { font-size: 9px !important; } .platform-cta { padding: 6px; font-size: 9px; line-height: 13px; } .faq { margin-top: 32px; padding-top: 24px; font-size: 14px; } .faq dd { font-size: 14px; line-height: 22px; } .toast { top: 16px; right: 16px; } .auth-dialog { border-radius: 8px; } .auth-header { min-height: 72px; padding: 14px 18px; } .auth-title { gap: 10px; } .auth-title svg { width: 24px; height: 24px; } .auth-title h2, .auth-loading h2, .auth-success h2 { font-size: 20px; } .auth-close { width: 32px; height: 32px; font-size: 32px; } .auth-form, .auth-loading, .auth-success { padding: 26px 22px; } .auth-form > p:first-child { margin-bottom: 22px; font-size: 18px; } .auth-form label { margin-bottom: 8px; font-size: 18px; } .auth-form input { min-height: 58px; border-radius: 8px; font-size: 22px; padding: 0 16px; } .auth-actions { gap: 12px; margin-top: 20px; } .auth-secondary, .auth-confirm { min-height: 58px; border-radius: 8px; font-size: 20px; } .auth-hint { margin-top: 20px; font-size: 14px; } .auth-support { min-height: 58px; margin-top: 20px; border-radius: 8px; font-size: 19px; } .auth-loading, .auth-success { min-height: 300px; } }
@media (max-width: 767px) { .auth-header { min-height: 64px; padding: 12px 16px; } .auth-title h2, .auth-loading h2, .auth-success h2 { font-size: 18px; } .auth-close { width: 28px; height: 28px; font-size: 28px; } .auth-form, .auth-loading, .auth-success { padding: 18px 20px 20px; } .auth-form > p:first-child { margin-bottom: 14px; font-size: 15px; } .auth-form label { font-size: 14px; } .auth-form input { min-height: 52px; font-size: 18px; } .auth-actions { margin-top: 16px; } .auth-secondary, .auth-confirm { min-height: 52px; font-size: 17px; } .auth-hint { margin-top: 16px; font-size: 12px; } .auth-support { min-height: 52px; margin-top: 16px; font-size: 17px; } .auth-loading, .auth-success { min-height: 240px; } }
@media (max-width: 767px) { .low-ratio-dialog { padding: 28px 24px 32px; border-radius: 12px; } .low-ratio-icon { width: 64px; height: 64px; } .low-ratio-icon svg { width: 38px; height: 38px; } .low-ratio-dialog h2 { margin: 20px 0 14px; font-size: 21px; } .low-ratio-dialog p { font-size: 16px; } .low-ratio-dialog button { min-height: 52px; margin-top: 24px; font-size: 18px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; } }
