/* ==========================================================
   Vibe Messenger - Landing Page Stylesheet
   Modern, Glassmorphism, Dark Aesthetic
   ========================================================== */

:root {
    --bg-dark: #07090e;
    --bg-card: rgba(18, 22, 34, 0.65);
    --bg-card-hover: rgba(28, 34, 52, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(99, 102, 241, 0.3);
    
    /* Brand Colors */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --cyan-glow: #06b6d4;
    
    /* Store Brands */
    --bazaar-color: #10b981;
    --bazaar-bg: rgba(16, 185, 129, 0.12);
    --bazaar-border: rgba(16, 185, 129, 0.3);
    
    --myket-color: #0ea5e9;
    --myket-bg: rgba(14, 165, 233, 0.12);
    --myket-border: rgba(14, 165, 233, 0.3);

    /* Text */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 32px;

    --font-fa: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-en: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

button, input, select, textarea {
    font-family: var(--font-fa) !important;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-fa);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Ambient Glows */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.45;
}

.glow-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #6366f1 0%, transparent 70%);
    top: -150px;
    right: -100px;
}

.glow-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #a855f7 0%, transparent 70%);
    top: 40%;
    left: -200px;
}

.glow-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
    bottom: 50px;
    right: 15%;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ==========================================================
   Navigation Bar
   ========================================================== */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(7, 9, 14, 0.75);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
}

.brand-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    transition: transform 0.3s ease;
}

.brand:hover .brand-icon {
    transform: scale(1.06) rotate(-3deg);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: var(--font-en);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: 0.5px;
    background: linear-gradient(120deg, #fff 30%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-sub {
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #fff;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* ==========================================================
   Buttons
   ========================================================== */
.btn {
    font-family: var(--font-fa) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.88rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.05rem;
}

/* ==========================================================
   Hero Section
   ========================================================== */
.hero-section {
    padding: 80px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 60px;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 999px;
    font-size: 0.85rem;
    color: #c7d2fe;
    margin-bottom: 24px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 10px #38bdf8;
    animation: pulse 2s infinite;
}

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

.hero-title {
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.gradient-text {
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.12rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 36px;
    max-width: 580px;
}

/* ==========================================================
   Download Cards
   ========================================================== */
.downloads-wrapper {
    margin-bottom: 40px;
}

.download-heading {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.buttons-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 520px;
}

.download-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-main);
    backdrop-filter: blur(16px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.download-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.download-card:hover::before {
    transform: translateX(100%);
}

.download-card:hover {
    transform: translateY(-3px) scale(1.01);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-icon svg {
    width: 26px;
    height: 26px;
}

/* Direct Download Styling */
.btn-direct {
    border-color: rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
}

.btn-direct .card-icon {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-direct:hover {
    border-color: var(--primary-light);
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.3);
}

/* Cafe Bazaar Styling */
.btn-bazaar {
    border-color: var(--bazaar-border);
    background: var(--bazaar-bg);
}

.bazaar-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-bazaar:hover {
    border-color: #34d399;
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.25);
}

/* Myket Styling */
.btn-myket {
    border-color: var(--myket-border);
    background: var(--myket-bg);
}

.myket-icon {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-myket:hover {
    border-color: #38bdf8;
    box-shadow: 0 12px 35px rgba(14, 165, 233, 0.25);
}

.card-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-sub {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin: 1px 0;
}

.card-badge {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.card-arrow {
    color: var(--text-dim);
    transition: transform 0.25s ease, color 0.25s ease;
}

.download-card:hover .card-arrow {
    transform: translateX(-4px);
    color: #fff;
}

/* ABI Specific Downloads Box */
.abi-downloads-box {
    margin-top: 14px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
}

.abi-downloads-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: 500;
}

.abi-downloads-header svg {
    color: var(--primary-light);
}

.abi-chips-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
}

.abi-chip {
    display: flex;
    flex-direction: column;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.abi-chip:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.abi-chip-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    font-family: var(--font-en);
    direction: ltr;
    text-align: right;
}

.abi-chip-sub {
    font-size: 0.68rem;
    color: var(--text-dim);
    margin-top: 2px;
}

.abi-chip:hover .abi-chip-sub {
    color: var(--primary-light);
}

/* Trust Stats */
.trust-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-top: 10px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-en);
    font-weight: 800;
    font-size: 1.25rem;
    color: #fff;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-dim);
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: var(--border-color);
}

/* ==========================================================
   Hero Visual - Smartphone Mockup
   ========================================================== */
.hero-visual {
    display: flex;
    justify-content: center;
    position: relative;
}

.phone-frame-wrapper {
    position: relative;
    width: 320px;
    animation: floatPhone 6s ease-in-out infinite;
}

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

.phone-aura {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, rgba(168, 85, 247, 0.2) 50%, transparent 70%);
    filter: blur(40px);
    z-index: 0;
}

