:root {
    color-scheme: light dark;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

body {
    margin: 0;
    min-height: 100vh;
}

/* Página principal */
.index-page {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 20%, #7dd3fc, #5e5c70 60%);
    color: #0f172a;
}

.index-page main {
    width: min(680px, 95vw);
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    border-radius: 18px;
    padding: 2.75rem;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.3);
}

.index-page h1 {
    margin-top: 0;
    font-size: clamp(1.9rem, 4vw, 2.6rem);
}

.index-page p.lead {
    margin-bottom: 2rem;
    color: #475569;
}

.index-page label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.index-page input[type="url"],
.index-page input[type="text"] {
    width: 100%;
    padding: 1.05rem 1.1rem;
    border-radius: 14px;
    border: 1px solid #cbd5f5;
    font-size: 1.05rem;
}

.index-page .modes {
    display: flex;
    gap: 1rem;
    margin: 1rem 0 0.5rem;
}

.index-page .modes label {
    background: #eef2ff;
    padding: 0.95rem 1rem;
    border-radius: 12px;
    flex: 1;
    text-align: center;
    cursor: pointer;
}

.index-page .modes input {
    margin-right: 0.5rem;
}

.index-page button {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1.05rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    background: #2563eb;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.index-page button:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 35px rgba(37, 99, 235, 0.35);
}

.index-page ul.tips {
    margin: 2rem 0 0;
    padding-left: 1.2rem;
    color: #475569;
}

.index-page .flash {
    background: #fee2e2;
    color: #b91c1c;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid #fecaca;
}

@media (max-width: 600px) {
    .index-page main {
        padding: 1.65rem;
    }
    .index-page .modes {
        flex-direction: column;
    }
}

/* Página de confirmación */
.download-page {
    font-family: "Inter", system-ui, sans-serif;
    min-height: 100vh;
    margin: 0;
    background: #0f172a;
    color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-page main {
    background: #1e293b;
    padding: 2.5rem;
    border-radius: 20px;
    width: min(520px, 90vw);
    text-align: center;
    box-shadow: 0 30px 50px rgba(15, 23, 42, 0.45);
}

.download-page h1 {
    margin: 0 0 0.5rem;
}

.download-page p {
    color: #cbd5f5;
}

.download-page .filename {
    font-family: "Fira Code", "SFMono-Regular", monospace;
    background: rgba(148, 163, 184, 0.15);
    padding: 0.6rem 1rem;
    border-radius: 10px;
    word-break: break-all;
}

.download-page .actions {
    margin-top: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.download-page a.button {
    text-decoration: none;
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    font-weight: 600;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.download-page a.primary {
    background: #22d3ee;
    color: #0f172a;
    box-shadow: 0 10px 25px rgba(34, 211, 238, 0.45);
}

.download-page a.secondary {
    background: transparent;
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.download-page a.button:hover {
    transform: translateY(-1px);
}
