/* =========================================================
   LEAF EARN BOT - EXACT UNIQUE DESIGN MATCH
   ========================================================= */

:root {
    --bg-main: #e2efe3;
    --card-bg: #ffffff;
    --card-border: #c9e2cd;
    --text-main: #0f2d1a;
    --text-muted: #5e7e68;
    
    --primary-green: #0d6832;
    --primary-green-hover: #0a5428;
    --secondary-green: #10b981;
    --badge-bg: #d3ebd6;
    
    --shadow-color: rgba(13, 104, 50, 0.08);
    --font-family: 'Plus Jakarta Sans', sans-serif;
}

body.dark-theme {
    --bg-main: #0c1811;
    --card-bg: #14261c;
    --card-border: #1e3a2b;
    --text-main: #e2f0e5;
    --text-muted: #7f9f88;
    
    --primary-green: #128a43;
    --secondary-green: #059669;
    --badge-bg: #1a3826;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
    position: relative;
    overflow-x: hidden;
}

/* Background Subtle Leaves Grid Pattern */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(var(--card-border) 1.2px, transparent 1.2px);
    background-size: 22px 22px;
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

#app {
    width: 100%;
    max-width: 440px;
    min-height: 100vh;
    padding: 16px 16px 90px 16px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

/* ---------------- HEADER ---------------- */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-box {
    width: 44px;
    height: 44px;
    background: #d1ebd4;
    color: var(--primary-green);
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.user-meta {
    display: flex;
    flex-direction: column;
}

.welcome-text {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.8px;
}

.user-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

/* Theme Switcher Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 32px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--badge-bg);
    transition: .3s;
    border-radius: 30px;
    border: 1px solid var(--card-border);
}

.slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 3px;
    background-color: var(--primary-green);
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #1a3826;
}

input:checked + .slider:before {
    transform: translateX(28px);
    background-color: var(--secondary-green);
}

.sun-icon {
    position: absolute;
    right: 8px;
    top: 6px;
    font-size: 12px;
}

/* ---------------- CUT CORNER WRAPPER & CARD ---------------- */
.card-wrapper {
    filter: drop-shadow(0 4px 10px var(--shadow-color));
}

.margin-bottom {
    margin-bottom: 12px;
}

.cut-card {
    background: var(--card-bg);
    padding: 18px 20px;
    clip-path: polygon(
        16px 0%, 
        100% 0%, 
        100% calc(100% - 16px), 
        calc(100% - 16px) 100%, 
        0% 100%, 
        0% 16px
    );
    border: 1px solid var(--card-border);
    position: relative;
    overflow: hidden;
}

/* Balance Card */
.balance-card {
    margin-bottom: 16px;
    padding: 22px 20px;
}

.balance-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.balance-amount {
    font-size: 42px;
    font-weight: 800;
    color: var(--primary-green);
    margin-bottom: 12px;
    line-height: 1;
}

.balance-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--badge-bg);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.badge-dot, .badge-usd {
    color: var(--text-muted);
}

.floating-leaf {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 64px;
    opacity: 0.85;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

/* ---------------- ACTION BUTTONS ---------------- */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.btn-wrapper {
    filter: drop-shadow(0 4px 8px var(--shadow-color));
}

.btn {
    width: 100%;
    padding: 14px 16px;
    border: none;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.1s ease, background 0.2s;
    color: #ffffff;
}

.btn:active {
    transform: scale(0.97);
}

.cut-btn {
    clip-path: polygon(
        12px 0%, 
        100% 0%, 
        100% calc(100% - 12px), 
        calc(100% - 12px) 100%, 
        0% 100%, 
        0% 12px
    );
}

.btn-primary {
    background: var(--primary-green);
}

.btn-primary:hover {
    background: var(--primary-green-hover);
}

.btn-secondary {
    background: var(--secondary-green);
}

/* ---------------- FEATURE LIST CARDS ---------------- */
.feature-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.feature-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.feature-icon {
    font-size: 26px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--badge-bg);
    border-radius: 12px;
}

.feature-text h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 3px;
}

.feature-text p {
    font-size: 12px;
    color: var(--text-muted);
}

.feature-arrow {
    color: var(--text-muted);
    font-size: 14px;
}

/* ---------------- WATCH & EARN SECTION ---------------- */
.section-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 18px 0 10px 0;
    padding: 0 4px;
}

.title-text {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.green-dot {
    color: var(--primary-green);
}

.subtitle-text {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.ads-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.ad-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 110px;
    cursor: pointer;
}

.ad-header {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
}

.ad-label {
    color: var(--text-muted);
}

.ad-counter {
    color: var(--primary-green);
}

.ad-body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.ad-symbol {
    font-size: 26px;
}

.ad-reward {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-green);
}

/* ---------------- TABS MANAGEMENT ---------------- */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ---------------- BOTTOM NAVIGATION BAR ---------------- */
.nav-wrapper {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 408px;
    filter: drop-shadow(0 8px 16px var(--shadow-color));
    z-index: 100;
}

.bottom-nav {
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 8px 6px;
    clip-path: polygon(
        16px 0%, 
        100% 0%, 
        100% calc(100% - 16px), 
        calc(100% - 16px) 100%, 0% 100%, 0% 16px
    );
    border: 1px solid var(--card-border);
}

.nav-item {
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
    border-radius: 12px;
}

.nav-item.active {
    background: var(--primary-green);
    color: #ffffff;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.nav-icon {
    font-size: 16px;
}

.nav-label {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* Center Floating Nav Item */
.nav-center-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    margin-top: -16px;
}

.center-fab {
    width: 42px;
    height: 42px;
    background: var(--badge-bg);
    border: 2px solid var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 8px var(--shadow-color);
}

/* ---------------- MODALS & INPUTS ---------------- */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-container {
    position: relative;
    z-index: 1001;
    width: 90%;
    max-width: 360px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-muted);
}

.input-cut {
    width: 100%;
    padding: 10px 14px;
    background: var(--badge-bg);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    font-weight: 600;
    outline: none;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
