:root {
    --brand-blue: #007acc;
    --brand-blue-hover: #0062a3;
    --border-color: #e0e0e0;
}

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, sans-serif;
    margin: 2rem;
}

main {
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* horizontal centering of children */
    justify-content: flex-start;
    /* no vertical centering */
    text-align: center;
}

section {
    border: 1px solid var(--border-color);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    /* ensure borders/padding don't shrink content width */
}

/* After-upload state spacing */
#result {
    padding-bottom: 1rem;
    /* match top padding visually */
}

input,
button {
    font-size: 1rem;
    padding: 0.6rem;
    margin-right: 0.5rem;
}

button {
    background: var(--brand-blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: background 0.15s ease, transform 0.02s ease;
}

button:hover {
    background: var(--brand-blue-hover);
}

button:active {
    transform: translateY(1px);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

form {
    display: flex;
    flex-direction: column;
    /* stack input then button */
    gap: 0.75rem;
    align-items: center;
    /* center controls horizontally */
    justify-content: flex-start;
}

#uploader {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#uploader #uploadForm input[type="file"] {
    width: fit-content;
    /* don't stretch picker */
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
}

#uploadForm button {
    width: 180px;
    /* compact button */
}

#progress {
    min-height: 1.25rem;
}

#progress.success {
    color: #1a7f37;
    font-weight: 600;
}

#progress.error {
    color: #b42318;
    font-weight: 600;
}

/* Result area layout */
#result {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    /* full-width children */
    gap: 0.5rem;
}

#result input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem 0.75rem;
    margin: 0.75rem 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
}

a {
    word-break: break-all;
}

/* Branding */
.site-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    width: 100%;
}

.site-header .brand {
    font-size: 4.25rem;
    /* bigger logo text */
    font-weight: 800;
    color: var(--brand-blue);
    /* blue */
    user-select: none;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 2rem;
    text-align: center;
}

#sessionBar {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
