:root {
    color-scheme: light dark;
    --bg: #14161a;
    --panel: #1d2026;
    --border: #2c303a;
    --text: #e8e8ec;
    --muted: #9a9fab;
    --accent: #f5f5f5;
    --accent-text: #0b0e14;
    --danger: #ff8080;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Quicksand", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background:
        linear-gradient(rgba(10, 11, 15, 0.6), rgba(10, 11, 15, 0.8)),
        url("img/bg.jpeg") center / cover no-repeat fixed;
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    justify-content: center;
    padding: 2.5rem 1rem;
    min-height: 100vh;
}

main {
    width: 100%;
    max-width: 920px;
}

.logo-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.5rem 0 2rem;
    position: relative;
    left: -5px;
}

.logo-mark {
    height: 42px;
    width: auto;
}

.logo-text {
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text);
    position: relative;
    top: 5px;
}

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

.subtitle {
    color: var(--muted);
    margin-top: 0;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.subtitle:last-of-type {
    margin-bottom: 1.75rem;
}

.subtitle a {
    color: var(--accent);
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 760px) {
    .steps {
        grid-template-columns: 1fr;
    }
}

.step {
    background: rgba(29, 32, 38, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    min-height: 220px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.step-number {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-text);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.9rem;
}

.step h2 {
    font-size: 1.05rem;
    margin: 0 0 0.9rem;
    color: var(--text);
}

.hint {
    color: var(--muted);
    font-weight: normal;
    font-size: 0.8rem;
    margin: 0.5rem 0 0;
}

.step-input {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border-radius: 5px;
    border: 1px solid var(--border);
    background: #12141a;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
}

.dropzone {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.35rem;
    border: 2px dashed var(--border);
    border-radius: 6px;
    padding: 1.25rem 1rem;
    cursor: pointer;
    background: #12141a;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone:hover,
.dropzone:focus-visible {
    border-color: var(--accent);
    outline: none;
}

.dropzone.dragover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
}

.dropzone-text {
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
}

.dropzone-sub {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.selection-summary {
    margin: 0.5rem 0 0;
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    word-break: break-word;
}

button {
    background: var(--accent);
    color: var(--accent-text);
    border: none;
    border-radius: 5px;
    padding: 0.65rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
}

button:disabled {
    opacity: 0.6;
    cursor: default;
}

button:hover:not(:disabled) {
    filter: brightness(1.08);
}

#convertBtn {
    width: 100%;
}

.spinner {
    width: 1em;
    height: 1em;
    border: 2px solid rgba(11, 14, 20, 0.3);
    border-top-color: var(--accent-text);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

#convertBtn.processing #convertBtnLabel {
    animation: processingPulse 1.1s ease-in-out infinite;
}

@keyframes processingPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.55;
    }
}

#downloadLink {
    display: none;
}

.status-message {
    margin: 0.6rem 0 0;
    min-height: 1.1em;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--danger);
    text-align: center;
}