.phone-frame {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 610px;
    background: #0d111c;
    border-radius: 46px;
    border: 8px solid #1e2638;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), inset 0 0 15px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.phone-speaker {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 5px;
    background: #2b354c;
    border-radius: 10px;
    z-index: 10;
}

.phone-screen {
    flex: 1;
    background: linear-gradient(180deg, #101524 0%, #0a0d16 100%);
    display: flex;
    flex-direction: column;
    padding-top: 24px;
}

.app-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(18, 24, 38, 0.9);
    border-bottom: 1px solid var(--border-color);
}

.app-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #fff;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-en);
}

.app-user-info {
    flex: 1;
}

.app-username {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
}

.app-status {
    font-size: 0.7rem;
    color: #38bdf8;
}

.app-call-icon {
    color: var(--text-muted);
}

.app-chat-body {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-bubble {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.82rem;
    position: relative;
    line-height: 1.5;
}

.chat-bubble.incoming {
    align-self: flex-start;
    background: #1b2234;
    color: #e2e8f0;
    border-bottom-left-radius: 4px;
}

.chat-bubble.outgoing {
    align-self: flex-end;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.bubble-time {
    display: block;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    text-align: left;
}

.file-bubble {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-icon {
    font-size: 1.4rem;
}

.file-info {
    display: flex;
    flex-direction: column;
}

.file-size {
    font-size: 0.7rem;
    color: var(--text-dim);
}

.floating-badge-card {
    margin: 10px 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(56, 189, 248, 0.3);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-info strong {
    font-size: 0.75rem;
    color: #fff;
    display: block;
}

.badge-info p {
    font-size: 0.68rem;
    color: var(--text-dim);
}

/* Floating Badges outside phone */
.floating-tag {
    position: absolute;
    padding: 8px 14px;
    background: rgba(18, 24, 38, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 0.82rem;
    color: #fff;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 5;
    animation: tagFloat 5s ease-in-out infinite alternate;
}

.tag-speed {
    top: 60px;
    right: -25px;
}

.tag-cloud {
    bottom: 80px;
    left: -25px;
    animation-delay: -2.5s;
}

@keyframes tagFloat {
    from { transform: translateY(0); }
    to { transform: translateY(-8px); }
}

/* ==========================================================
   Features Section
   ========================================================== */
.features-section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 60px;
}

.section-tag {
    display: inline-block;
    color: var(--primary-light);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.section-title {
    font-size: 2.3rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.35;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    backdrop-filter: blur(16px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.feature-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}

.feature-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ==========================================================
   Specs Section
   ========================================================== */
.specs-section {
    padding: 40px 0 80px;
}

.specs-card {
    background: linear-gradient(135deg, rgba(20, 26, 42, 0.8) 0%, rgba(13, 17, 28, 0.8) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.specs-info h3 {
    font-size: 1.6rem;
    color: #fff;
    margin-bottom: 10px;
}

.specs-info p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

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

.spec-row {
    display: flex;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.spec-key {
    color: var(--text-muted);
    font-weight: 500;
}

.spec-val {
    color: #fff;
    font-weight: 700;
    font-family: var(--font-en);
}

/* ==========================================================
   FAQ Section
   ========================================================== */
.faq-section {
    padding: 80px 0;
}

.faq-accordion {
    max-width: 780px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.25s ease;
}

.faq-question {
    width: 100%;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    color: #fff;
    font-family: var(--font-fa);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    text-align: right;
}

.faq-toggle {
    font-size: 1.4rem;
    color: var(--primary-light);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
    padding: 0 24px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
}

.faq-item.active .faq-answer {
    max-height: 250px;
    padding-bottom: 20px;
}

/* ==========================================================
   CTA Section
   ========================================================== */
.cta-section {
    padding: 60px 0 100px;
}

.cta-card {
    background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.3) 0%, rgba(13, 17, 28, 0.9) 70%);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: var(--radius-xl);
    padding: 70px 40px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.cta-content h2 {
    font-size: 2.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
}

.cta-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 36px;
}

.cta-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ==========================================================
   Footer
   ========================================================== */
.footer {
    border-top: 1px solid var(--border-color);
    background: rgba(5, 7, 12, 0.95);
    padding: 60px 0 24px;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-desc {
    color: var(--text-dim);
    margin-top: 14px;
    max-width: 380px;
    font-size: 0.9rem;
}

.footer-links-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.footer-col h4 {
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    margin-bottom: 10px;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    padding-top: 24px;
}

.footer-bottom-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-dim);
    font-size: 0.85rem;
}

.footer-bottom-container a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-bottom-container a:hover {
    color: #fff;
}

/* ==========================================================
   Modals (Web Version Coming Soon & Legal Compliance)
   ========================================================== */
body.modal-open {
    overflow: hidden;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(5, 7, 14, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-card {
    background: linear-gradient(145deg, rgba(20, 26, 44, 0.96) 0%, rgba(11, 15, 26, 0.98) 100%);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: var(--radius-xl);
    padding: 40px 32px 32px;
    max-width: 480px;
    width: 100%;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 50px rgba(99, 102, 241, 0.2);
    transform: translateY(24px) scale(0.96);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

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

.modal-close-btn {
    font-family: var(--font-fa) !important;
    position: absolute;
    top: 18px;
    left: 18px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.web-version-trigger,
#legal-modal-close-btn,
#web-modal-ok-btn {
    font-family: var(--font-fa) !important;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: rotate(90deg);
}

.modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.14);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 999px;
    color: var(--primary-light);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.modal-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 10px #38bdf8;
    animation: modalPulse 2s infinite ease-in-out;
}

@keyframes modalPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
}

.modal-icon-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.modal-icon-glow {
    position: absolute;
    inset: -6px;
    border-radius: 28px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.45) 0%, transparent 70%);
    filter: blur(12px);
}

.modal-icon {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(168, 85, 247, 0.25) 100%);
    border: 1px solid rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.modal-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 14px;
    line-height: 1.4;
}

.modal-desc {
    color: var(--text-muted);
    font-size: 0.93rem;
    line-height: 1.8;
    margin-bottom: 22px;
}

.modal-note {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.3);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    color: #7dd3fc;
    font-size: 0.85rem;
    text-align: right;
    margin-bottom: 24px;
    line-height: 1.6;
}

.modal-note svg {
    flex-shrink: 0;
    color: #38bdf8;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-actions .btn {
    flex: 1;
}

/* Footer Link Button (Reset Button to look like standard anchor) */
.footer-link-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-fa);
    font-size: 0.88rem;
    padding: 0;
    text-align: right;
    cursor: pointer;
    transition: color 0.2s ease;
    margin-bottom: 10px;
    display: block;
}

