:root {
    --bg: #1f1108;
    --bg-soft: #29160e;
    --panel: rgba(42, 24, 14, 0.94);
    --panel-strong: #2f1c12;
    --text: #f7e3c3;
    --text-muted: #c7a372;
    --accent: #ff8a26;
    --accent-strong: #f5ba3a;
    --border: rgba(255, 138, 38, 0.25);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top, rgba(255, 138, 38, 0.12), transparent 24%),
                linear-gradient(180deg, #1f1108 0%, #140b06 48%, #090504 100%);
    background-attachment: fixed;
}

.page-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 32px 24px;
    gap: 24px;
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
    max-width: 960px;
    margin: 0 auto;
}

.hero-headline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 24px;
    max-width: 1000px;
}

.brand-logo {
    width: 720px;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.35));
}

.hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.eyebrow {
    margin: 0;
    color: var(--accent-strong);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.88rem;
    font-weight: 700;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 1.05;
    color: #fff;
    letter-spacing: -0.04em;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
}

.feature-card {
    background: rgba(255, 138, 38, 0.12);
    border: 1px solid rgba(255, 138, 38, 0.18);
    color: var(--text);
    padding: 14px 18px;
    border-radius: 16px;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
    min-width: 180px;
}

.hero-copy {
    margin: 0;
    font-size: clamp(1rem, 1.1vw + 0.8rem, 1.5rem);
    color: var(--text-muted);
    line-height: 1.65;
    max-width: 780px;
}

.alert-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 10px;
    max-width: 760px;
    margin: 0 auto;
    padding: 12px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 138, 38, 0.18);
    color: var(--text);
    font-weight: 500;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.alert-banner span {
    display: block;
    max-width: 680px;
}

.alert-banner i {
    font-size: 0.95rem;
}

.status-panel {
    padding: 14px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-size: 0.98rem;
    min-height: 50px;
    display: flex;
    align-items: center;
}

.console-panel {
    display: grid;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 18px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.console-header {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

.console-feed {
    max-height: 180px;
    overflow-y: auto;
    padding-right: 6px;
    display: grid;
    gap: 8px;
}

.console-feed p {
    margin: 0;
    font-size: 0.88rem;
    color: rgba(247, 227, 195, 0.88);
    line-height: 1.4;
}

.console-feed p.info {
    color: rgba(247, 227, 195, 0.88);
}

.console-feed p.error {
    color: #ffb3a2;
}

.console-panel.hidden {
    display: none;
}

.button-spinner {
    width: 18px;
    height: 18px;
    margin-left: 10px;
    border: 2px solid rgba(27, 9, 3, 0.2);
    border-top-color: rgba(27, 9, 3, 0.9);
    border-radius: 50%;
    animation: spin 0.85s linear infinite;
}

.button-spinner.hidden {
    display: none;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.upload-card.file-ready {
    animation: pulse 2.5s ease-in-out infinite alternate;
    border-color: rgba(255, 138, 38, 0.35);
}

.upload-section {
    display: flex;
    justify-content: center;
}

.upload-card {
    width: min(760px, 100%);
    padding: 32px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(31,17,8,0.95), rgba(36,20,12,0.95));
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: grid;
    gap: 18px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.upload-card.file-ready {
    animation: pulse 2.5s ease-in-out infinite alternate;
    border-color: rgba(255, 138, 38, 0.35);
}

.upload-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: max-content;
    padding: 14px 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #1b0903;
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.upload-button:hover,
.convert-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(255, 138, 38, 0.24);
}

#file {
    display: none;
}

.file-label {
    color: var(--text);
    font-size: 0.98rem;
    flex: 1 1 100%;
    min-width: 240px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.hint {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.64);
}

.preview-panel {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-label {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
}

.preview-panel img {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
}

.textin {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.textin:focus,
.textin:active,
select:focus,
select:active {
    border-color: rgba(255, 138, 38, 0.65);
    background: rgba(255, 255, 255, 0.08);
}

select.textin {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.6) 50%),
                      linear-gradient(135deg, rgba(255,255,255,0.6) 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(50% - 3px), calc(100% - 13px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 40px;
}

.convert-btn {
    width: 100%;
    padding: 16px 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #1b0903;
    border: none;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.convert-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(0.4);
    transform: none;
    box-shadow: none;
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 960px;
    margin: 0 auto;
    padding: 18px 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    font-size: 0.98rem;
}

.ko-fi {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    padding: 12px 18px;
    border-radius: 999px;
    background: rgba(255, 138, 38, 0.12);
    border: 1px solid rgba(255, 138, 38, 0.2);
}

.ko-fi:hover {
    background: rgba(255, 138, 38, 0.18);
}

.hidden {
    display: none !important;
}

@keyframes pulse {
    from {
        transform: translateY(0);
        box-shadow: 0 20px 55px rgba(255, 138, 38, 0.18);
    }
    to {
        transform: translateY(-2px);
        box-shadow: 0 30px 70px rgba(255, 138, 38, 0.28);
    }
}

@media (max-width: 768px) {
    .page-shell {
        padding: 24px 18px;
    }

    .upload-card {
        padding: 24px;
    }

    .upload-top {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .hero-copy {
        font-size: 1rem;
    }

    .convert-btn,
    .upload-button {
        width: 100%;
    }
}

