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

:root {
    --bg: #080914;
    --panel: rgba(20, 22, 42, .88);
    --text: #f5f4ff;
    --muted: #aaa9c4;
    --purple: #9d7cff;
    --purple-light: #c8b8ff;
    --blue: #72b8ff;
    --border: rgba(255,255,255,.09);
}

body {
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 15% 10%, rgba(125,86,255,.17), transparent 30%),
        radial-gradient(circle at 85% 25%, rgba(70,140,255,.11), transparent 30%),
        var(--bg);

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

    overflow-x: hidden;
}

.stars {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;

    background-image:
        radial-gradient(circle, rgba(255,255,255,.8) 1px, transparent 1px),
        radial-gradient(circle, rgba(255,255,255,.45) 1px, transparent 1px);

    background-size: 110px 110px, 170px 170px;
    background-position: 10px 20px, 70px 80px;
    opacity: .2;
}

/* TOP BAR */

.topbar {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 28px;

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

    background: rgba(8,9,20,.78);
    backdrop-filter: blur(15px);

    position: sticky;
    top: 0;
    z-index: 20;
}

.back {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: .2s;
}

.back:hover {
    color: white;
    transform: translateX(-3px);
}

.brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);

    font-weight: 800;
}

.surprise-btn {
    border: 1px solid rgba(157,124,255,.35);
    background: rgba(157,124,255,.12);
    color: var(--purple-light);

    padding: 9px 15px;
    border-radius: 10px;

    font-weight: 700;
    cursor: pointer;
    transition: .2s;
}

.surprise-btn:hover {
    background: rgba(157,124,255,.22);
    transform: translateY(-2px);
}

/* MAIN */

main {
    width: min(1050px, calc(100% - 32px));
    margin: auto;
}

/* HERO */

.hero {
    text-align: center;
    padding: 75px 20px 45px;
}

