:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --dark-text: #0f172a;
    --light-text: #64748b;
    --bg: #f8fafc;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; -webkit-tap-highlight-color: transparent; }
body { background: var(--bg); color: var(--dark-text); overflow-x: hidden; }

.container { max-width: 600px; margin: 0 auto; padding: 20px; }

/* --- PROFESSIONAL LOADER STYLES --- */
#loader {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Logo Box Animation */
.loader-logo-container {
    margin-bottom: 30px;
    position: relative;
    animation: loader-pulse 2s infinite ease-in-out;
}

.loader-main-icon {
    width: 85px;
    height: 85px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 26px; /* Smooth rounded corners */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 36px;
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.25);
}

/* Loader Ring */
.loader-ring {
    width: 28px;
    height: 28px;
    border: 3px solid #f1f5f9;
    border-top: 3px solid #10b981;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 15px;
}

/* Text Styling */
.loader-content h2 {
    font-size: 19px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.loader-content p {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

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

@keyframes loader-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.92); opacity: 0.85; }
}


/* Main Card */
.download-card { background: #fff; border-radius: 30px; padding: 25px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); border: 1px solid #f1f5f9; }
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.version-badge { background: #ecfdf5; color: #047857; padding: 6px 12px; border-radius: 100px; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; }

.share-circle-btn { width: 42px; height: 42px; border: none; background: #eff6ff; color: #2563eb; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 18px; transition: 0.3s; }

/* Header */
.header { display: flex; gap: 15px; align-items: center; margin-bottom: 25px; }
.app-icon { width: 70px; height: 70px; flex-shrink: 0; border-radius: 18px; overflow: hidden; box-shadow: 0 8px 15px rgba(16,185,129,0.15); }
.header h1 { font-size: 22px; font-weight: 800; color: #0f172a; }
.header p { font-size: 14px; color: var(--light-text); line-height: 1.5; margin-top: 4px; }

/* SLEEK TOP PILLS */
.info-pill-container { display: flex; align-items: center; justify-content: center; background: #f1f5f9; border-radius: 100px; padding: 4px 10px; width: fit-content; margin: 0 auto 25px; border: 1px solid #e2e8f0; }
.pill-btn { background: none; border: none; font-size: 12px; font-weight: 700; color: #475569; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 6px 12px; }
.pill-btn i { color: var(--primary); }
.pill-divider { width: 1px; height: 14px; background: #cbd5e1; }

/* APP INFO CARDS */
.app-info-card { background: #fff; border: 1px solid #f1f5f9; border-radius: 22px; padding: 20px; margin-bottom: 15px; box-shadow: 0 4px 6px rgba(0,0,0,0.01); transition: 0.3s; position: relative; overflow: hidden; }
.card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.card-icon-wrap { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.badge-new { font-size: 10px; font-weight: 800; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; margin-bottom: 2px; display: inline-block; }
.card-meta h4 { font-size: 16px; font-weight: 700; color: #0f172a; }
.card-text { font-size: 13px; color: var(--light-text); line-height: 1.6; margin-bottom: 15px; }
.card-footer { display: flex; gap: 8px; }
.btn-download { flex: 1; color: white; text-align: center; text-decoration: none; padding: 12px; border-radius: 12px; font-size: 14px; font-weight: 700; background: var(--primary); transition: 0.2s; }
.btn-info-small { width: 44px; border: none; background: #f8fafc; color: #64748b; border-radius: 12px; cursor: pointer; font-size: 16px; border: 1px solid #f1f5f9; }

/* WHATSAPP BUTTON */
.whatsapp { background: linear-gradient(135deg, #10b981, #059669); color: #fff; padding: 16px; border-radius: 18px; text-decoration: none; display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.btn-flex { display: flex; align-items: center; gap: 12px; }
.whatsapp .icon-wrap { width: 40px; height: 40px; background: rgba(255,255,255,0.2); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.text-wrap small { font-size: 10px; opacity: 0.8; font-weight: 600; text-transform: uppercase; }
.text-wrap span { font-size: 15px; font-weight: 700; }

/* MODAL STYLING - THE FIX */
.modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.7); backdrop-filter: blur(5px); display: flex; align-items: flex-end; justify-content: center; z-index: 1000; opacity: 0; visibility: hidden; transition: 0.3s; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content { background: #fff; width: 100%; max-width: 500px; border-radius: 30px 30px 0 0; transform: translateY(100%); transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); padding-bottom: 20px; }
.modal-overlay.active .modal-content { transform: translateY(0); }

.modal-header { padding: 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f1f5f9; }
.modal-title-box { display: flex; align-items: center; gap: 12px; }
.modal-icon-circle { width: 42px; height: 42px; background: var(--primary); color: #fff; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.modal-title-box h2 { font-size: 17px; font-weight: 800; }
.close-x { border: none; background: #f1f5f9; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }

.modal-body { padding: 20px; max-height: 70vh; overflow-y: auto; text-align: left; }
.modal-list { display: flex; flex-direction: column; gap: 18px; margin-top: 10px; }
.modal-list-item { display: flex; gap: 12px; align-items: flex-start; }
.item-icon { width: 28px; height: 28px; background: #f0fdf4; color: var(--primary); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; margin-top: 2px; }
.item-text b { display: block; font-size: 14px; color: #0f172a; margin-bottom: 2px; }
.item-text p { font-size: 13px; color: var(--light-text); line-height: 1.5; }

.modal-footer { padding: 0 20px 20px; }
.confirm-btn { width: 100%; padding: 16px; border: none; border-radius: 16px; background: #0f172a; color: #fff; font-weight: 700; cursor: pointer; display: flex; justify-content: center; gap: 10px; font-size: 15px; }

.hidden { display: none; }
