* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --green: #34d399;
    --green-bg: rgba(52, 211, 153, 0.08);
    --green-border: rgba(52, 211, 153, 0.2);
    --amber: #fbbf24;
    --amber-bg: rgba(251, 191, 36, 0.08);
    --amber-border: rgba(251, 191, 36, 0.2);
    --red: #f87171;
    --red-bg: rgba(248, 113, 113, 0.08);
    --red-border: rgba(248, 113, 113, 0.2);
    --blue: #818cf8;
    --blue-bg: rgba(129, 140, 248, 0.08);
    --blue-border: rgba(129, 140, 248, 0.2);
    --surface: #0a0a0f;
    --surface-1: rgba(255, 255, 255, 0.03);
    --surface-2: rgba(255, 255, 255, 0.05);
    --surface-3: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.55);
    --text-tertiary: rgba(255, 255, 255, 0.35);
    --accent: #818cf8;
    --accent-glow: rgba(129, 140, 248, 0.15);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 8px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--surface);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Noise texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

/* Nav */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    max-width: 720px;
    margin: 0 auto;
}

.nav-actions {
    display: flex;
    gap: 8px;
}

.nav-link {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    padding: 7px 14px;
    border-radius: 100px;
    transition: all 0.2s;
    letter-spacing: 0.2px;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--surface-3);
    border-color: var(--border-hover);
}

.logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo span {
    background: linear-gradient(135deg, var(--accent), #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero */
.hero {
    max-width: 560px;
    margin: 0 auto;
    padding: 80px 24px 100px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--accent-glow);
    color: var(--accent);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 28px;
    border: 1px solid rgba(129, 140, 248, 0.15);
    letter-spacing: 0.3px;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -2px;
    margin-bottom: 16px;
    color: var(--text-primary);
    background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.6) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 44px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

/* Upload area */
.upload-area {
    border: 1px dashed var(--border-hover);
    border-radius: var(--radius);
    padding: 52px 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--surface-1);
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: radial-gradient(ellipse at 50% 0%, var(--accent-glow), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.upload-area:hover::before,
.upload-area.dragover::before {
    opacity: 1;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--accent);
    background: var(--surface-2);
}

.upload-icon {
    color: var(--text-tertiary);
    margin-bottom: 16px;
    transition: all 0.3s;
    position: relative;
}

.upload-area:hover .upload-icon,
.upload-area.dragover .upload-icon {
    color: var(--accent);
    transform: translateY(-2px);
}

.upload-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    position: relative;
}

.upload-sub {
    font-size: 13px;
    color: var(--text-secondary);
    position: relative;
}

.link-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 500;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(129, 140, 248, 0.3);
    padding-bottom: 1px;
    transition: all 0.2s;
}

.link-btn:hover {
    border-bottom-color: var(--accent);
}

.upload-formats {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 14px;
    position: relative;
    letter-spacing: 0.3px;
}

/* Mobile upload button */
.mobile-upload-btn {
    display: none;
    width: 100%;
    gap: 8px;
    margin-top: 16px;
    padding: 16px 28px;
    font-size: 15px;
}

/* Options */
.options-section {
    margin-top: 28px;
    text-align: left;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.option-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.option-label > span {
    display: block;
    margin-bottom: 6px;
}

.option-hint {
    font-weight: 400;
    color: var(--text-tertiary);
}

.option-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--surface-1);
    transition: all 0.2s;
}

.option-input::placeholder {
    color: var(--text-tertiary);
}

.option-textarea {
    resize: vertical;
    min-height: 60px;
    line-height: 1.5;
}

.option-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--surface-2);
}

/* Checks Preview */
.checks-preview {
    margin-top: 48px;
    text-align: left;
}

.checks-preview-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: -0.2px;
    margin-bottom: 16px;
    text-align: center;
}

.checks-preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.checks-preview-grid .preview-category:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.preview-category {
    padding: 16px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.preview-category:hover {
    background: var(--surface-2);
    border-color: var(--border-hover);
}

.preview-cat-icon {
    color: var(--accent);
    margin-bottom: 8px;
    opacity: 0.7;
}

.preview-cat-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.1px;
}

.preview-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.preview-list li {
    font-size: 11px;
    color: var(--text-tertiary);
    padding-left: 14px;
    position: relative;
    line-height: 1.4;
}

.preview-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.4;
}

