/* --- CSS Variables --- */
:root {
    --bg: #f3f4f6;
    --card-bg: #ffffff;
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --success: #10b981;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', system-ui, sans-serif; }

body { background-color: var(--bg); color: var(--text-main); -webkit-font-smoothing: antialiased; }

/* --- Layout & Screens --- */
.screen { min-height: 100vh; display: flex; flex-direction: column; }
.hidden { display: none !important; }
.container { padding: 16px; max-width: 600px; margin: 0 auto; width: 100%; flex: 1; }

/* --- Login Screen --- */
#loginScreen { justify-content: center; align-items: center; padding: 20px; }
.login-card { background: var(--card-bg); padding: 40px 20px; border-radius: 16px; text-align: center; box-shadow: 0 10px 25px rgba(0,0,0,0.05); width: 100%; max-width: 400px; }
.login-card h1 { color: var(--primary); margin-bottom: 10px; font-size: 2rem; }
.login-card p { color: var(--text-muted); margin-bottom: 30px; }

/* --- Header --- */
.app-header { background: var(--card-bg); padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.app-header h2 { color: var(--primary); font-size: 1.2rem; }

/* --- Cards --- */
.card { background: var(--card-bg); border-radius: 12px; padding: 20px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); border: 1px solid var(--border); }
.section-title { font-size: 0.9rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; margin-bottom: 12px; letter-spacing: 0.5px; }

/* --- Wallet Section --- */
.wallet-card { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }
.greeting { display: block; font-size: 0.9rem; color: var(--text-muted); }
.balance { font-size: 1.4rem; font-weight: 700; color: var(--text-main); margin-top: 4px; }

/* --- Inputs & Buttons --- */
.input-group { display: flex; gap: 8px; }
input[type="text"] { flex: 1; padding: 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--primary); outline: none; background: #f9fafb; min-width: 0; /* Prevents overflow on mobile */ }

button { cursor: pointer; font-weight: 600; border-radius: 8px; border: none; display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 15px; transition: 0.2s; }
.primary-btn { background: var(--primary); color: white; padding: 14px 24px; }
.primary-btn:hover { background: var(--primary-hover); }
.primary-btn:disabled { background: #a5b4fc; cursor: not-allowed; }
.action-btn { background: #eff6ff; color: var(--primary); padding: 14px 20px; }
.outline { border: 2px solid var(--border); background: transparent; color: var(--text-main); }
.text-btn { background: transparent; color: var(--text-muted); padding: 8px; }
.full-width { width: 100%; }
.mt-10 { margin-top: 10px; }

/* --- Inbox Section --- */
.inbox-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.icon-btn { background: transparent; color: var(--primary); padding: 5px; font-size: 0.9rem; }
.email-list { list-style: none; }
.email-item { padding: 15px 0; border-bottom: 1px solid var(--border); }
.email-item:last-child { border-bottom: none; }
.email-sender { font-weight: 600; display: block; margin-bottom: 4px; color: var(--text-main); }
.email-subject { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 10px; }
.email-body { margin-top: 15px; padding: 15px; background: #f9fafb; border-radius: 8px; border: 1px dashed #d1d5db; display: none; overflow-x: auto; max-height: 400px; overflow-y: auto; font-size: 0.9rem; }
#loader { text-align: center; color: var(--text-muted); font-size: 0.9rem; padding: 20px; }
/* --- Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px); /* Premium blur effect */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    width: 100%;
    max-width: 350px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: popIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.modal-header h3 { color: var(--primary); margin: 0; }

.modal-body { padding: 24px 20px; text-align: center; }

.modal-body p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; line-height: 1.5; }

.timer-display { font-size: 2.5rem; color: #f59e0b; margin: 15px 0; font-weight: bold; }

.success-btn { background: var(--success); color: white; padding: 14px 24px; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; width: 100%; transition: 0.2s; }
.success-btn:hover { background: #059669; }

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}
/* Email list par smooth transition */
.email-list {
    transition: filter 0.3s ease-in-out;
}

/* Lock overlay ko perfect center karne ke liye */
#inboxLockOverlay {
    transition: opacity 0.3s ease;
}

/* Red color for expired text */
.expired-text {
    color: #ef4444 !important;
    font-weight: bold;
}

/* --- Google Login Button Styling --- */
.google-btn {
    background-color: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.google-btn:hover {
    background-color: #f8f9fa;
    box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
}

.google-btn img {
    width: 20px;
    height: 20px;
}

/* Ensure login card content is perfectly centered */
.login-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* =========================================
   🚀 PREMIUM LOGIN SCREEN STYLES
   ========================================= */

/* Soft animated gradient background */
.login-bg {
    background: linear-gradient(135deg, #e0e7ff 0%, #ede9fe 100%);
    position: relative;
    overflow: hidden;
}

/* Glassmorphism Card Effect */
.premium-card {
    background: rgba(255, 255, 255, 0.85); /* Slightly transparent */
    backdrop-filter: blur(12px); /* Apple-style blur */
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15); /* Deep soft shadow */
    border-radius: 24px; /* More rounded corners */
    padding: 40px 30px;
    text-align: center;
    width: 100%;
    max-width: 380px;
    /* Smooth slide-up animation on load */
    animation: floatUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Floating Logo Box */
.logo-container {
    width: 75px;
    height: 75px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 20px auto;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.tagline {
    color: #4b5563;
    font-size: 0.95rem;
    margin-bottom: 25px;
}

/* Mini Feature List */
.features-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
    text-align: left;
    background: rgba(255, 255, 255, 0.5);
    padding: 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.feature-item {
    font-size: 0.9rem;
    color: #374151;
    font-weight: 600;
}

/* Trust Badge at the bottom */
.trust-badge {
    margin-top: 25px;
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* The Slide-Up Animation */
@keyframes floatUp {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}
/* =========================================
   🚀 VANILLA CSS PREMIUM LOGIN
   ========================================= */

/* Background */
.premium-bg {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    min-height: 100vh;
}

/* The Main Card */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border-radius: 32px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Logo */
.logo-circle {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px auto;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.logo-circle svg { width: 32px; height: 32px; color: #4f46e5; }

/* Typography */
.brand-title {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}
.brand-tagline {
    text-align: center;
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 32px;
}

/* Feature Grid */
.feature-container { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }

.feature-box {
    display: flex;
    align-items: center;
    padding: 16px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}
.feature-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 16px;
}
.icon-circle svg { width: 20px; height: 20px; }

/* Icon Colors matching screenshot */
.icon-blue { background: #eef2ff; color: #4f46e5; }
.icon-yellow { background: #fffbeb; color: #f59e0b; }
.icon-green { background: #ecfdf5; color: #10b981; }

.feature-text h3 { font-size: 14px; font-weight: 700; color: #1e293b; margin-bottom: 2px; }
.feature-text p { font-size: 12px; color: #64748b; }

/* Action Area */
.action-divider {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.google-login-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-weight: 700;
    font-size: 15px;
    padding: 14px 20px;
    border-radius: 16px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
}
.google-login-btn:hover { background: #f8fafc; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); }

/* Trust Signals */
.trust-banner {
    margin-top: 24px;
    padding: 14px;
    background: #f0fdf4;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.trust-banner svg { width: 16px; height: 16px; color: #16a34a; }
.trust-banner span { font-size: 12px; font-weight: 700; color: #166534; }

.footer-note {
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 16px;
    font-weight: 500;
}

.dev-name {
    color: #4f46e5;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.insta-link {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    text-decoration: none !important;
    color: #1e293b !important;
    transition: all 0.3s ease;
}

.insta-link:hover {
    background: #ffffff;
    border-color: #f09433; /* Instagram theme color */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 148, 51, 0.15);
    color: #bc2a8d !important; /* Instagram gradient feel */
}

.insta-link svg {
    transition: stroke 0.3s ease;
}

.insta-link:hover svg {
    stroke: #bc2a8d;
}

.footer-bottom p {
    font-weight: 500;
    color: #64748b;
}
.app-footer a:hover {
    color: #bc2a8d !important; /* Instagram Pink */
    text-decoration: underline !important;
}