/* =========================================================
   MOODMATE — CLEAN MODERN THEME
   Replace your OLD style.css with this entire file.
   No extra logo/header CSS is needed.
========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    font-family: "Segoe UI", Inter, Arial, sans-serif;
    color: #f7f5ff;
    background:
        radial-gradient(circle at 12% 8%, rgba(124, 92, 246, .16), transparent 30%),
        radial-gradient(circle at 88% 18%, rgba(220, 72, 150, .10), transparent 28%),
        #090912;
    line-height: 1.5;
}

button {
    font: inherit;
}

button:focus-visible {
    outline: 2px solid #b9a4ff;
    outline-offset: 3px;
}

video {
    display: block;
    max-width: 100%;
}


/* =========================================================
   HEADER
========================================================= */

.navbar {
    position: sticky;
    top: 0;
    z-index: 50;

    width: 100%;
    min-height: 70px;
    padding: 0 6vw;

    display: flex;
    align-items: center;
    gap: 14px;

    background: #0a0a12;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.logo {
    color: #f5f2ff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.5px;
    white-space: nowrap;
}

.logo-subtitle {
    color: #8f8b9d;
    font-size: 13px;
    white-space: nowrap;
}


/* =========================================================
   MAIN
========================================================= */

.container {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 62px 0 80px;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    max-width: 760px;
    margin: 0 auto 55px;
    text-align: center;
}

.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 13px;
    padding: 6px 12px;

    border: 1px solid rgba(157,126,255,.24);
    border-radius: 999px;

    background: rgba(123,92,246,.07);
    color: #bca9ff;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.7px;
}

.hero h1 {
    font-size: clamp(48px, 7vw, 78px);
    line-height: .98;
    letter-spacing: -3.5px;
    color: #eeeaff;
}

.hero h1 span {
    display: inline-block;
    color: #9b68e9;
}

.hero-text {
    max-width: 610px;
    margin: 22px auto 0;
    color: #918d9f;
    font-size: 15px;
}


/* =========================================================
   CAMERA
========================================================= */

.camera-section {
    margin-bottom: 52px;
}

.camera-card {
    width: min(820px, 100%);
    margin: 0 auto;
}

.camera-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;

    border: 1px solid rgba(255,255,255,.09);
    border-radius: 24px;

    background: #0d0d16;
    box-shadow: 0 24px 65px rgba(0,0,0,.30);
}

.camera-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.camera-message {
    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;

    background: #0d0d16;
}

.camera-icon {
    width: 64px;
    height: 64px;

    display: grid;
    place-items: center;

    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    background: #151521;

    font-size: 28px;
}

.camera-message p {
    color: #8f8b9d;
    font-size: 14px;
}

.camera-controls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.primary-btn,
.secondary-btn {
    min-width: 190px;
    padding: 13px 20px;

    border-radius: 13px;
    cursor: pointer;

    font-size: 13px;
    font-weight: 750;

    transition:
        transform .18s ease,
        background .18s ease,
        border-color .18s ease;
}

.primary-btn {
    border: 0;
    color: #fff;
    background: #7652d9;
    box-shadow: 0 10px 28px rgba(118,82,217,.22);
}

.primary-btn:hover:not(:disabled) {
    background: #8461e5;
    transform: translateY(-2px);
}

.secondary-btn {
    border: 1px solid rgba(255,255,255,.10);
    color: #eeeaff;
    background: #151520;
}

.secondary-btn:hover:not(:disabled) {
    background: #1b1a27;
    border-color: rgba(173,148,255,.25);
    transform: translateY(-2px);
}

.primary-btn:disabled,
.secondary-btn:disabled {
    opacity: .42;
    cursor: not-allowed;
    transform: none;
}


/* =========================================================
   CURRENT MOOD
========================================================= */

.mood-result {
    width: min(820px, 100%);
    margin: 0 auto 65px;
    padding: 32px 25px;

    text-align: center;

    border: 1px solid rgba(255,255,255,.08);
    border-radius: 22px;
    background: #10101a;
    box-shadow: 0 18px 50px rgba(0,0,0,.20);
}

.mood-result h2 {
    margin-bottom: 7px;
    color: #f1edff;
    font-size: clamp(27px, 4vw, 40px);
    letter-spacing: -1px;
}

.mood-result > p:not(.tag) {
    color: #8f8b9d;
    font-size: 14px;
}

.confidence {
    width: min(500px, 100%);
    margin: 25px auto 0;
}

.confidence-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
}

.confidence-header span {
    color: #777385;
}

.confidence-header strong {
    color: #bdaaff;
}

.confidence-track,
.emotion-track {
    overflow: hidden;
    height: 7px;
    border-radius: 99px;
    background: #1c1b26;
}

.confidence-fill,
.emotion-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #8b67e6;
    transition: width .45s ease;
}


/* =========================================================
   SECTIONS
========================================================= */

.section-heading {
    margin-bottom: 22px;
}

.section-heading h2 {
    color: #eeeaff;
    font-size: clamp(26px, 4vw, 36px);
    letter-spacing: -1px;
}


/* =========================================================
   EMOTION ANALYSIS
========================================================= */

.emotion-section {
    margin-bottom: 65px;
}

.emotion-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.emotion-item {
    min-width: 0;
    padding: 17px;

    border: 1px solid rgba(255,255,255,.065);
    border-radius: 15px;
    background: #11111b;
}

