:root {
    --bg-color: #f6f8fc; /* Gmail background */
    --card-bg: #ffffff;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --primary-color: #4285F4; /* Google Blue */
    --primary-hover: #3367d6;
    --border-color: #e0e0e0;
    --success-color: #34A853; /* Google Green */
    --danger-color: #EA4335;  /* Google Red */
    --warning-color: #FBBC05; /* Google Yellow */
    --nav-height: 60px;
    --border-radius: 12px;
}
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body, input, button, select, textarea {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    padding-bottom: calc(var(--nav-height) + 20px);
    overflow-x: hidden;
    font-weight: 400;
}

/* Animations */
@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.animate-slide {
    animation: slideIn 0.3s ease-out forwards;
}

/* Common Components */
.container {
    padding: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03), 0 1px 3px rgba(0,0,0,0.05);
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:active {
    transform: scale(0.99);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 28px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 4px 6px rgba(66, 133, 244, 0.2);
}

.btn-primary:active {
    background: var(--primary-hover);
    transform: scale(0.97);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--border-color);
    padding: 12px 24px;
    border-radius: 28px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-secondary:active {
    background: #f8f9fa;
    transform: scale(0.97);
}

.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
    background: #fafafa;
}

.input-group input:focus, .input-group select:focus {
    border-color: var(--primary-color);
    background: #fff;
}

/* Header / Profile */
.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info h2 {
    font-size: 18px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.verified-icon {
    color: var(--primary-color);
    font-size: 16px;
}

.balance-display {
    font-size: 28px;
    font-weight: 400;
    color: var(--text-primary);
    margin-top: 4px;
}

.balance-label {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--card-bg);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.05);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    gap: 4px;
    width: 64px;
    height: 100%;
    position: relative;
    transition: color 0.3s;
}

.nav-item i {
    font-size: 22px;
    width: 64px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 16px;
    transition: background 0.3s, color 0.3s, transform 0.2s;
}

.nav-item:active i {
    transform: scale(0.9);
}

.nav-item.active {
    color: var(--text-primary);
    font-weight: 600;
}

.nav-item.active i {
    background: rgba(66, 133, 244, 0.15); /* Light blue pill */
    color: var(--primary-color);
}

/* Notice Box */
.notice-box {
    background: #e8f0fe;
    border-left: 4px solid var(--primary-color);
    padding: 12px;
    border-radius: 4px 8px 8px 4px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.notice-box i { color: var(--primary-color); margin-top: 2px;}

/* Stat Grid */
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
.stat-item {
    background: #fafafa;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
}
.stat-value { font-size: 20px; font-weight: 500; color: var(--primary-color); }
.stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* Loader Overlay */
.loader-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.loader-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.gmail-loader {
    width: 60px;
    height: 60px;
    background: url('../img/gmail-logo.png') no-repeat center center;
    background-size: contain;
    animation: pulse 1.5s infinite;
}
.loader-text {
    margin-top: 16px;
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Referral Section */
.ref-link-box {
    display: flex;
    align-items: center;
    background: #f1f3f4;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 16px;
}
.ref-link-box input {
    background: transparent;
    border: none;
    padding: 10px;
    flex: 1;
    font-size: 13px;
    outline: none;
}
.ref-action-btns {
    display: flex;
    gap: 8px;
}
