@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* 1. GLOBAL RESET - FIXED FOR FULLSCREEN */
html, body { 
    margin: 0; 
    padding: 0;
    width: 100%;
    height: 100%;
    overscroll-behavior: none; 
    overflow: hidden; 
    background-color: #f3f4f6; 
}

body { 
    font-family: 'Inter', sans-serif; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    min-height: 100dvh; 
    color: #111827; 
}

/* 2. THE APP CONTAINER - ADAPTIVE */
.app-container { 
    width: 100%; 
    max-width: 420px; /* Desktop width */
    height: 100%;
    max-height: 850px; /* Desktop height */
    background: #ffffff; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    position: relative; 
    border-radius: 32px; 
    border: 8px solid #f3f4f6; 
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); 
    box-sizing: border-box;
}

/* 3. MOBILE FULLSCREEN OVERRIDE (The Fix for your screenshots) */
/* FORCE FULLSCREEN ON MOBILE */
@media (max-width: 500px) {
    body {
        align-items: flex-start !important;
        background: #ffffff !important;
    }
    .app-container {
        max-width: 100% !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        border: none !important;
    }
}

/* Scrollable area between Header and Footer */
.main-content-scroll {
    flex-grow: 1;
    overflow-y: auto;
    padding-bottom: 80px; /* Space for footer */
    -webkit-overflow-scrolling: touch;
}

/* FIX FOOTER POSITION */
.app-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 75px;
    background: #ffffff;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 999;
    padding-bottom: env(safe-area-inset-bottom);
}

/* FIX QR BOX */
.address-box {
    background: #f3f6ff;
    padding: 15px;
    border-radius: 12px;
    font-size: 13px;
    color: #3375bb;
    word-break: break-all;
    font-family: monospace;
}

/* Ensure these pages behave like the dashboard */
.auth-wrapper, .send-form, .receive-content {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
}

/* 4. CONTENT AREA (Scrollable) */
.asset-list { 
    background: #f9fafb; 
    border-top-left-radius: 24px; 
    border-top-right-radius: 24px; 
    flex-grow: 1; 
    padding: 20px; 
    display: block; 
    /* This allows internal scrolling while keeping header/footer locked */
    overflow-y: auto; 
    padding-bottom: 90px; 
    -webkit-overflow-scrolling: touch; /* Smooth scroll for iOS */
}

/* AUTH PAGES (Login/Register) */
.auth-wrapper { 
    padding: 40px 30px; 
    text-align: center; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    flex-grow: 1; 
    overflow-y: auto;
}

.auth-wrapper h2 { font-size: 24px; font-weight: 700; margin-bottom: 25px; }

/* FORM STYLING */
.input-group { margin-bottom: 15px; width: 100%; }

input[type="text"], 
input[type="password"], 
input[type="number"] { 
    width: 100%; 
    padding: 16px; 
    background: #f9fafb; 
    border: 1px solid #e5e7eb; 
    border-radius: 16px; 
    font-size: 16px; 
    font-family: 'Inter', sans-serif; 
    box-sizing: border-box; 
    transition: all 0.3s; 
    display: block;
}

input:focus { 
    outline: none; 
    border-color: #056bfd; 
    background: #ffffff; 
    box-shadow: 0 0 0 4px rgba(5, 107, 253, 0.1);
}

.btn-primary { 
    width: 100%; 
    padding: 16px; 
    background: #056bfd; 
    color: white; 
    border: none; 
    border-radius: 20px; 
    font-size: 16px; 
    font-weight: 600; 
    cursor: pointer; 
    margin-top: 15px; 
}

.btn-primary:hover { background: #0458d1; }
.link-text { margin-top: 25px; font-size: 14px; color: #6b7280; }
.link-text a { color: #056bfd; text-decoration: none; font-weight: 600; }

/* DASHBOARD & COIN DETAILS */
.dash-header { display: flex; justify-content: space-between; padding: 25px 20px 10px; font-weight: 600; font-size: 18px; align-items: center; }
.dash-balance-sec { text-align: center; padding: 20px; }
.dash-balance-sec .total-usd { font-size: 42px; font-weight: 700; margin: 5px 0; color: #111827; }
.action-row { display: flex; justify-content: center; gap: 25px; padding: 20px; }
.action-btn { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: #056bfd; cursor: pointer; }
.action-icon { width: 50px; height: 50px; background: #e6f0ff; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 20px; color: #056bfd; }

.asset-list h3 { font-size: 14px; color: #6b7280; margin: 0 0 15px 0; text-align: left; font-weight: 600; }
.asset-item { background: white; padding: 15px; border-radius: 16px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; cursor: pointer; border: 1px solid transparent; }
.asset-left { display: flex; align-items: center; gap: 15px; }
.asset-left img { width: 40px; height: 40px; border-radius: 50%; }
.asset-name { font-weight: 600; font-size: 16px; color: #111827; }
.asset-price { font-size: 13px; color: #6b7280; }
.asset-right { text-align: right; }
.asset-qty { font-weight: 600; font-size: 15px; color: #111827; }
.address-box { background: #e0e7ff; padding: 12px; border-radius: 12px; margin: 10px auto; font-size: 11px; color: #3730a3; word-break: break-all; text-align: center; font-family: monospace; max-width: 80%; cursor: pointer; }
.secret-box { background: #fee2e2; padding: 15px; border-radius: 12px; margin-top: 20px; font-size: 13px; color: #991b1b; text-align: left; }

/* TAB NAVIGATION */
.tab-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 0 5px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}
.tab-container::-webkit-scrollbar { display: none; } /* Hide scrollbar for tabs */

.tab-item {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    padding: 8px 16px;
    background: #f3f4f6;
    border-radius: 20px;
    cursor: pointer;
}
.tab-item.active { background: #056bfd; color: white; }

/* STICKY FOOTER */
.app-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 75px;
    background: #ffffff;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom); /* Fix for iPhone Notch */
}

.footer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    color: #9ca3af;
    text-decoration: none;
}
.footer-item.active { color: #056bfd; }
.footer-item i { font-size: 22px; }