/* Trust row */
.trust-row {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-top: 44px;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: var(--text-tertiary);
    letter-spacing: 0.2px;
}

.trust-item svg {
    flex-shrink: 0;
    opacity: 0.5;
}

/* Processing */
.processing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-bottom: 28px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.processing-container h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.processing-file {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 36px;
}

.check-progress {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 280px;
}

.check-step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-tertiary);
    transition: all 0.3s;
    letter-spacing: 0.2px;
}

.check-step.active {
    color: var(--text-primary);
    font-weight: 500;
}

.check-step.done {
    color: var(--green);
}

.check-step-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-tertiary);
    flex-shrink: 0;
    transition: all 0.3s;
}

.check-step.active .check-step-dot {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
    animation: pulse 1.2s infinite;
}

.check-step.done .check-step-dot {
    background: var(--green);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ============================================================
   SCORE SECTION
   ============================================================ */

.score-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 48px 32px 40px;
    border-radius: 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface-1);
}

.score-section::before {
    content: '';
    position: absolute;
    top: -60%;
    left: 50%;
    transform: translateX(-50%);
    width: 120%;
    height: 120%;
    border-radius: 50%;
    opacity: 0.12;
    transition: background 0.6s;
}

.score-section.pass::before { background: radial-gradient(circle, var(--green), transparent 65%); }
.score-section.warn::before { background: radial-gradient(circle, var(--amber), transparent 65%); }
.score-section.fail::before { background: radial-gradient(circle, var(--red), transparent 65%); }

.score-section.pass { border-color: var(--green-border); }
.score-section.warn { border-color: var(--amber-border); }
.score-section.fail { border-color: var(--red-border); }

.score-top {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-ring-wrap {
    position: relative;
    width: 130px;
    height: 130px;
    flex-shrink: 0;
    margin-bottom: 24px;
}

.score-ring {
    width: 130px;
    height: 130px;
    transform: rotate(-90deg);
    filter: drop-shadow(0 0 12px var(--accent-glow));
}

.score-section.pass .score-ring { filter: drop-shadow(0 0 16px rgba(52, 211, 153, 0.3)); }
.score-section.warn .score-ring { filter: drop-shadow(0 0 16px rgba(251, 191, 36, 0.3)); }
.score-section.fail .score-ring { filter: drop-shadow(0 0 16px rgba(248, 113, 113, 0.3)); }

.score-ring-bg {
    fill: none;
    stroke: var(--surface-3);
    stroke-width: 6;
}

.score-ring-fill {
    fill: none;
    stroke: var(--green);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 326.73;
    stroke-dashoffset: 326.73;
    transition: stroke-dashoffset 1.4s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.3s;
}

.score-section.warn .score-ring-fill { stroke: var(--amber); }
.score-section.fail .score-ring-fill { stroke: var(--red); }

.score-number {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -2px;
    color: var(--text-primary);
}

.score-info {
    position: relative;
}

.score-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.score-sub {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 360px;
}

/* Score actions - Fix All CTA inside score section */
.score-actions {
    position: relative;
    margin-top: 24px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 380px;
}

.score-actions:empty {
    display: none;
}

.score-fix-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.score-fix-all.needs-fix {
    background: var(--green);
    color: #000;
    box-shadow: 0 4px 16px rgba(52, 211, 153, 0.3);
}

.score-fix-all.needs-fix:hover {
    background: #5eead4;
    box-shadow: 0 6px 24px rgba(52, 211, 153, 0.4);
    transform: translateY(-1px);
}

.score-fix-all.all-fixed {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
    cursor: default;
}

.score-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--green-border);
    background: var(--green-bg);
    color: var(--green);
}

.score-download-btn:hover {
    background: rgba(52, 211, 153, 0.14);
}

/* Celebration confetti burst */
.score-section.perfect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.15), transparent 50%);
    animation: celebrationPulse 2s ease-out;
    pointer-events: none;
}

@keyframes celebrationPulse {
    0% { transform: translate(-50%, -50%) scale(0.3); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* Check group collapse */
.check-group .checks-list {
    transition: max-height 0.3s ease, opacity 0.2s ease;
    overflow: hidden;
}

.check-group.collapsed .checks-list {
    max-height: 0 !important;
    opacity: 0;
    border: none;
}

.check-group-header {
    position: relative;
}

.check-group-header::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--text-tertiary);
    border-bottom: 2px solid var(--text-tertiary);
    transform: rotate(45deg);
    transition: transform 0.2s;
    margin-left: 8px;
    flex-shrink: 0;
}

