:root {
    --bg-dark: #0a0e17;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.12);
    --card-hover-border: rgba(255, 255, 255, 0.3);
    --accent-gold: #f59e0b;
    --accent-purple: #8b5cf6;
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* جلوگیری کامل از اسکرول X و Y */
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* نویز و هاله‌های رنگی شناور مدرن در پس‌زمینه */
.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
    animation: floatGlow 12s ease-in-out infinite alternate;
}
.glow-1 {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, #6366f1, #3b82f6);
    top: -60px;
    right: -60px;
}
.glow-2 {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, #ec4899, #8b5cf6);
    bottom: -80px;
    left: -80px;
    animation-delay: -6s;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(25px, -20px) scale(1.1); }
}

/* کانتینر اصلی اپلیکیشن */
.app-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    max-height: 100vh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10px 16px;
    box-sizing: border-box;
    margin: auto;
}

/* بخش هدر برندینگ */
.brand-header {
    text-align: center;
    padding: 6px 0;
}
.avatar-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 8px auto;
    padding: 2.5px;
    background: linear-gradient(135deg, #f59e0b, #ec4899, #8b5cf6);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.25);
    position: relative;
}
.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background-color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
}
.brand-name {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.verified-badge {
    color: #38bdf8;
    font-size: 0.95rem;
}
.brand-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
    font-weight: 400;
}

/* ساختار گرید بدون نیاز به اسکرول */
.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto 1fr 1fr;
    gap: 11px;
    flex-grow: 1;
    margin: 10px 0;
}

/* کارت‌ها و افکت گلس مورفیسم */
.grid-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 14px 15px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.grid-card:active {
    transform: scale(0.975);
    border-color: var(--card-hover-border);
}

/* کارت ویژه (کاتالوگ هوشمند) */
.card-hero {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.22) 0%, rgba(59, 130, 246, 0.14) 100%), var(--card-bg);
    border: 1px solid rgba(167, 139, 250, 0.35);
    box-shadow: 0 10px 30px -10px rgba(124, 58, 237, 0.3);
    padding: 16px 18px;
}
.card-hero .card-content {
    display: flex;
    align-items: center;
    gap: 14px;
}
.card-hero .icon-box {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
    flex-shrink: 0;
}
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #a7f3d0;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 30px;
    padding: 2px 8px;
    width: fit-content;
    margin-bottom: 4px;
}
.live-dot {
    width: 5px;
    height: 5px;
    background-color: #10b981;
    border-radius: 50%;
    animation: pulse 1.8s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.7); }
}

/* بقیه کارت‌ها */
.icon-box-small {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 10px;
}
.icon-bale {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}
.icon-store {
    background: linear-gradient(135deg, #3b82f6, #0284c7);
    color: #fff;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}
.icon-trust {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}
.icon-pay {
    background: linear-gradient(135deg, #ec4899, #db2777);
    color: #fff;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 2px;
}
.card-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.card-arrow {
    position: absolute;
    left: 12px;
    bottom: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
}
.grid-card:hover .card-arrow {
    transform: translateX(-3px);
    color: #fff;
}

/* فوتر مینی‌مال */
.footer-bar {
    text-align: center;
    padding: 6px 0 2px 0;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.2px;
}