.footer-link-btn:hover {
    color: var(--primary-light);
}

/* ==========================================================
   Legal Modal (Privacy & Terms Comprehensive View)
   ========================================================== */
.legal-modal-card {
    max-width: 880px;
    width: 95%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    text-align: right;
    overflow: hidden;
}

.legal-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(13, 17, 28, 0.95);
    position: relative;
    z-index: 2;
}

.legal-modal-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.legal-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-fa);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.legal-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.legal-tab.active {
    color: #fff;
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.15);
}

.legal-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px 36px;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.5) rgba(15, 20, 32, 0.8);
}

.legal-modal-body::-webkit-scrollbar {
    width: 8px;
}

.legal-modal-body::-webkit-scrollbar-track {
    background: rgba(15, 20, 32, 0.8);
}

.legal-modal-body::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.4);
    border-radius: 4px;
}

.legal-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.7);
}

.legal-tab-content {
    display: none;
}

.legal-tab-content.active {
    display: block;
    animation: legalFadeIn 0.25s ease;
}

@keyframes legalFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.legal-doc-header {
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
    margin-bottom: 12px;
}

.legal-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.4;
}

.legal-meta {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.6;
}

.legal-section {
    margin-bottom: 26px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    padding: 20px 22px;
}

.legal-section:hover {
    border-color: rgba(99, 102, 241, 0.2);
}

