/* CW Rust Remover - style.css */

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

:root {
    --bg:       #1a1a1a;
    --surface:  #242424;
    --border:   #3a3a3a;
    --text:     #e0e0e0;
    --muted:    #888;
    --accent:   #4a9eff;
    --accent-h: #6ab4ff;
    --error-bg: #3a1a1a;
    --error:    #ff6b6b;
    --success:  #4a9eff;
    --radius:   6px;
    --max-w:    640px;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    min-height: 100vh;
}

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 2rem 1.25rem;
}

/* Header */
header { text-align: center; margin-bottom: 2.5rem; }
header h1 { font-size: 2rem; font-weight: 700; letter-spacing: -0.5px; }
header .tagline { color: var(--muted); margin-top: 0.35rem; font-size: 0.95rem; }

/* Sections */
.section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}
.section h2 {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1rem;
}

/* Fields */
.fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
}
.field .hint { font-size: 0.78rem; color: var(--muted); }

input[type="text"],
select {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
    width: 100%;
    transition: border-color 0.15s;
}
input[type="text"]:focus,
select:focus {
    border-color: var(--accent);
    outline: none;
}
select { cursor: pointer; }

/* Privacy notice */
.privacy-notice {
    font-size: 0.8rem;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}
.privacy-notice strong { color: var(--text); }

/* Actions */
.actions { display: flex; justify-content: center; }
button[type="submit"] {
    background: var(--accent);
    border: none;
    border-radius: var(--radius);
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.75rem 2.5rem;
    transition: background 0.15s;
    width: 100%;
}
button[type="submit"]:hover { background: var(--accent-h); }
button[type="submit"]:disabled { opacity: 0.5; cursor: not-allowed; }

/* Status / spinner */
.status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3rem 0;
    color: var(--muted);
    font-size: 1rem;
}
.spinner {
    width: 28px; height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Player */
.player {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
}
.player h2 {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1rem;
}
audio {
    width: 100%;
    margin-bottom: 1rem;
    accent-color: var(--accent);
}
.player-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}
.download-btn {
    background: transparent;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    color: var(--accent);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.download-btn:hover { background: var(--accent); color: #fff; }
.new-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--muted);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: border-color 0.15s, color 0.15s;
}
.new-btn:hover { border-color: var(--text); color: var(--text); }

/* Error */
.error {
    background: var(--error-bg);
    border: 1px solid var(--error);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    text-align: center;
}
.error p { color: var(--error); margin-bottom: 1rem; }
.error button {
    background: transparent;
    border: 1px solid var(--error);
    border-radius: var(--radius);
    color: var(--error);
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0.4rem 1.25rem;
    transition: background 0.15s, color 0.15s;
}
.error button:hover { background: var(--error); color: #fff; }

/* Footer */
footer {
    text-align: center;
    margin-top: 3rem;
    color: var(--muted);
    font-size: 0.8rem;
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

/* Responsive */
@media (max-width: 480px) {
    .fields { grid-template-columns: 1fr; }
    header h1 { font-size: 1.5rem; }
}
