/* BYD Premium Mobile App - Home Screen */

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

:root {
    --app-bg: #ffffff;
    --app-surface: #f8f9fa;
    --app-text-primary: #000000;
    --app-text-secondary: #6b7280;
    --app-text-tertiary: #9ca3af;
    --app-accent: #1e293b;
    --app-accent-light: #334155;
    --app-border: #e5e7eb;
    --app-success: #10b981;
    --app-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --app-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --app-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Roboto', sans-serif;
    background: var(--app-bg);
    color: var(--app-text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-bottom: calc(80px + var(--safe-area-bottom));
    overflow-x: hidden;
}

/* Hero Banner Section */
.hero-section {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--app-accent) 0%, var(--app-accent-light) 100%);
}

.flames-hero {
    overflow: visible;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

/* Flames Effect */
.flames-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.flame {
    position: absolute;
    bottom: -20px;
    width: 60px;
    height: 80px;
    background: linear-gradient(to top, 
        rgba(255, 100, 0, 0.8) 0%,
        rgba(255, 150, 0, 0.6) 30%,
        rgba(255, 200, 0, 0.4) 60%,
        rgba(255, 255, 100, 0.2) 80%,
        transparent 100%
    );
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flameRise 3s infinite ease-in-out;
    filter: blur(2px);
    opacity: 0.7;
}

.flame-1 {
    left: 5%;
    animation-delay: 0s;
    animation-duration: 2.5s;
}

.flame-2 {
    left: 15%;
    animation-delay: 0.3s;
    animation-duration: 2.8s;
    width: 50px;
    height: 70px;
}

.flame-3 {
    left: 25%;
    animation-delay: 0.6s;
    animation-duration: 3s;
    width: 70px;
    height: 90px;
}

.flame-4 {
    left: 35%;
    animation-delay: 0.2s;
    animation-duration: 2.7s;
    width: 55px;
    height: 75px;
}

.flame-5 {
    left: 50%;
    animation-delay: 0.5s;
    animation-duration: 2.9s;
    width: 65px;
    height: 85px;
}

.flame-6 {
    left: 65%;
    animation-delay: 0.1s;
    animation-duration: 2.6s;
    width: 50px;
    height: 70px;
}

.flame-7 {
    left: 75%;
    animation-delay: 0.4s;
    animation-duration: 3.1s;
    width: 60px;
    height: 80px;
}

.flame-8 {
    left: 85%;
    animation-delay: 0.7s;
    animation-duration: 2.8s;
    width: 55px;
    height: 75px;
}

@keyframes flameRise {
    0% {
        transform: translateY(0) scale(1) rotate(-2deg);
        opacity: 0.7;
    }
    25% {
        transform: translateY(-25px) scale(1.1) rotate(2deg);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-50px) scale(1.2) rotate(-1deg);
        opacity: 0.9;
    }
    75% {
        transform: translateY(-75px) scale(1.1) rotate(1deg);
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100px) scale(0.8) rotate(-2deg);
        opacity: 0;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.6) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px 20px;
    padding-top: calc(44px + var(--safe-area-top));
}

.app-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.app-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

/* Container */
.container {
    max-width: 100%;
    padding: 0;
}

.section {
    padding: 24px 20px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--app-text-primary);
    margin-bottom: 20px;
    letter-spacing: -0.3px;
}

/* Balance Card */
.balance-card {
    background: var(--app-bg);
    border-radius: 20px;
    padding: 16px 24px;
    margin: -40px 20px 24px;
    box-shadow: var(--app-shadow-lg);
    position: relative;
    z-index: 10;
}

.balance-label {
    font-size: 13px;
    color: var(--app-text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.balance-amount {
    font-size: 36px;
    font-weight: 700;
    color: var(--app-text-primary);
    letter-spacing: -1px;
    margin-bottom: 0;
}

.balance-stats {
    display: flex;
    gap: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--app-border);
}

.balance-stat {
    flex: 1;
}

.balance-stat-label {
    font-size: 12px;
    color: var(--app-text-secondary);
    margin-bottom: 4px;
}

.balance-stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--app-text-primary);
}

.balance-stat-value.earnings {
    color: var(--app-success);
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 0 20px 24px;
}

.action-btn {
    background: var(--app-surface);
    border: none;
    border-radius: 16px;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--app-text-primary);
}

.action-btn:active {
    transform: scale(0.96);
    background: var(--app-border);
}

.action-icon {
    width: 32px;
    height: 32px;
    background: var(--app-accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ffffff;
    font-weight: 600;
}

.action-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--app-text-primary);
    text-align: center;
}

/* Products Section */
.products-section {
    background: var(--app-surface);
    padding: 32px 0;
}

.products-container {
    padding: 0 20px;
}

.product-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-card {
    background: var(--app-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--app-shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:active {
    transform: scale(0.98);
    box-shadow: var(--app-shadow-sm);
}

.product-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--app-surface);
    position: relative;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:active .product-image {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--app-text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.product-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--app-text-primary);
    letter-spacing: -0.5px;
}

.product-yield {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.yield-percentage {
    font-size: 18px;
    font-weight: 700;
    color: var(--app-success);
}

.yield-duration {
    font-size: 12px;
    color: var(--app-text-secondary);
    margin-top: 2px;
}

.product-description {
    font-size: 14px;
    color: var(--app-text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
}

.product-btn {
    width: 100%;
    background: var(--app-accent);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.product-btn:active {
    transform: scale(0.98);
    background: var(--app-accent-light);
}

/* Chargers Section */
.chargers-section {
    padding: 32px 0;
}

/* Support Card */
.support-card {
    background: var(--app-surface);
    border-radius: 20px;
    padding: 24px;
    margin: 0 20px 24px;
}

.support-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--app-text-primary);
    margin-bottom: 12px;
}

.support-text {
    font-size: 14px;
    color: var(--app-text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.support-btn {
    width: 100%;
    background: var(--app-bg);
    color: var(--app-text-primary);
    border: 1px solid var(--app-border);
    border-radius: 14px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.support-btn:active {
    background: var(--app-border);
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--app-bg);
    border-top: 1px solid var(--app-border);
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    padding-bottom: calc(12px + var(--safe-area-bottom));
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--app-text-tertiary);
    font-size: 11px;
    font-weight: 500;
    transition: color 0.2s ease;
    flex: 1;
    padding: 4px;
}

.nav-item.active {
    color: var(--app-accent);
}

/* Responsive */
@media (min-width: 768px) {
    .container {
        max-width: 600px;
        margin: 0 auto;
    }
    
    .hero-section {
        height: 320px;
    }
    
    .product-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

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

.balance-card,
.product-card,
.support-card {
    animation: fadeInUp 0.4s ease;
}

/* Utility */
.text-center {
    text-align: center;
}

.mt-8 {
    margin-top: 8px;
}

.mb-8 {
    margin-bottom: 8px;
}

