@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

/* LIGHT THEME CSS */

:root {
    /* Light theme: warm pink background, purple text */
    --bg-dark: #faf8fc;
    --bg-light: #fcf7fa;
    --primary: #6d28d9;
    --primary-2: #5b21b6;
    --primary-light: #a78bfa;
    --mint: #10b981;
    --card: #ffffff;
    --card-2: #f3e8ff;
    --text: #5b21b6;
    --text-light: #7c3aed;
    --text-invert: #ffffff;
    --muted: #8b5cf6;
    --stroke: #e9d5ff;
    --danger: #dc2626;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --container: 1120px;
    --gutter: 24px;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: Manrope, system-ui, -apple-system, Segoe UI, Arial, sans-serif;
    color: var(--text);
    background: var(--bg-light);
    line-height: 1.6;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
}


/* Layout */

.page {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}

.page--dark {
    background: var(--bg-dark);
    color: var(--text);
}

.page--light {
    background: var(--bg-light);
    color: var(--text);
}

.container {
    width: min(100% - (var(--gutter) * 2), var(--container));
    margin: 0 auto;
}

.topbar {
    padding: 24px 0 8px;
}

.topbar__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.back-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--stroke);
    background: var(--card);
    color: var(--text);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: var(--card-2);
    border-color: var(--primary);
}

.back-btn--light {
    border-color: var(--stroke);
    color: var(--text);
    background: var(--card);
}

.logo {
    width: 64px;
    height: 48px;
    object-fit: contain;
}

.logo--lg {
    width: 140px;
    height: 104px;
}

.hero {
    padding: 40px 0 24px;
}

.hero__title {
    font-size: clamp(28px, 4vw, 44px);
    margin: 0 0 12px;
    font-weight: 800;
}

.hero__lead {
    margin: 0;
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.6;
}

.card {
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 18px;
}

.card--soft {
    background: var(--card-2);
}

.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--1 {
    grid-template-columns: 1fr;
}

.section {
    padding: 18px 0 28px;
}

.section__title {
    margin: 0 0 12px;
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
}

.section__subtitle {
    margin: 0 0 18px;
    color: var(--text-light);
    font-weight: 500;
}


/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, background .2s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn--primary {
    background: var(--primary);
    color: var(--text-invert);
    font-weight: 700;
}

.btn--primary:hover {
    background: var(--primary-2);
    transform: translateY(-2px);
}

.btn--outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn--outline-light {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn--dark {
    background: #111;
    color: #fff;
    border-color: #111;
}

.btn--full {
    width: 100%;
}


/* Theme toggle */

.theme-toggle {
    display: inline-grid;
    align-items: center;
    justify-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--stroke);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    margin-left: 12px;
    font-size: 16px;
}

.theme-toggle:hover {
    transform: translateY(-1px)
}

.input,
.select {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--stroke);
    background: var(--card);
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input::placeholder,
.select {
    color: var(--muted);
}

.input:focus,
.select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.1);
    box-shadow: 0 0 0 3px rgba(90, 59, 99, .12);
}

.field {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.field label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.form-card {
    max-width: 560px;
    margin: 0 auto;
}

.list {
    display: grid;
    gap: 12px;
}

.list-item {
    padding: 14px;
    border-radius: var(--radius-md);
    background: var(--card-2);
}

.badge {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--primary-light);
    color: var(--text-invert);
    font-size: 12px;
    font-weight: 700;
}

.nav-icons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-icons a {
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--card-2);
    color: var(--text);
    font-size: 13px;
}

.splash {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 0;
}

.splash__title {
    font-size: clamp(36px, 6vw, 58px);
    margin: 12px 0 6px;
    color: var(--primary);
    font-weight: 800;
    letter-spacing: 2px;
}

.splash__sub {
    margin: 0;
    color: var(--text-light);
    letter-spacing: .5px;
}

.option-list {
    display: grid;
    gap: 10px;
}

.option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--stroke);
    background: #fff;
    cursor: pointer;
}

.option input {
    accent-color: var(--primary);
}

.dropdown-wrap {
    position: relative;
}

.home-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: #eee;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.points-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--card);
    color: var(--text);
}

.event-card {
    background: var(--card-2);
    border-radius: var(--radius-md);
    padding: 14px;
    color: var(--text);
    border: 1px solid var(--stroke);
}

.news-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 16px;
    color: var(--text);
}

.news-card img {
    border-radius: var(--radius-md);
    width: 100%;
    height: 180px;
    object-fit: cover;
    margin: 12px 0;
}

.map-box {
    border-radius: var(--radius-lg);
    background: var(--card);
    padding: 16px;
    position: relative;
    overflow: hidden;
    min-height: 260px;
    color: var(--text);
}

.map-marker {
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #E7A9C6;
    border: 4px solid #fff;
    box-shadow: var(--shadow);
}

.chat {
    background: var(--card);
    color: var(--text);
}

.chat__bubble {
    max-width: 70%;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--card-2);
    color: var(--text);
}

.chat__bubble--user {
    margin-left: auto;
    background: var(--primary-light);
    color: var(--text-invert);
}

.chat__input {
    display: flex;
    gap: 10px;
}

.profile-header {
    display: grid;
    place-items: center;
    text-align: center;
    gap: 8px;
}

.profile-card {
    background: #f7eff9;
}

.profile-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8f1fa;
    margin-bottom: 10px;
}

.rewards-bg {
    background: var(--card-2);
    color: var(--text);
}

.reward-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.reward-card {
    background: #fff;
    color: #111;
    border-radius: 18px;
    padding: 18px;
    text-align: center;
    border: 2px solid transparent;
    cursor: pointer;
}

.reward-card.is-active {
    border-color: #9fd3a8;
    background: #e8d9ef;
}

.search-wrap {
    background: var(--card-2);
    padding: 24px;
    border-radius: var(--radius-lg);
}

.search-input {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card);
    border: 2px solid var(--stroke);
    border-radius: var(--radius-md);
    padding: 12px 14px;
}

.search-input input {
    border: none;
    background: transparent;
    outline: none;
    font-weight: 700;
    font-size: 18px;
    width: 100%;
    color: var(--text);
}


/* OTP */

.otp {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.otp-input {
    width: 100%;
    padding: 16px 0;
    text-align: center;
    font-size: 20px;
    border-radius: 14px;
    border: 1px solid var(--stroke);
}

.otp--error .otp-input {
    border-color: var(--danger);
}

.otp-error-text {
    color: var(--danger);
    font-size: 14px;
    margin-top: 10px;
    display: none;
}

.otp--error+.otp-error-text {
    display: block;
}

.timer {
    font-weight: 700;
}

.chart {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 18px;
    min-height: 220px;
}

.chart__bar {
    width: 100%;
    background: var(--primary);
    border-radius: 10px 10px 0 0;
}


/* Toast */

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--text-invert);
    padding: 12px 16px;
    border-radius: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 50;
}

.toast.show {
    opacity: 1;
}

.small {
    font-size: 13px;
    color: var(--muted);
}


/* Responsive */

@media (max-width: 1024px) {
    .grid {
        grid-template-columns: 1fr;
    }
    .reward-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
     :root {
        --gutter: 16px;
    }
    .grid--3 {
        grid-template-columns: 1fr;
    }
    .reward-options {
        grid-template-columns: 1fr;
    }
    .chat__bubble {
        max-width: 85%;
    }
}
