:root {
    --prospera-green: #2E7D32;
    --theme-green: #458B2F;
    --text-dark-green: #2A4723;
    --light-border: #81C784;

    --danger: #E53935;
    --gray: #777;
    --light-gray: #F5F5F5;
    --border: #DDDDDD;

    --max-content: 1100px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    min-height: 100%;
    font-family:
        Arial,
        Helvetica,
        sans-serif;
    background: white;
    color: #111;
}

body {
    overflow-x: hidden;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}


/* ========================================
   GENERAL SCREEN
======================================== */

.screen {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background: white;
}


/* ========================================
   LOGO
======================================== */

.prospera-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(14px, 2vw, 24px);
    color: var(--theme-green);
    font-weight: 700;
}

.prospera-logo span {
    font-size: clamp(48px, 7vw, 90px);
}

.logo-mark {
    width: clamp(70px, 10vw, 140px);
    height: clamp(70px, 10vw, 140px);

    border-radius: 25%;
    background: var(--theme-green);

    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: clamp(38px, 6vw, 80px);
    font-weight: 800;
}


/* ========================================
   SPLASH
======================================== */

.splash-screen {
    display: flex;
    align-items: center;
    justify-content: center;
}

.splash-content {
    animation: splashAppear 0.7s ease;
}

@keyframes splashAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* ========================================
   LOGIN
======================================== */

