@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #3b82f6; 
    --primary-dark: #1d4ed8;
    --primary-gradient: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
    --bg-main: #f8fbff;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-premium: 0 20px 40px -10px rgba(37, 99, 235, 0.15);
    --shadow-inner: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    display: flex;
    justify-content: center;
    color: var(--text-dark);
}

/* Animations (Premium Cubic-Bezier) */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes orb-float {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes rotate-3d-premium {
    0% { transform: perspective(1000px) rotateX(0deg) rotateY(0deg); }
    100% { transform: perspective(1000px) rotateX(5deg) rotateY(3deg); }
}

.mobile-wrapper {
    width: 100%;
    max-width: 480px;
    height: 100dvh;
    min-height: 100dvh;
    background: #fff;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 100px rgba(0,0,0,0.05);
    margin: 0 auto;
}

/* Background Orbs */
.bg-orb {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    filter: blur(50px);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    animation: orb-float 20s ease-in-out infinite;
}

.content-scroll {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 100px;
    scrollbar-width: none;
    perspective: 1500px;
    z-index: 1;
}

.content-scroll::-webkit-scrollbar { display: none; }

.balance-card {
    background: var(--primary-gradient);
    color: #fff;
    padding: 30px 22px;
    border-radius: 32px;
    margin: 5px 15px 15px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(37, 99, 235, 0.35);
    animation: rotate-3d-premium 6s ease-in-out infinite alternate, fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.2);
}

.balance-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.glow-text {
    text-shadow: 0 4px 12px rgba(255,255,255,0.3);
}

.btn-premium-ghost {
    flex: 1;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 12px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-premium-ghost:active {
    transform: scale(0.96);
    background: rgba(255,255,255,0.25);
}

/* Premium Stats Section */
.stats-container {
    display: flex;
    gap: 10px;
    padding: 0 15px 10px;
    animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.stat-premium-box {
    flex: 1;
    background: #fff;
    padding: 12px 10px;
    border-radius: 16px;
    box-shadow: var(--shadow-premium);
    border: 1px solid #f1f5f9;
    text-align: center;
}

.stat-icon-wrapper {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 5px;
}

/* Better 3D Action Grid */
.action-grid-premium {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0 15px 10px;
    animation: fadeInUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}

.action-card {
    background: #fff;
    border-radius: 16px;
    padding: 12px 10px;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.02), inset 0 -4px 0 rgba(0,0,0,0.03);
    border: 1px solid #f8fafc;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.action-card:active {
    transform: scale(0.92) translateY(3px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.02), inset 0 -1px 0 rgba(0,0,0,0.03);
}

.action-card i {
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 5px;
    display: block;
}

.action-card p {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dark);
}

/* Fintech Floating Bottom Nav */
.bottom-nav-fintech {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 70px;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 10px);
    border-top: 1px solid #f1f5f9;
    z-index: 10000;
    box-sizing: border-box;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.05);
}

@media screen and (min-width: 768px) {
    .bottom-nav-fintech {
        width: 480px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        padding: 5px 0 10px;
        min-height: 60px;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -15px 40px rgba(0,0,0,0.1);
        border: 1px solid #f1f5f9;
        border-bottom: none;
    }
}

.nav-item-f {
    width: 20%;
    text-align: center;
    color: #94a3b8;
    text-decoration: none;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.nav-item-f.active {
    color: var(--primary);
}

.nav-item-f.active::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 3px;
    background: var(--primary);
    border-radius: 10px;
    box-shadow: 0 0 10px var(--primary);
}

.nav-item-f i {
    font-size: 22px;
    margin-bottom: 2px;
    display: block;
}

.nav-center-premium {
    width: 58px;
    height: 58px;
    background: var(--primary-gradient);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: -45px;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
    border: 4px solid #fff;
    animation: float 4s ease-in-out infinite;
    margin-left: auto;
    margin-right: auto;
}

/* Glass Auth Upgrade */
.premium-auth-box {
    background: #fff;
    border-radius: 35px;
    padding: 40px;
    box-shadow: 0 30px 60px -12px rgba(0,0,0,0.1);
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.premium-input-group {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 0 20px;
    margin-bottom: 20px;
    height: 60px;
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

.premium-input-group:focus-within {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.05);
}

.btn-submit-premium {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    padding: 18px;
    border-radius: 20px;
    font-size: 17px;
    font-weight: 800;
    width: 100%;
    box-shadow: 0 15px 30px -5px rgba(37, 99, 235, 0.4);
    transition: all 0.3s;
}

/* Page Specific Components */
.page-main-title {
    text-align: center;
    color: var(--primary);
    font-size: 18px;
    font-weight: 800;
    padding: 15px 0 10px;
}

/* Asset Cards */
.asset-card-container {
    background: #fff;
    margin: 0 15px;
    padding: 20px 15px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.mini-card-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.mini-card {
    background: var(--primary-light);
    padding: 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
}

.mini-card i {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    margin-right: 10px;
}

.wide-card {
    background: var(--primary-light);
    padding: 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
}

.wide-card i {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #fef9e7;
    color: var(--gold);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    margin-right: 10px;
}

/* Menu Grid */
.menu-grid-custom {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding: 30px 20px;
    text-align: center;
}

/* Buttons */
.btn-primary-full {
    background: var(--primary);
    color: #fff;
    border: none;
    width: 100%;
    padding: 14px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 111, 0, 0.2);
    transition: transform 0.2s;
}

.btn-primary-full:active {
    transform: scale(0.98);
}

/* Premium Cashback Card Upgrade */
.cashback-card {
    background: var(--primary-gradient);
    color: #fff;
    padding: 18px 15px;
    border-radius: 20px;
    margin: 0 15px 15px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.25);
    border: 1px solid rgba(255,255,255,0.2);
}

.cashback-card::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.cashback-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    grid-template-rows: auto auto;
    gap: 10px;
    margin-top: 15px;
}

.inner-box {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.inner-box p:first-child {
    font-size: 9px;
    font-weight: 700;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.inner-box p:last-child {
    font-size: 16px;
    font-weight: 800;
}

.inner-box.large {
    grid-row: span 2;
    padding: 15px 12px;
}

.inner-box.large p:last-child {
    font-size: 22px;
}


.scroll-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 0 15px 15px;
    scrollbar-width: none;
}

.scroll-tabs::-webkit-scrollbar { display: none; }

.tab {
    background: #f7f7f7;
    color: #666;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.tab.active {
    background: var(--primary);
    color: #fff;
}

.claim-card {
    background: #fff;
    margin: 0 15px 10px;
    padding: 12px 15px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #f0f0f0;
}

.btn-claim {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 6px 15px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(255, 111, 0, 0.2);
}


/* Premium Modal Styles */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-container {
    background: #fff;
    width: 100%;
    max-width: 330px;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
    transform: translateY(30px) scale(0.9);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1.15);
}

.modal-overlay.active .modal-container {
    transform: translateY(0) scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #475569;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    border: none;
}

.modal-header-text {
    padding: 24px 20px 10px;
    font-size: 17px;
    font-weight: 800;
    color: var(--text-dark);
    text-align: center;
}

.modal-img-body {
    padding: 0 15px;
    max-height: 400px;
    overflow-y: auto;
}

.modal-img-body img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    display: block;
}

.modal-footer {
    padding: 20px;
}

.btn-modal-action {
    width: 100%;
    background: #10b981;
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    transition: all 0.3s;
}

.btn-modal-action:active {
    transform: scale(0.96);
}
