* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --background: #08090d;
    --surface: #11131a;
    --surface-light: #181b24;
    --border: rgba(255, 255, 255, 0.1);
    --text: #f5f5f7;
    --muted: #9699a6;
    --accent: #c8a6ff;
    --accent-light: #dfd0ff;
}

body {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(145, 90, 255, 0.15),
            transparent 35%
        ),
        var(--background);

    color: var(--text);

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}


/* HEADER */

.header {
    width: 100%;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 28px 6%;

    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.logo span {
    color: var(--accent);
}

.company {
    color: var(--muted);
    font-size: 0.8rem;
}


/* MAIN */

main {
    width: min(1050px, 90%);
    margin: auto;
}


/* HERO */

.hero {
    text-align: center;

    padding:
        100px
        0
        70px;
}

.eyebrow {
    color: var(--accent);

    font-size: 0.72rem;
    font-weight: 700;

    letter-spacing: 0.18em;
    text-transform: uppercase;

    margin-bottom: 18px;
}

.hero h1 {
    font-size: clamp(3rem, 7vw, 6rem);

    line-height: 0.95;

    letter-spacing: -0.07em;

    margin-bottom: 28px;
}

.subtitle {
    max-width: 600px;

    margin: auto;

    color: var(--muted);

    font-size: 1.05rem;
    line-height: 1.7;
}


/* UPLOAD */

.upload-box {
    width: min(650px, 100%);

    margin: 55px auto 25px;

    padding: 60px 30px;

    border:
        1px dashed
        rgba(255, 255, 255, 0.2);

    border-radius: 28px;

    background:
        rgba(255, 255, 255, 0.025);

    transition:
        border-color 0.2s,
        background 0.2s;
}

.upload-box.dragging {
    border-color: var(--accent);

    background:
        rgba(200, 166, 255, 0.08);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.upload-box h2 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.upload-box p {
    color: var(--muted);
    margin-bottom: 25px;
}

.upload-button {
    display: inline-block;

    padding: 12px 22px;

    border-radius: 12px;

    background: var(--text);
    color: #08090d;

    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.2s,
        opacity 0.2s;
}

.upload-button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

#fileName {
    margin-top: 18px;

    color: var(--accent-light);

    font-size: 0.9rem;
}


/* BUTTON */

.analyze-button,
#tryAgain {
    border: none;

    border-radius: 14px;

    padding: 15px 28px;

    font-size: 0.95rem;
    font-weight: 700;

    cursor: pointer;

    background: var(--accent);
    color: #100b18;

    transition:
        transform 0.2s,
        opacity 0.2s;
}

.analyze-button:hover:not(:disabled),
#tryAgain:hover {
    transform: translateY(-2px);
}

.analyze-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}


/* LOADING */

.loading {
    text-align: center;
    padding: 100px 0;
}

.loader {
    width: 42px;
    height: 42px;

    margin: 0 auto 25px;

    border:
        3px solid
        rgba(255, 255, 255, 0.1);

    border-top-color: var(--accent);

    border-radius: 50%;

    animation:
        spin 0.8s linear infinite;
}

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

.loading h2 {
    margin-bottom: 10px;
}

.loading p {
    color: var(--muted);
}


/* RESULT */

.result {
    padding: 50px 0 100px;
}

.book-card {
    display: grid;

    grid-template-columns:
        minmax(180px, 280px)
        1fr;

    gap: 45px;

    padding: 35px;

    background: var(--surface);

    border:
        1px solid
        var(--border);

    border-radius: 28px;
}

.book-card img {
    width: 100%;

    max-height: 390px;

    object-fit: contain;

    border-radius: 12px;
}

.book-info {
    align-self: center;
}

.book-info h2 {
    font-size: 2.5rem;

    letter-spacing: -0.04em;

    margin-bottom: 10px;
}

#bookAuthor {
    color: var(--accent-light);

    font-size: 1.05rem;

    margin-bottom: 25px;
}

#bookDescription {
    color: var(--muted);

    line-height: 1.8;
}


/* VIBE */

.vibe-card {
    margin-top: 25px;

    padding: 35px;

    background: var(--surface);

    border:
        1px solid
        var(--border);

    border-radius: 28px;
}

.vibe-card h2 {
    font-size: 2rem;

    margin-bottom: 15px;
}

.vibe-card p {
    color: var(--muted);

    line-height: 1.7;
}

.tags {
    display: flex;
    flex-wrap: wrap;

    gap: 10px;

    margin-top: 25px;
}

.tag {
    padding: 8px 14px;

    border-radius: 100px;

    background: var(--surface-light);

    border:
        1px solid
        var(--border);

    color: var(--accent-light);

    font-size: 0.8rem;
}


/* COMING SOON */

.coming-soon {
    display: flex;
    align-items: center;
    gap: 20px;

    margin-top: 25px;

    padding: 28px 32px;

    border-radius: 22px;

    background:
        linear-gradient(
            135deg,
            rgba(200, 166, 255, 0.12),
            rgba(255, 255, 255, 0.03)
        );

    border:
        1px solid
        rgba(200, 166, 255, 0.2);
}

.coming-soon > span {
    font-size: 2.2rem;
}

.coming-soon h2 {
    margin-bottom: 6px;
}

.coming-soon p {
    color: var(--muted);
}


/* ERROR */

.error {
    text-align: center;

    padding: 100px 0;
}

.error h2 {
    margin-bottom: 10px;
}

.error p {
    color: var(--muted);

    margin-bottom: 25px;
}


/* FOOTER */

footer {
    text-align: center;

    padding: 40px;

    color: var(--muted);

    font-size: 0.75rem;

    border-top: 1px solid var(--border);
}


/* UTILITY */

.hidden {
    display: none !important;
}


/* MOBILE */

@media (max-width: 700px) {

    .header {
        padding: 22px 5%;
    }

    .company {
        display: none;
    }

    .hero {
        padding-top: 70px;
    }

    .hero h1 {
        font-size: 3.3rem;
    }

    .book-card {
        grid-template-columns: 1fr;

        padding: 25px;
    }

    .book-card img {
        max-height: 350px;
    }

    .book-info h2 {
        font-size: 2rem;
    }

}