.emotion-info {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;

    color: #aaa5b6;
    font-size: 13px;
}

.emotion-info strong {
    color: #bca9ff;
}


/* =========================================================
   RECOMMENDATIONS
========================================================= */

.recommendations {
    margin-bottom: 52px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
    align-items: stretch;
}

.card {
    min-width: 0;
    min-height: 310px;

    display: flex;
    flex-direction: column;

    padding: 24px;

    border: 1px solid rgba(255,255,255,.08);
    border-radius: 20px;

    background: #11111b;
    box-shadow: 0 15px 45px rgba(0,0,0,.16);

    transition:
        transform .2s ease,
        border-color .2s ease,
        background .2s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(169,142,255,.22);
    background: #14131f;
}

.card-icon {
    width: 54px;
    height: 54px;

    display: grid;
    place-items: center;

    margin-bottom: 20px;

    border: 1px solid rgba(255,255,255,.07);
    border-radius: 16px;

    background: #191823;
    font-size: 26px;
}

.card-label {
    margin-bottom: 5px;
    color: #a992e9;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.4px;
}

.card h3 {
    margin-bottom: 11px;
    color: #f0ecfb;
    font-size: 21px;
}

.recommendation-text {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #9994a7;
    font-size: 14px;
    line-height: 1.7;
}

.explore-btn {
    width: 100%;
    margin-top: auto;
    padding: 11px 14px;

    border: 1px solid rgba(255,255,255,.08);
    border-radius: 11px;

    color: #d6cef0;
    background: #181722;

    cursor: pointer;
    font-size: 12px;
    font-weight: 700;

    transition:
        background .18s ease,
        border-color .18s ease;
}

.explore-btn:hover {
    background: #201d2e;
    border-color: rgba(169,142,255,.22);
}


/* =========================================================
   MOOD JOURNEY
========================================================= */

.mood-journey {
    width: 100%;
    min-width: 0;

    padding: 27px;

    border: 1px solid rgba(255,255,255,.08);
    border-radius: 22px;

    background: #10101a;
    box-shadow: 0 18px 55px rgba(0,0,0,.18);
}

.journey-header {
    margin-bottom: 18px;
}

.journey-header h2 {
    margin-bottom: 4px;
    color: #eeeaff;
    font-size: clamp(25px, 4vw, 32px);
    letter-spacing: -1px;
}

.journey-header p:last-child {
    color: #858091;
    font-size: 13px;
}

.journey-chart {
    min-width: 0;
    overflow: hidden;
}

.journey-line {
    position: relative;

    display: flex;
    align-items: center;
    gap: 12px;

    min-height: 90px;
    padding: 14px 8px;

    overflow-x: auto;
    scrollbar-width: thin;
}

.journey-line::before {
    content: "";
    position: absolute;
    left: 25px;
    right: 25px;
    top: 50%;
    height: 1px;
    background: #302c3c;
}

.mood-point {
    position: relative;
    z-index: 1;

    flex: 0 0 48px;
    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    border: 2px solid #10101a;
    border-radius: 50%;

    background: #7652d9;
    box-shadow: 0 7px 20px rgba(118,82,217,.20);

    font-size: 21px;
}

.journey-axis {
    display: flex;
    justify-content: space-between;
    padding: 0 8px;
    color: #686474;
    font-size: 10px;
}

.journey-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.journey-stat {
    min-width: 0;
    padding: 15px;

    border: 1px solid rgba(255,255,255,.06);
    border-radius: 14px;
    background: #14141e;
}

.journey-stat span {
    display: block;
    margin-bottom: 5px;
    color: #706c7a;
    font-size: 10px;
}

.journey-stat strong {
    display: block;
    overflow-wrap: anywhere;
    color: #cfc5ee;
    font-size: 15px;
}


/* =========================================================
   FOOTER
========================================================= */

footer {
    padding: 30px 20px;
    border-top: 1px solid rgba(255,255,255,.06);
    text-align: center;
    color: #666271;
    font-size: 11px;
}

footer p + p {
    margin-top: 4px;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {
    .container {
        width: min(100% - 30px, 760px);
        padding-top: 48px;
    }

    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card:last-child {
        grid-column: 1 / -1;
        width: calc(50% - 9px);
        justify-self: center;
    }

    .journey-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {
    .navbar {
        min-height: 64px;
        padding: 0 16px;
    }

    .logo {
        font-size: 20px;
    }

    .logo-subtitle {
        display: none;
    }

    .container {
        width: min(100% - 24px, 520px);
        padding-top: 38px;
        padding-bottom: 55px;
    }

    .hero {
        margin-bottom: 40px;
    }

    .hero h1 {
        font-size: clamp(43px, 14vw, 62px);
        letter-spacing: -2.5px;
    }

    .hero-text {
        font-size: 13px;
    }

    .camera-container {
        border-radius: 18px;
    }

    .camera-controls {
        flex-direction: column;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
    }

    .mood-result {
        padding: 27px 18px;
    }

    .emotion-grid,
    .cards,
    .journey-stats {
        grid-template-columns: 1fr;
    }

    .card:last-child {
        grid-column: auto;
        width: 100%;
    }

    .card {
        min-height: 285px;
    }

    .mood-journey {
        padding: 20px;
    }
}


/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 380px) {
    .container {
        width: calc(100% - 18px);
    }

    .hero h1 {
        font-size: 40px;
    }

    .mood-journey {
        padding: 17px;
    }
}