.hero-icon {
    font-size: 56px;
    margin-bottom: 15px;

    filter: drop-shadow(0 0 20px rgba(157,124,255,.5));

    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.hero h1 {
    font-size: clamp(42px, 7vw, 72px);
    letter-spacing: -3px;
    line-height: 1;

    background: linear-gradient(
        120deg,
        #ffffff,
        #c7b7ff,
        #8fbfff
    );

    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;

    margin-bottom: 20px;
}

.hero p {
    max-width: 650px;
    margin: auto;

    color: var(--muted);
    line-height: 1.7;
    font-size: 17px;
}

/* CONTROLS */

.controls {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 12px;

    padding: 18px;

    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;

    backdrop-filter: blur(15px);
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

.control {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.control label {
    font-size: 12px;
    color: var(--muted);

    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .7px;
}

select {
    width: 100%;

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

    background: #111325;
    color: white;

    padding: 13px 14px;
    border-radius: 10px;

    font-size: 14px;
    cursor: pointer;
    outline: none;
}

select:focus {
    border-color: var(--purple);
}

.generate {
    align-self: end;

    border: none;

    background:
        linear-gradient(
            135deg,
            #8d6aff,
            #5d91ff
        );

    color: white;

    padding: 13px 20px;
    min-height: 45px;

    border-radius: 10px;

    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;

    transition: .2s;
}

.generate:hover {
    transform: translateY(-2px);
}

/* QUESTIONS */

.questions-section {
    margin-top: 65px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;

    margin-bottom: 20px;
}

.small-label {
    color: var(--purple-light);

    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.5px;
}

.section-heading h2 {
    font-size: 30px;
    margin-top: 4px;
}

.copy-btn {
    border: 1px solid var(--border);
    background: rgba(255,255,255,.05);

    color: #ddd;

    padding: 9px 14px;
    border-radius: 9px;

    cursor: pointer;
    transition: .2s;
}

.copy-btn:hover {
    background: rgba(255,255,255,.1);
}

.questions {
    display: grid;
    gap: 12px;
}

.question {
    display: flex;
    align-items: flex-start;
    gap: 17px;

    padding: 21px;

    border-radius: 15px;

    background:
        linear-gradient(
            135deg,
            rgba(30,32,58,.9),
            rgba(19,20,38,.9)
        );

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

    animation: questionIn .35s ease both;

    transition: .2s;
}

.question:hover {
    transform: translateX(4px);

    border-color: rgba(157,124,255,.3);
}

@keyframes questionIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.number {
    min-width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    border-radius: 10px;

    background: rgba(157,124,255,.13);
    color: var(--purple-light);

    font-weight: 900;
}

.question-text {
    font-size: 16px;
    line-height: 1.6;
    padding-top: 5px;
}

/* QUICK MOODS */

.quick-section {
    margin-top: 70px;
    margin-bottom: 70px;
}

.quick-section h2 {
    font-size: 25px;
    margin-bottom: 17px;
}

.moods {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.mood {
    border: 1px solid var(--border);

    background: rgba(255,255,255,.035);
    color: white;

    padding: 17px 8px;
    border-radius: 13px;

    cursor: pointer;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;

    transition: .2s;
}

.mood:first-letter {
    font-size: 25px;
}

.mood span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.mood:hover {
    transform: translateY(-4px);

    background: rgba(157,124,255,.1);
    border-color: rgba(157,124,255,.3);
}

/* FOOTER */

footer {
    text-align: center;

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

    padding: 28px;

    color: #66677d;

    font-size: 11px;
    letter-spacing: 1.5px;
    font-weight: 800;
}

/* TOAST */

.toast {
    position: fixed;

    bottom: 25px;
    left: 50%;

    transform: translate(-50%, 20px);

    background: #1e2035;
    border: 1px solid var(--border);

    padding: 12px 18px;
    border-radius: 10px;

    opacity: 0;
    pointer-events: none;

    transition: .3s;
    z-index: 50;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* MOBILE */

@media (max-width: 800px) {

    .controls {
        grid-template-columns: 1fr 1fr;
    }

    .generate {
        grid-column: 1 / -1;
    }

    .moods {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 550px) {

    .topbar {
        padding: 0 15px;
    }

    .brand {
        display: none;
    }

    .hero {
        padding-top: 50px;
    }

    .hero h1 {
        letter-spacing: -2px;
    }

    .controls {
        grid-template-columns: 1fr;
    }

    .generate {
        grid-column: auto;
    }

    .moods {
        grid-template-columns: repeat(2, 1fr);
    }

    .question {
        padding: 16px;
    }
}

/* =========================
   FAVORITES
========================= */

.favorites-btn {
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.05);
    color: white;
    padding: 9px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
}

.favorites-btn:hover {
    background: rgba(255,215,90,.1);
    border-color: rgba(255,215,90,.3);
}

#favoriteCount {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 20px;
    height: 20px;

    margin-left: 4px;

    padding: 0 5px;

    border-radius: 999px;

    background: #8b5cf6;

    font-size: 11px;
}

.favorites-panel {
    width: min(1100px, calc(100% - 40px));

    margin: 60px auto;

    padding: 25px;

    border: 1px solid rgba(255,255,255,.09);

    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            rgba(155,108,255,.09),
            rgba(255,95,200,.04)
        );
}

.favorites-panel.hidden {
    display: none;
}

.favorites-panel-header {
    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 20px;
}

.favorites-panel-header h2 {
    margin-top: 5px;
}

.favorites-panel-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.favorites-panel-actions button {
    border: 1px solid rgba(255,255,255,.1);

    background: rgba(255,255,255,.05);

    color: white;

    padding: 9px 12px;

    border-radius: 9px;

    cursor: pointer;
}

.favorites-panel-actions button:hover {
    background: rgba(255,255,255,.1);
}

.favorite-question {
    display: flex;

    align-items: center;

    gap: 14px;

    padding: 15px;

    margin-bottom: 9px;

    border: 1px solid rgba(255,255,255,.08);

    border-radius: 12px;

    background: rgba(255,255,255,.035);
}

.favorite-question-text {
    flex: 1;

    line-height: 1.5;
}

.remove-favorite {
    width: 35px;
    height: 35px;

    flex-shrink: 0;

    border: 0;

    border-radius: 9px;

    background: rgba(255,80,130,.08);

    color: #ff7ebd;

    cursor: pointer;

    font-size: 17px;
}

.remove-favorite:hover {
    background: rgba(255,80,130,.18);
}

.no-favorites {
    text-align: center;

    padding: 50px 20px;

    color: #aaa6b8;
}

.no-favorites div {
    font-size: 45px;

    color: #ffd75e;

    margin-bottom: 10px;
}

.no-favorites h3 {
    color: white;

    margin-bottom: 7px;
}

@media (max-width: 700px) {

    .favorites-panel {
        width: calc(100% - 24px);

        padding: 17px;
    }

    .favorites-panel-header {
        align-items: flex-start;

        flex-direction: column;
    }

    .favorite-question {
        align-items: flex-start;
    }
}

/* FAVORITE STAR */

.question-card {
    position: relative;
}

.favorite-star {
    position: absolute;
    top: 14px;
    right: 14px;

    width: 38px;
    height: 38px;

    border: 0;
    border-radius: 10px;

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

    color: #aaa;

    font-size: 22px;

    cursor: pointer;

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

    transition: 0.2s ease;
}

.favorite-star:hover {
    transform: scale(1.12);
    color: #ffd84d;
    background: rgba(255, 216, 77, 0.15);
}

.question-card .question-text {
    padding-right: 55px;
}


/* FAVORITES LIST */

.favorite-question {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px 16px;
    margin-bottom: 10px;

    border-radius: 14px;

    background: rgba(255, 255, 255, 0.06);
}

.favorite-question-text {
    flex: 1;
    line-height: 1.5;
}

.remove-favorite {
    border: 0;
    background: transparent;

    color: #aaa;

    cursor: pointer;
    font-size: 16px;
}

.remove-favorite:hover {
    color: #ff6b6b;
}