* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: #f0f0f0; max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; }

:root {
    --green: #1B5E20;
    --green-light: #2E7D32;
    --green-mid: #388E3C;
    --green-btn: #1B5E20;
    --green-bg: #e8f5e9;
    --accent: #4CAF50;
    --text: #1a1a1a;
    --gray: #666;
    --white: #fff;
    --card-shadow: 0 2px 12px rgba(0,0,0,0.09);
}

/* ---- HERO HEADER ---- */
.hero-header {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-light) 60%, var(--green-mid) 100%);
    padding: 0;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.hero-header::before {
    content: '';
    position: absolute;
    right: -30px; top: -30px;
    width: 200px; height: 200px;
    background: rgba(255,255,255,0.07);
    border-radius: 50%;
}
.hero-header::after {
    content: '';
    position: absolute;
    left: -20px; bottom: -40px;
    width: 160px; height: 160px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}
.hero-brand { color: #fff; font-size: 28px; font-weight: 800; letter-spacing: 1px; z-index: 2; text-shadow: 0 2px 6px rgba(0,0,0,0.2); }
.hero-tagline { color: rgba(255,255,255,0.85); font-size: 13px; z-index: 2; margin-top: 3px; }

/* ---- LOGO CIRCLE ---- */
.logo-circle {
    width: 80px; height: 80px;
    background: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    margin: 0 auto 12px auto;
    z-index: 2;
    position: relative;
}
.logo-circle svg { width: 52px; height: 52px; }

/* ---- PAGE TOP BAR ---- */
.page-topbar {
    background: linear-gradient(90deg, var(--green), var(--green-light));
    color: #fff;
    text-align: center;
    padding: 16px;
    font-size: 18px;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* ---- NAV BAR ---- */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 100%; max-width: 480px;
    background: #fff;
    display: flex;
    border-top: 1px solid #e0e0e0;
    z-index: 200;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.1);
}
.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0 6px;
    color: #999;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-item.active { color: var(--green); }
.nav-item svg { width: 24px; height: 24px; margin-bottom: 3px; }
.nav-item span { font-size: 11px; }

/* ---- MAIN CONTENT ---- */
.main-content { padding-bottom: 70px; }

/* ---- CARDS ---- */
.card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    margin: 12px;
    box-shadow: var(--card-shadow);
}

/* ---- TOP ICONS (Home) ---- */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 16px 12px;
}
.qa-item {
    display: flex; flex-direction: column;
    align-items: center; gap: 6px;
    text-decoration: none; color: var(--text);
}
.qa-icon {
    width: 52px; height: 52px;
    background: var(--green-bg);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
}
.qa-icon svg { width: 26px; height: 26px; color: var(--green); }
.qa-label { font-size: 12px; color: var(--text); font-weight: 500; }