.legal-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.legal-section p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.85;
    margin-bottom: 10px;
}

.legal-section ul {
    list-style: none;
    padding-right: 0;
    margin-top: 10px;
}

.legal-section li {
    position: relative;
    padding-right: 22px;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 10px;
}

.legal-section li::before {
    content: "■";
    position: absolute;
    right: 4px;
    top: 0;
    color: var(--primary);
    font-size: 0.65rem;
}

.legal-section strong {
    color: #fff;
}

.legal-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(13, 17, 28, 0.95);
}

.legal-last-updated {
    font-size: 0.78rem;
    color: var(--text-dim);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.85rem;
}

/* ==========================================================
   Responsive Styles (Desktop, Tablet, Mobile, Foldables)
   ========================================================== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
    }

    .hero-desc {
        margin: 0 auto 36px;
    }

    .buttons-grid {
        margin: 0 auto;
    }

    .trust-stats {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .specs-card {
        grid-template-columns: 1fr;
        padding: 28px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-bottom-container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .phone-frame-wrapper {
        width: 280px;
    }

    .phone-frame {
        height: 540px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .navbar {
        padding: 14px 16px;
    }

    .brand-name {
        font-size: 1.25rem;
    }

    .nav-actions .btn {
        padding: 7px 12px;
        font-size: 0.8rem;
    }

    .hero-section {
        padding: 100px 0 50px;
    }

    .hero-badge {
        font-size: 0.78rem;
        padding: 5px 12px;
    }

    .hero-title {
        font-size: clamp(1.8rem, 7vw, 2.3rem);
        line-height: 1.35;
    }

    .hero-desc {
        font-size: 0.95rem;
        line-height: 1.7;
        margin-bottom: 28px;
    }

    .buttons-grid {
        grid-template-columns: 1fr;
        width: 100%;
        gap: 16px;
    }

    .download-card {
        padding: 20px 18px;
    }

    .trust-stats {
        flex-direction: column;
        gap: 14px;
        width: 100%;
        padding-top: 24px;
    }

    .stat-item {
        width: 100%;
        justify-content: center;
    }

    .phone-frame-wrapper {
        width: 260px;
    }

    .phone-frame {
        height: 500px;
    }

    .tag-floating {
        display: none;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .specs-card {
        padding: 22px 18px;
    }

    .spec-row {
        font-size: 0.9rem;
    }

    .faq-question {
        padding: 16px 18px;
        font-size: 0.95rem;
    }

    .cta-card {
        padding: 40px 20px;
    }

    .cta-content h2 {
        font-size: 1.75rem;
    }

    .cta-content p {
        font-size: 0.95rem;
        margin-bottom: 28px;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .cta-buttons .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .footer {
        padding: 45px 0 20px;
    }

    .footer-links-group {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    /* Modal Mobile Adjustments */
    .modal-card {
        padding: 30px 18px 24px;
        border-radius: var(--radius-lg);
    }

    .modal-actions {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .modal-actions .btn {
        width: 100%;
    }

    .legal-modal-card {
        max-height: 92vh;
        border-radius: var(--radius-lg);
    }

    .legal-modal-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 16px;
    }

    .legal-modal-tabs {
        flex-direction: column;
        width: 100%;
        gap: 6px;
    }

    .legal-tab {
        width: 100%;
        justify-content: center;
        font-size: 0.82rem;
        padding: 8px 12px;
    }

    .legal-modal-body {
        padding: 18px 16px;
    }

    .legal-title {
        font-size: 1.25rem;
    }

    .legal-section {
        padding: 16px 14px;
    }

    .legal-section h3 {
        font-size: 1rem;
    }

    .legal-modal-footer {
        flex-direction: column-reverse;
        gap: 12px;
        text-align: center;
        padding: 12px 16px;
    }

    .legal-modal-footer .btn {
        width: 100%;
    }
}

@media (max-width: 360px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .download-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .phone-frame-wrapper {
        width: 230px;
    }

    .phone-frame {
        height: 440px;
    }
}