.login-page {
    min-height: 100vh;
    min-height: 100dvh;

    padding:
        clamp(24px, 5vw, 64px);

    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-center {
    flex: 1;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    transform: translateY(-16px);
}

.login-logo {
    margin-bottom: clamp(35px, 6vh, 56px);
}

.login-buttons {
    width: min(460px, 100%);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.main-button {
    width: 100%;
    height: 64px;

    border: none;
    border-radius: 0;

    background: var(--theme-green);
    color: white;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    padding: 0 24px;

    font-size: 19px;

    transition:
        transform 0.15s ease,
        filter 0.15s ease;
}

.main-button:hover {
    filter: brightness(0.95);
}

.main-button:active {
    transform: scale(0.98);
}

.button-icon {
    width: 60px;
    font-size: 27px;
}


/* ========================================
   FOOTER
======================================== */

.footer-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.footer-links button {
    border: none;
    background: transparent;

    color: var(--theme-green);
    text-decoration: underline;

    font-size: 18px;
}


/* ========================================
   FORM PAGES
======================================== */

.form-page {
    min-height: 100vh;
    min-height: 100dvh;

    padding:
        16px
        clamp(16px, 5vw, 64px);

    display: flex;
    flex-direction: column;
}

.back-button {
    width: 48px;
    height: 48px;

    border: none;
    background: transparent;

    color: var(--prospera-green);

    font-size: 34px;
    line-height: 1;
}

.form-page h1 {
    text-align: center;

    margin-top: 8px;
    margin-bottom: 32px;

    color: var(--prospera-green);

    font-size: clamp(28px, 5vw, 32px);
}

.form-group {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 24px;
}

.form-group label {
    display: block;

    margin-bottom: 8px;

    font-size: 18px;
    font-weight: 500;
}

.input-wrapper,
.password-wrapper {
    width: 100%;
    height: 58px;

    border: 3px solid var(--prospera-green);

    display: flex;
    align-items: center;

    background: white;
}

.input-wrapper input,
.password-wrapper input {
    width: 100%;
    height: 100%;

    border: none;
    outline: none;

    padding: 0 14px;

    font-size: 22px;
    background: transparent;
}

.input-wrapper span {
    padding-right: 12px;

    color: #777;
    font-weight: 600;

    white-space: nowrap;
}

.password-wrapper input {
    font-size: 21px;
}

.eye-button {
    width: 55px;
    height: 100%;

    border: none;
    background: transparent;

    color: var(--theme-green);
    font-size: 22px;
}

.form-bottom {
    flex: 1;

    display: flex;
    align-items: flex-end;
    justify-content: center;

    padding-bottom: 40px;
}

.green-button {
    border: none;
    border-radius: 0;

    background: var(--theme-green);
    color: white;

    font-weight: 700;

    transition: filter 0.15s ease;
}

.green-button:hover {
    filter: brightness(0.94);
}

.large-button {
    width: 260px;
    min-height: 54px;

    font-size: 20px;
}


/* ========================================
   AGREEMENT
======================================== */

.agreement-row {
    width: 100%;
    max-width: 900px;

    margin: 0 auto;

    display: flex;
    align-items: flex-start;
    gap: 8px;

    font-size: 15px;
    line-height: 1.5;
}

.agreement-row input {
    width: 20px;
    height: 20px;

    accent-color: var(--theme-green);

    margin-top: 2px;
}

.inline-link {
    border: none;
    background: transparent;

    color: var(--theme-green);

    font-weight: 700;
    text-decoration: underline;
}


/* ========================================
   ERRORS
======================================== */

.error-message {
    width: 100%;
    max-width: 900px;

    margin: 16px auto;

    color: var(--danger);

    font-size: 16px;
    font-weight: 700;

    white-space: pre-line;

    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.error-message::before {
    content: "⚠";

    font-size: 30px;
}


/* ========================================
   LOADER
======================================== */

.loader {
    width: 24px;
    height: 24px;

    border: 3px solid rgba(255, 255, 255, 0.4);
    border-top-color: white;

    border-radius: 50%;

    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* ========================================
   ACCOUNT PREVIEW
======================================== */

.account-preview {
    text-align: center;
    margin: 25px 0 35px;
}

.account-preview h2 {
    margin-top: 12px;
    color: var(--text-dark-green);
}

.account-preview p {
    color: #777;
    margin-top: 4px;
}


/* ========================================
   AVATAR
======================================== */

.avatar {
    width: 48px;
    height: 48px;

    border-radius: 50%;

    background: var(--theme-green);
    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 700;
    font-size: 20px;

    flex-shrink: 0;
}

.large-avatar {
    width: 90px;
    height: 90px;

    margin: 0 auto;

    font-size: 36px;
}

.top-avatar {
    border: none;
}


/* ========================================
   MAIN APP
======================================== */

#mainScreen {
    background: #FAFAFA;
}

.topbar {
    height: 70px;

    background: white;

    border-bottom: 1px solid #E5E5E5;

    display: flex;
    align-items: center;

    padding: 0 18px;

    position: sticky;
    top: 0;
    z-index: 20;
}

.icon-button {
    width: 46px;
    height: 46px;

    border: none;
    background: transparent;

    color: var(--theme-green);

    font-size: 28px;

    border-radius: 50%;
}

.icon-button:hover {
    background: #F1F1F1;
}

.topbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;

    color: var(--theme-green);

    margin: 0 auto;
}

.small-logo {
    width: 38px;
    height: 38px;

    border-radius: 10px;

    background: var(--theme-green);
    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 800;
    font-size: 23px;
}

.top-avatar {
    background: var(--theme-green);
    color: white;
    font-size: 17px;
}


/* ========================================
   MAIN CONTENT
======================================== */

.main-content {
    width: min(var(--max-content), 100%);

    margin: 0 auto;

    min-height: calc(100vh - 140px);

    padding: 24px 18px 90px;
}

.page-title {
    color: var(--text-dark-green);
    font-size: 30px;
    margin-bottom: 20px;
}

.page-subtitle {
    color: #777;
    margin-bottom: 25px;
}


/* ========================================
   CARDS
======================================== */

.card {
    background: white;

    border: 1px solid #E2E2E2;

    border-radius: 12px;

    padding: 20px;

    margin-bottom: 16px;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04);
}

.card h3 {
    color: var(--text-dark-green);
    margin-bottom: 8px;
}

.card p {
    color: #666;
    line-height: 1.5;
}


/* ========================================
   HOME
======================================== */

.welcome-card {
    border-left: 5px solid var(--theme-green);
}

.balance-card {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.balance-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--theme-green);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.quick-action {
    border: 1px solid var(--light-border);
    background: white;

    border-radius: 10px;

    padding: 18px 10px;

    color: var(--text-dark-green);

    text-align: center;

    font-weight: 700;
}

.quick-action:hover {
    background: #F5FAF5;
}


/* ========================================
   CHAT
======================================== */

.chat-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-row {
    display: flex;
    align-items: center;
    gap: 14px;

    padding: 14px;

    background: white;

    border: 1px solid #E5E5E5;

    border-radius: 10px;

    cursor: pointer;
}

.chat-row:hover {
    background: #F7FBF7;
}

.chat-info {
    flex: 1;
}

.chat-info strong {
    display: block;
    margin-bottom: 4px;
}

.chat-info span {
    color: #777;
}


/* ========================================
   MARKETPLACE
======================================== */

.market-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 16px;
}