.check-group.collapsed .check-group-header::after {
    transform: rotate(-45deg);
}

/* File queue indicator */
.file-queue {
    display: none;
    max-width: 640px;
    margin: 0 auto;
    padding: 12px 24px;
}

.file-queue.visible {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--surface-1);
    border: 1px solid var(--accent-glow);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.file-queue span {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-sm {
    padding: 7px 16px;
    font-size: 12px;
}

/* Results */
.results-main {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px 100px;
}

/* File summary - bento style */
.file-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 20px;
}

.summary-item {
    padding: 14px 16px;
    background: var(--surface-1);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.summary-item:hover {
    background: var(--surface-2);
    border-color: var(--border-hover);
}

.summary-label {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.summary-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Check groups */
.check-group {
    margin-bottom: 12px;
}

.check-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    cursor: pointer;
}

.group-badge {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 100px;
    letter-spacing: 0.2px;
}

.group-badge-fail {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-border);
}

.group-badge-warn {
    background: var(--amber-bg);
    color: var(--amber);
    border: 1px solid var(--amber-border);
}

.group-badge-pass {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
}

/* Checks */
.checks-heading {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.checks-list {
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    overflow: hidden;
}

.check-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 18px;
    background: var(--surface-1);
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.check-item:last-child {
    border-bottom: none;
}

.check-item:hover {
    background: var(--surface-2);
}

.check-item.pass { border-left: 2px solid var(--green); }
.check-item.warn { border-left: 2px solid var(--amber); }
.check-item.fail { border-left: 2px solid var(--red); }
.check-item.info { border-left: 2px solid var(--blue); }

.check-status {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    font-size: 10px;
    font-weight: 700;
    color: var(--surface);
}

.check-item.pass .check-status { background: var(--green); }
.check-item.warn .check-status { background: var(--amber); }
.check-item.fail .check-status { background: var(--red); }
.check-item.info .check-status { background: var(--blue); }

.check-content {
    flex: 1;
    min-width: 0;
}

.check-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.inline-fix-btn {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 4px;
    border: 1px solid var(--amber);
    background: rgba(245, 158, 11, 0.1);
    color: var(--amber);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}
.inline-fix-btn:hover {
    background: rgba(245, 158, 11, 0.2);
}
.inline-fix-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
.inline-fix-btn.inline-fix-done {
    border-color: var(--green);
    background: rgba(34, 197, 94, 0.1);
    color: var(--green);
}


.check-detail {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.2px;
}

.btn-primary:hover {
    background: #6366f1;
    box-shadow: 0 0 24px var(--accent-glow);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--surface-2);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.2px;
}

.btn-secondary:hover {
    background: var(--surface-3);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.results-actions {
    text-align: center;
    margin-top: 28px;
}

/* Tools */
.tools-section {
    margin-top: 12px;
    margin-bottom: 12px;
}

.tools-section .checks-heading {
    margin-bottom: 8px;
    padding-left: 2px;
}

.tools-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    opacity: 0.7;
}

.tools-grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tool-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    letter-spacing: 0.2px;
}

