:root {
    --bg: #f6f7fb;
    --card: #ffffff;
    --accent: #4f46e5;
    --muted: #6b7280
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f8fafc 0%, var(--bg) 100%);
    padding: 24px
}

.container {
    width: 100%;
    max-width: 980px;
    background: var(--card);
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
    padding: 24px
}

.header {
    display: flex;
    align-items: center;
    gap: 16px
}

.logo {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent), #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700
}

h1 {
    margin: 0;
    font-size: 1.25rem
}

p.lead {
    margin: 6px 0 18px;
    color: var(--muted)
}

.grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px
}

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

    .side {
        order: 2
    }
}

.dropzone {
    border: 2px dashed rgba(99, 102, 241, 0.25);
    border-radius: 10px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all .15s
}

.dropzone.hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.04), rgba(6, 182, 212, 0.02));
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.06)
}

#coverPreview.hover {
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    border-color: rgba(99, 102, 241, 0.35)
}

.dropzone .title {
    font-weight: 600;
    color: #111827
}

.dropzone .muted {
    color: var(--muted);
    font-size: 0.9rem
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 12px
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px
}

label {
    font-size: 0.85rem;
    color: var(--muted)
}

input[type=text] {
    padding: 10px;
    border: 1px solid #e6e9ef;
    border-radius: 8px
}

.small-input {
    display: flex;
    gap: 8px;
    align-items: center
}

button#convert {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer
}

.file-meta {
    font-size: 0.9rem;
    color: var(--muted)
}

.side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch
}

input[type=file] {
    display: none
}

.hint {
    font-size: 0.85rem;
    color: var(--muted)
}

.status {
    font-size: 0.9rem;
    color: var(--muted)
}

/* toast (fixed, does not affect layout) */
.toast-container {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 8px
}

.toast {
    background: rgba(15, 23, 42, 0.92);
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.4);
    font-size: 0.95rem;
    opacity: 0;
    transform: translateY(8px);
    transition: all .22s ease
}

.toast.show {
    opacity: 1;
    transform: translateY(0)
}

/* make cover preview slightly larger on wider screens */
@media (min-width:900px) {
    #coverPreview {
        width: 180px;
        height: 240px
    }
}