.market-item {
    background: white;

    border: 1px solid #E0E0E0;

    border-radius: 12px;

    overflow: hidden;
}

.market-image {
    height: 150px;

    background: #E8F5E9;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 50px;
}

.market-info {
    padding: 15px;
}

.market-price {
    color: var(--theme-green);
    font-weight: 800;

    margin-top: 8px;
}


/* ========================================
   JOBS
======================================== */

.job-card {
    border-left: 4px solid var(--theme-green);
}

.job-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;
}

.job-pay {
    color: var(--theme-green);
    font-weight: 800;
}


/* ========================================
   FRIENDS
======================================== */

.search-box {
    width: 100%;

    height: 50px;

    border: 2px solid var(--light-border);

    padding: 0 15px;

    outline: none;

    border-radius: 8px;

    margin-bottom: 20px;
}

.friend-row {
    display: flex;
    align-items: center;

    gap: 14px;

    padding: 15px;

    background: white;

    border: 1px solid #E5E5E5;

    border-radius: 10px;

    margin-bottom: 10px;
}

.friend-info {
    flex: 1;
}

.friend-info strong {
    display: block;
}

.friend-info span {
    color: #777;
    font-size: 14px;
}

.friend-button {
    border: 1px solid var(--theme-green);
    background: white;

    color: var(--theme-green);

    padding: 8px 14px;

    border-radius: 6px;
}


/* ========================================
   NOTIFICATIONS
======================================== */

.notification {
    display: flex;
    gap: 14px;

    padding: 16px;

    background: white;

    border-bottom: 1px solid #E5E5E5;
}

.notification-icon {
    width: 42px;
    height: 42px;

    border-radius: 50%;

    background: #E8F5E9;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--theme-green);
}


/* ========================================
   PROFILE
======================================== */

.profile-header {
    background: white;

    padding: 30px 20px;

    border-radius: 14px;

    text-align: center;

    border: 1px solid #E5E5E5;
}

.profile-avatar {
    width: 110px;
    height: 110px;

    margin: 0 auto 15px;

    border-radius: 50%;

    background: var(--theme-green);

    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 42px;
    font-weight: 800;
}

.profile-handle {
    color: #777;
    margin-top: 5px;
}

.profile-actions {
    display: flex;
    justify-content: center;

    gap: 10px;

    margin-top: 20px;
}

.profile-action {
    padding: 10px 20px;

    border: 1px solid var(--theme-green);

    border-radius: 7px;

    background: white;

    color: var(--theme-green);

    font-weight: 700;
}

.profile-action.primary {
    background: var(--theme-green);
    color: white;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 10px;

    margin-top: 20px;
}

.stat {
    background: #F7FAF7;

    border-radius: 10px;

    padding: 15px;

    text-align: center;
}

.stat strong {
    display: block;

    color: var(--theme-green);

    font-size: 22px;
}

.stat span {
    color: #777;

    font-size: 13px;
}


/* ========================================
   BOTTOM NAV
======================================== */

.bottom-nav {
    position: fixed;

    left: 0;
    right: 0;
    bottom: 0;

    height: 70px;

    background: white;

    border-top: 1px solid #DDDDDD;

    display: flex;

    z-index: 30;
}

.bottom-nav-item {
    flex: 1;

    border: none;
    background: white;

    color: #777;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 3px;
}

.bottom-nav-item span {
    font-size: 22px;
}

.bottom-nav-item small {
    font-size: 11px;
}

.bottom-nav-item.active {
    color: var(--theme-green);
    font-weight: 700;
}


/* ========================================
   DRAWER
======================================== */

.drawer {
    position: fixed;

    top: 0;
    bottom: 0;
    left: 0;

    width: min(330px, 88vw);

    background: white;

    z-index: 100;

    transform: translateX(-100%);

    transition: transform 0.25s ease;

    overflow-y: auto;

    box-shadow:
        5px 0 20px rgba(0, 0, 0, 0.12);
}

.drawer.open {
    transform: translateX(0);
}

.drawer-overlay {
    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.35);

    z-index: 90;

    opacity: 0;
    pointer-events: none;

    transition: opacity 0.25s ease;
}

.drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.drawer-header {
    padding: 25px 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid #E5E5E5;
}

.drawer-profile {
    display: flex;
    align-items: center;

    gap: 12px;
}