/* ---- PLAN CARD (Home) ---- */
.plan-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    margin: 0 12px 12px;
    box-shadow: var(--card-shadow);
    position: relative;
}
.plan-badge {
    position: absolute;
    top: 12px; right: 12px;
    background: var(--green);
    color: #fff;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
}
.plan-title { font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.plan-info-row { display: flex; align-items: center; gap: 16px; }
.plan-icon {
    width: 70px; height: 70px;
    object-fit: contain;
    border-radius: 10px;
}
.plan-icon-placeholder {
    width: 70px; height: 70px;
    background: linear-gradient(135deg, var(--green-bg), #c8e6c9);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px;
}
.plan-stats { display: flex; gap: 20px; }
.plan-stat { display: flex; flex-direction: column; }
.plan-stat .val { font-size: 18px; font-weight: 700; color: var(--green); }
.plan-stat .lbl { font-size: 11px; color: var(--gray); margin-top: 1px; }
.plan-price { margin-top: 10px; font-weight: 700; color: var(--green); font-size: 15px; }
.plan-timer {
    display: block; width: 100%;
    background: var(--green);
    color: #fff;
    text-align: center;
    border-radius: 30px;
    padding: 10px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
    letter-spacing: 2px;
}
.buy-btn {
    display: block; width: 100%;
    background: var(--green);
    color: #fff;
    text-align: center;
    border-radius: 30px;
    padding: 11px;
    font-size: 15px;
    font-weight: 600;
    margin-top: 10px;
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.buy-btn:hover { background: var(--green-light); }

/* ---- WITHDRAWAL FEED ---- */
.feed-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #f5f5f5;
}
.feed-avatar {
    width: 38px; height: 38px;
    background: var(--green-bg);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.feed-text { flex: 1; }
.feed-name { font-size: 13px; font-weight: 600; }
.feed-desc { font-size: 12px; color: var(--gray); }
.feed-time { font-size: 11px; color: #aaa; }

/* ---- PLAN STORE ---- */
.tab-bar {
    display: flex;
    background: #f5f5f5;
    border-radius: 30px;
    margin: 12px;
    padding: 4px;
}
.tab-btn {
    flex: 1;
    text-align: center;
    padding: 9px 0;
    border-radius: 26px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border: none;
    background: transparent;
    transition: all 0.2s;
    text-decoration: none;
}
.tab-btn.active {
    background: var(--green);
    color: #fff;
}

/* ---- PRODUCT CARD ---- */
.product-card {
    background: #fff;
    border-radius: 16px;
    margin: 0 12px 14px;
    padding: 14px;
    box-shadow: var(--card-shadow);
    position: relative;
}
.product-badge {
    background: var(--green);
    color: #fff;
    border-radius: 8px 0 8px 0;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 10px;
}
.product-days {
    position: absolute;
    top: 14px; right: 14px;
    background: var(--green-bg);
    color: var(--green);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
}
.product-row { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.product-icon-wrap {
    width: 70px; height: 70px;
    background: linear-gradient(135deg, var(--green-bg), #c8e6c9);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 34px;
    flex-shrink: 0;
}
.product-nums { display: flex; gap: 20px; }
.product-num .val { font-size: 17px; font-weight: 800; color: var(--green); }
.product-num .lbl { font-size: 11px; color: #888; margin-top: 1px; }
.product-price { font-size: 17px; font-weight: 800; color: var(--green); margin-top: 10px; text-align: center; }

/* ---- REGISTER / LOGIN ---- */
.auth-page { background: #fff; min-height: 100vh; }
.auth-form { padding: 24px 18px 100px; }
.form-group { margin-bottom: 18px; }
.form-label { font-size: 14px; font-weight: 700; color: var(--green); margin-bottom: 7px; display: block; }
.input-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #e0e0e0;
    border-radius: 30px;
    padding: 0 16px;
    background: #fafafa;
    transition: border 0.2s;
}
.input-wrap:focus-within { border-color: var(--green); }
.input-wrap svg { width: 18px; height: 18px; color: #999; flex-shrink: 0; }
.input-wrap input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 13px 10px;
    font-size: 14px;
    outline: none;
    color: var(--text);
}
.input-wrap input::placeholder { color: #bbb; }
.send-otp-btn {
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    margin-left: 8px;
}
.eye-btn { background: none; border: none; cursor: pointer; padding: 4px; }
.eye-btn svg { color: var(--green); width: 20px; height: 20px; }
.main-btn {
    display: block; width: 100%;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 15px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    text-align: center;
    text-decoration: none;
    transition: background 0.2s;
}
.main-btn:hover { background: var(--green-light); }
.auth-footer { text-align: center; margin-top: 18px; font-size: 14px; color: #666; }
.auth-footer a { color: var(--green); font-weight: 700; text-decoration: none; }
.error-msg { background: #ffebee; color: #c62828; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px; }
.success-msg { background: var(--green-bg); color: var(--green); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px; }

/* ---- INFO MODAL ---- */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 500;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.modal-box {
    background: #fff;
    border-radius: 20px;
    padding: 24px 20px;
    max-width: 380px;
    width: 100%;
    position: relative;
}
.modal-title {
    background: var(--green);
    color: #fff;
    text-align: center;
    border-radius: 20px;
    padding: 8px 20px;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 16px;
}
.modal-close {
    position: absolute;
    top: 14px; right: 14px;
    width: 30px; height: 30px;
    background: var(--green);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    border: none;
    font-size: 16px;
    font-weight: 700;
}
.modal-row { text-align: center; font-size: 14px; color: #333; margin: 8px 0; line-height: 1.5; }
.modal-row .green { color: var(--green); font-weight: 600; }
.modal-row .red { color: #e53935; font-weight: 600; }
.modal-info-icon { color: var(--green); font-size: 22px; }
.tg-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--green);
    color: #fff;
    border-radius: 30px;
    padding: 12px;
    margin-top: 16px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    width: 100%;
}

/* ---- PROFILE PAGE ---- */
.profile-header {
    background: linear-gradient(135deg, var(--green), var(--green-light));
    padding: 20px 16px;
    display: flex; align-items: center; gap: 12px;
    position: relative;
}
.profile-avatar {
    width: 50px; height: 50px;
    background: #fff;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
}
.profile-phone { color: #fff; font-size: 17px; font-weight: 700; }
.profile-orders {
    position: absolute; right: 16px; top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: 1.5px solid rgba(255,255,255,0.4);
    color: #fff;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.profile-withdraw-bar {
    background: rgba(255,255,255,0.12);
    margin: 10px 16px 0;
    border-radius: 10px;
    padding: 8px 14px;
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    display: flex; align-items: center; gap: 8px;
}
.action-row { display: flex; gap: 12px; padding: 14px 12px; }
.action-card {
    flex: 1;
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    display: flex; align-items: center; gap: 10px;
    box-shadow: var(--card-shadow);
    text-decoration: none; color: var(--text);
    font-weight: 600; font-size: 15px;
    cursor: pointer;
}
.action-card svg { width: 28px; height: 28px; color: var(--green); }
.section-title { font-size: 15px; font-weight: 700; padding: 4px 14px 8px; color: var(--text); }
.earnings-row { display: flex; gap: 12px; padding: 0 12px 12px; }
.earnings-card {
    flex: 1;
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    box-shadow: var(--card-shadow);
}
.earnings-dot { width: 10px; height: 10px; background: var(--accent); border-radius: 50%; display: inline-block; margin-right: 6px; }
.earnings-label { font-size: 12px; color: #555; margin-bottom: 6px; }
.earnings-val { font-size: 22px; font-weight: 800; color: var(--green); }
.menu-list { background: #fff; border-radius: 14px; margin: 0 12px 12px; box-shadow: var(--card-shadow); overflow: hidden; }
.menu-item {
    display: flex; align-items: center; gap: 12px;
    padding: 15px 16px;
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none; color: var(--text);
    font-size: 14px; font-weight: 500;
}
.menu-item:last-child { border-bottom: none; }
.menu-item svg { width: 22px; height: 22px; color: var(--green); }
.menu-chevron { margin-left: auto; color: #bbb; }
.menu-chevron svg { width: 16px; height: 16px; }

/* ---- PROMOTION ---- */
.promo-header { background: linear-gradient(135deg, var(--green), var(--green-light)); padding: 14px 12px 0; }
.promo-title { color: #fff; font-size: 22px; font-weight: 800; text-align: center; padding: 10px 0 16px; }
.ref-card { background: #fff; border-radius: 16px; margin: 0 12px 12px; padding: 16px; box-shadow: var(--card-shadow); }
.ref-link-row { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.ref-link-box {
    flex: 1;
    border: 1.5px dashed var(--green);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    color: #555;
    display: flex; align-items: center; gap: 8px;
    overflow: hidden;
}
.ref-link-box span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-btn {
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 11px 18px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
}
.stats-row { display: flex; gap: 10px; }
.stat-box { flex: 1; background: var(--green-bg); border-radius: 12px; padding: 12px; text-align: center; }
.stat-box .sv { font-size: 20px; font-weight: 800; color: var(--green); }
.stat-box .sl { font-size: 11px; color: #666; margin-top: 3px; }
.level-card { background: #fff; border-radius: 16px; margin: 0 12px 12px; padding: 14px; box-shadow: var(--card-shadow); }
.level-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.level-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.level-dot { width: 16px; height: 16px; background: var(--green); border-radius: 4px; }
.view-more { color: var(--green); font-size: 13px; font-weight: 600; text-decoration: none; }
.level-stats { background: var(--green-bg); border-radius: 10px; padding: 12px; display: flex; }
.level-stat { flex: 1; text-align: center; }
.level-stat .lv { font-size: 17px; font-weight: 800; color: var(--green); }
.level-stat .ll { font-size: 11px; color: #666; margin-top: 2px; }
.how-it-works { background: #fff; border-radius: 16px; margin: 0 12px 12px; padding: 14px; box-shadow: var(--card-shadow); }
.how-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.how-bullet { width: 10px; height: 10px; background: var(--green); border-radius: 50%; }
.how-text { font-size: 13px; color: #555; line-height: 1.7; }
.how-text strong { color: var(--green); }

/* ---- TOP BAR ICONS ---- */
.topbar-icons { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); display: flex; gap: 14px; }
.topbar-icons svg { width: 22px; height: 22px; color: #fff; }
.topbar-home { background: linear-gradient(135deg, var(--green), var(--green-light)); padding: 16px; display: flex; align-items: center; justify-content: space-between; position: relative; }

/* ---- ALERT ---- */
.flash { padding: 10px 14px; border-radius: 10px; margin: 10px 12px; font-size: 13px; }
.flash-err { background: #ffebee; color: #c62828; }
.flash-ok { background: var(--green-bg); color: var(--green); }

/* CHECKIN */
.checkin-btn {
    display: block;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    text-align: center;
    margin-top: 10px;
}
.checkin-btn:disabled { background: #9e9e9e; cursor: default; }

@media (max-width: 360px) {
    .hero-brand { font-size: 24px; }
    .plan-stat .val { font-size: 16px; }
}


/* ---- BANNER SLIDER - FULL WIDTH HERO ---- */
.banner-slider {
    margin: 0;
    padding: 0;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    background: #e0e0e0;
    width: 100%;
    display: block;
}
.banner-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
    will-change: transform;
    width: 100%;
}
.banner-slide {
    min-width: 100%;
    width: 100%;
    height: 210px;
    flex-shrink: 0;
    overflow: hidden;
}
.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.banner-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
}
.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.55);
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.4);
}
.banner-dot.active {
    background: #fff;
    width: 22px;
    border-radius: 4px;
}

/* ---- INFINITE SCROLL FEED ---- */
.feed-wrapper {
    margin: 10px 12px;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    height: 220px;
    position: relative;
}
.feed-wrapper::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 30px;
    background: linear-gradient(to bottom, #fff, transparent);
    z-index: 2;
}
.feed-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 30px;
    background: linear-gradient(to top, #fff, transparent);
    z-index: 2;
}
.feed-scroll {
    display: flex;
    flex-direction: column;
    animation: feedScrollUp 25s linear infinite;
}
.feed-scroll:hover {
    animation-play-state: paused;
}
@keyframes feedScrollUp {
    0%   { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}
