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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #1a1a2e;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
}

.card {
    background: #16213e;
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.subtitle {
    color: #888;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.section {
    margin-bottom: 1.5rem;
}

.section h2 {
    font-size: 1rem;
    color: #aaa;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #2a2a4a;
    padding-bottom: 0.25rem;
}

.hint {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.75rem;
}

.rom-status {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    background: #2a4a7f;
    color: #fff;
    transition: background 0.2s;
    text-decoration: none;
    text-align: center;
}
.btn:hover:not(:disabled) { background: #3a5a9f; }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn-primary { background: #1a6b3a; }
.btn-primary:hover:not(:disabled) { background: #228b4a; }
.btn-danger { background: #8b2222; }
.btn-danger:hover:not(:disabled) { background: #a03030; }
.btn-success { background: #2e7d32; display: block; margin-top: 0.5rem; }
.btn-success:hover { background: #388e3c; }

.btn-row {
    display: flex;
    gap: 0.5rem;
}

.progress-bar {
    background: #0a0a1a;
    border-radius: 4px;
    height: 20px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    background: linear-gradient(90deg, #1a6b3a, #2e7d32);
    height: 100%;
    width: 0%;
    transition: width 0.3s;
    border-radius: 4px;
}

.progress-text {
    font-size: 0.85rem;
    color: #aaa;
}

.status {
    font-size: 0.85rem;
    color: #6a9fd8;
    margin-top: 0.25rem;
}

.log {
    background: #0a0a1a;
    border-radius: 6px;
    padding: 0.75rem;
    max-height: 250px;
    overflow-y: auto;
    font-family: "Cascadia Code", "Fira Code", monospace;
    font-size: 0.75rem;
    line-height: 1.5;
}

.log div { white-space: pre-wrap; word-break: break-all; }
.log-info { color: #ccc; }
.log-success { color: #4caf50; }
.log-error { color: #ef5350; }

.hint-list {
    font-size: 0.85rem;
    color: #888;
    margin: 0.5rem 0 0.75rem 1.5rem;
    line-height: 1.8;
}
.hint-list b { color: #aaa; }

.notice {
    background: #1a3a5c;
    color: #90caf9;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    line-height: 1.4;
}

.warning {
    background: #5d4037;
    color: #ffcc80;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}