.drawer-profile strong,
.drawer-profile span {
    display: block;
}

.drawer-profile span {
    color: #777;
    font-size: 14px;

    margin-top: 3px;
}

.drawer-menu {
    padding: 10px;
}

.drawer-menu button {
    width: 100%;

    border: none;
    background: white;

    padding: 14px 15px;

    text-align: left;

    color: #222;

    display: flex;
    align-items: center;

    gap: 15px;

    border-radius: 8px;

    font-size: 16px;
}

.drawer-menu button:hover {
    background: #F3F8F3;
}

.drawer-divider {
    height: 1px;
    background: #E5E5E5;

    margin: 10px 0;
}

.logout-item {
    color: #D32F2F !important;
}


/* ========================================
   MODALS
======================================== */

.modal {
    position: fixed;

    inset: 0;

    z-index: 200;

    background: rgba(0, 0, 0, 0.45);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
}

.modal-box {
    width: min(700px, 100%);

    max-height: 85vh;

    background: white;

    border-radius: 12px;

    padding: 25px;

    position: relative;

    overflow: hidden;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.25);
}

.modal-box h2 {
    color: var(--theme-green);

    margin-bottom: 18px;
}

.modal-close {
    position: absolute;

    top: 12px;
    right: 12px;

    width: 40px;
    height: 40px;

    border: none;
    background: transparent;

    font-size: 28px;
}

.legal-content {
    max-height: 65vh;

    overflow-y: auto;

    white-space: pre-line;

    line-height: 1.6;

    color: #333;

    padding-right: 10px;
}


/* ========================================
   FORGOT PASSWORD
======================================== */

.forgot-box {
    max-width: 520px;
}

.forgot-step {
    text-align: center;
}

.forgot-step h2 {
    margin-bottom: 10px;
}

.forgot-step p {
    color: #777;

    line-height: 1.5;

    margin-bottom: 22px;
}

.forgot-option {
    width: 100%;

    padding: 16px;

    margin-bottom: 12px;

    border: 2px solid var(--light-border);

    background: white;

    color: var(--text-dark-green);

    border-radius: 8px;

    text-align: left;

    font-weight: 700;
}

.forgot-option:hover {
    background: #F5FAF5;
}

.forgot-input {
    width: 100%;

    height: 52px;

    border: 2px solid var(--theme-green);

    outline: none;

    padding: 0 14px;

    margin-bottom: 12px;
}

.forgot-next {
    width: 100%;

    height: 50px;

    border: none;

    background: var(--theme-green);

    color: white;

    font-weight: 700;
}


/* ========================================
   TOAST
======================================== */

.toast {
    position: fixed;

    left: 50%;

    bottom: 90px;

    transform:
        translate(-50%, 20px);

    background: #222;

    color: white;

    padding: 12px 20px;

    border-radius: 8px;

    opacity: 0;

    pointer-events: none;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease;

    z-index: 500;

    max-width: 90vw;

    text-align: center;
}

.toast.show {
    opacity: 1;

    transform:
        translate(-50%, 0);
}


/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 800px) {

    .market-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .quick-actions {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .prospera-logo span {
        font-size: clamp(42px, 9vw, 70px);
    }

    .logo-mark {
        width: 80px;
        height: 80px;
    }
}


@media (max-width: 600px) {

    .login-page {
        padding: 25px 16px;
    }

    .footer-links button {
        font-size: 14px;
    }

    .form-page {
        padding: 12px 16px;
    }

    .form-page h1 {
        margin-bottom: 24px;
    }

    .main-content {
        padding:
            20px
            14px
            90px;
    }

    .page-title {
        font-size: 26px;
    }

    .market-grid {
        grid-template-columns: 1fr;
    }

    .balance-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .stats {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .profile-actions {
        flex-direction: column;
    }

    .profile-action {
        width: 100%;
    }

    .agreement-row {
        font-size: 14px;
    }

    .large-button {
        width: min(260px, 100%);
    }
}


@media (max-width: 400px) {

    .prospera-logo {
        gap: 10px;
    }

    .prospera-logo span {
        font-size: 39px;
    }

    .logo-mark {
        width: 60px;
        height: 60px;

        font-size: 32px;
    }

    .main-button {
        height: 58px;
        font-size: 17px;
    }

    .button-icon {
        width: 50px;
        font-size: 22px;
    }
}