.tool-btn:hover {
    background: var(--surface-2);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.tool-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.tool-btn svg {
    flex-shrink: 0;
    color: var(--text-tertiary);
    transition: color 0.2s;
}

.tool-btn:hover svg {
    color: var(--accent);
}

.tool-btn-fix {
    border-color: var(--amber-border);
    background: var(--amber-bg);
}

.tool-btn-fix:hover {
    background: rgba(251, 191, 36, 0.12);
    border-color: var(--amber);
}

.tool-btn-fix svg {
    color: var(--amber);
}

/* Fix All button */
.tool-btn-fixall {
    border-color: rgba(52, 211, 153, 0.3);
    background: rgba(52, 211, 153, 0.08);
    color: var(--green);
    font-weight: 600;
}

.tool-btn-fixall:hover {
    background: rgba(52, 211, 153, 0.14);
    border-color: var(--green);
    color: var(--green);
}

.tool-btn-fixall svg {
    color: var(--green);
}

.tool-btn-fixall:hover svg {
    color: var(--green);
}

.tool-btn-verify {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.08);
    color: #a78bfa;
    font-weight: 600;
}
.tool-btn-verify:hover {
    background: rgba(139, 92, 246, 0.14);
    border-color: #a78bfa;
}
.tool-btn-verify svg { color: #a78bfa; }
.tool-btn-verify:disabled {
    opacity: 0.7;
    cursor: wait;
}

.tool-btn-done {
    border-color: var(--green-border) !important;
    background: var(--green-bg) !important;
    color: var(--green) !important;
    cursor: default;
    opacity: 0.85;
}

.tools-section + .tools-section {
    margin-top: 4px;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

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

.modal {
    background: #111118;
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    max-height: 80vh;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-tertiary);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color 0.2s;
}

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

.modal-body {
    padding: 16px 22px;
    overflow-y: auto;
    max-height: calc(80vh - 60px);
}

.history-empty {
    text-align: center;
    padding: 44px 0;
    color: var(--text-tertiary);
    font-size: 13px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.history-item:last-child {
    border-bottom: none;
}

.history-score {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.history-score.pass { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.history-score.warn { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-border); }
.history-score.fail { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }

.history-info {
    flex: 1;
    min-width: 0;
}

.history-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-meta {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* Responsive */
@media (max-width: 640px) {
    .hero {
        padding: 48px 20px 60px;
    }

    .hero h1 {
        font-size: 36px;
        letter-spacing: -1.5px;
    }

    .hero-sub {
        font-size: 14px;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .mobile-upload-btn {
        display: inline-flex;
    }

    .trust-row {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    nav {
        padding: 16px 20px;
    }

    .nav-actions {
        gap: 4px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .btn-secondary {
        padding: 6px 10px;
        font-size: 11px;
    }

    .file-summary {
        grid-template-columns: 1fr 1fr;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .score-section {
        padding: 36px 20px 32px;
    }

    .checks-preview-grid {
        grid-template-columns: 1fr;
    }

    .file-queue.visible {
        flex-direction: column;
        text-align: center;
    }
}

/* Fix bar - sticky download bar */
.fix-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: rgba(16, 20, 28, 0.95);
    border-top: 1px solid var(--green-border);
    backdrop-filter: blur(16px);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
    animation: fixBarIn 0.3s ease-out;
}
.fix-bar.visible {
    display: flex;
}
.fix-bar-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}
.fix-bar-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--green);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}
@keyframes fixBarIn {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 10px;
    background: rgba(16, 20, 28, 0.95);
    border: 1px solid var(--green-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    max-width: 380px;
    animation: toastIn 0.3s ease-out;
    backdrop-filter: blur(12px);
}

.toast.toast-out {
    animation: toastOut 0.3s ease-in forwards;
}

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--green);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    margin-top: 1px;
}

.toast-body {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.toast-detail {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

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

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

/* Check item fixed state */
.check-item.fixed {
    border-color: var(--green-border) !important;
    background: var(--green-bg) !important;
}
.check-item.fixed .check-status {
    color: var(--green) !important;
}
.check-item.fixed .check-name {
    color: var(--green) !important;
}
.check-item.fixed .check-detail {
    color: var(--green) !important;
    opacity: 0.8;
}

/* Info items styled as tips - softer, less alarming */
.check-item.tip {
    opacity: 0.75;
}
.check-item.tip .check-name {
    font-weight: 400;
}
.check-item.tip .check-status {
    font-size: 10px;
    opacity: 0.6;
}

/* Advanced tools toggle */
.tools-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 2px;
    user-select: none;
}
.tools-toggle:hover {
    color: var(--accent);
}
.toggle-arrow {
    font-size: 10px;
    color: var(--text-tertiary);
    transition: transform 0.2s;
}
.tools-grid-hidden {
    display: none !important;
}

/* Fix summary in fix bar */
.fix-bar-summary {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Input nudge hints */
.input-nudge {
    font-size: 11px;
    color: var(--accent);
    margin-top: 4px;
    opacity: 0.8;
}

@media (max-width: 600px) {
    .toast-container {
        bottom: 70px;
        right: 16px;
        left: 16px;
    }
    .toast {
        max-width: 100%;
    }
    .fix-bar {
        padding: 10px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
    .fix-bar-info {
        font-size: 12px;
    }
    .fix-bar-summary {
        display: none;
    }
    .score-fix-all {
        font-size: 14px;
        padding: 12px 20px;
    }
}
