/* ============================================
   ASOSIY SOZLAMALAR
   ============================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --ig-orange: #f09433;
    --ig-red: #dc2743;
    --ig-purple: #bc1888;
    --ig-gradient: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    --bg: #f7f7fb;
    --text: #1a1a1a;
    --text-muted: #666;
    --border: #ececf3;
    --shadow-sm: 0 2px 8px rgba(20, 20, 40, 0.05);
    --shadow-md: 0 8px 24px rgba(20, 20, 40, 0.08);
    --shadow-lg: 0 16px 40px rgba(188, 24, 136, 0.12);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgba(240, 148, 51, 0.06), transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(188, 24, 136, 0.06), transparent 40%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    animation: bodyFadeIn 0.5s var(--ease);
}

@keyframes bodyFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes floatIn {
    from { opacity: 0; transform: scale(0.97) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes shimmerGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulseSoft {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 40px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    animation: fadeInUp 0.4s var(--ease);
}
.navbar .logo {
    font-weight: 700;
    font-size: 20px;
    background: var(--ig-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
}
.navbar a {
    text-decoration: none;
    color: #333;
    margin-left: 20px;
    font-weight: 500;
    position: relative;
    transition: color 0.2s var(--ease);
}
.navbar a:not(.btn)::after {
    content: '';
    position: absolute;
    left: 0; bottom: -4px;
    width: 0; height: 2px;
    background: var(--ig-gradient);
    transition: width 0.25s var(--ease);
}
.navbar a:not(.btn):hover { color: var(--ig-purple); }
.navbar a:not(.btn):hover::after { width: 100%; }

/* ============================================
   TUGMALAR
   ============================================ */
.btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--ig-gradient);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-size: 15px;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
    box-shadow: 0 4px 14px rgba(188, 24, 136, 0.25);
    will-change: transform;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(188, 24, 136, 0.35);
}
.btn:active { transform: translateY(0) scale(0.98); }
.btn.secondary {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    box-shadow: none;
}
.btn.secondary:hover {
    background: #faf7fa;
    border-color: var(--ig-purple);
    color: var(--ig-purple);
    box-shadow: 0 6px 16px rgba(20, 20, 40, 0.08);
}

/* ============================================
   HERO (bosh sahifa)
   ============================================ */
.hero {
    text-align: center;
    padding: 100px 20px 60px;
    max-width: 720px;
    margin: 0 auto;
    animation: floatIn 0.6s var(--ease);
}
.hero h1 {
    font-size: 42px;
    margin-bottom: 16px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}
.hero p { font-size: 18px; color: var(--text-muted); margin-bottom: 30px; }

/* ============================================
   KARTOCHKALAR (features, plans, dashboard)
   ============================================ */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto 60px;
    padding: 0 20px;
}
.feature-card {
    background: #fff;
    padding: 28px;
    border-radius: 14px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
    animation: fadeInUp 0.5s var(--ease) both;
    will-change: transform;
}
.features .feature-card:nth-child(1) { animation-delay: 0.05s; }
.features .feature-card:nth-child(2) { animation-delay: 0.15s; }
.features .feature-card:nth-child(3) { animation-delay: 0.25s; }
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(188, 24, 136, 0.25);
}
.feature-card h3 { margin-bottom: 8px; }

.plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    max-width: 700px;
    margin: 0 auto 60px;
    padding: 0 20px;
}
.plan-card {
    background: #fff;
    padding: 30px;
    border-radius: 14px;
    border: 1px solid var(--border);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
    animation: fadeInUp 0.5s var(--ease) both;
    position: relative;
    overflow: hidden;
    will-change: transform;
}
.plans .plan-card:nth-child(2) { animation-delay: 0.1s; }
.plan-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--ig-gradient);
    background-size: 200% 200%;
    opacity: 0;
    transition: opacity 0.3s var(--ease);
}
.plan-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
}
.plan-card:hover::before { opacity: 1; animation: shimmerGradient 3s ease infinite; }
.plan-card .price {
    font-size: 32px;
    font-weight: 700;
    margin: 10px 0;
    background: var(--ig-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ============================================
   FORMA KONTEYNERLARI
   ============================================ */
.container {
    max-width: 440px;
    margin: 60px auto;
    background: #fff;
    padding: 36px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    animation: floatIn 0.45s var(--ease);
}
.container.wide { max-width: 720px; }
h2 { margin-bottom: 20px; letter-spacing: -0.3px; }

label { display: block; margin: 14px 0 6px; font-weight: 500; font-size: 14px; color: #333; }

input, textarea, select {
    width: 100%;
    padding: 11px 13px;
    border: 1.5px solid #e2e2ec;
    border-radius: 9px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.15s var(--ease);
}
input:hover, textarea:hover, select:hover { border-color: #cfcfe0; }
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--ig-purple);
    box-shadow: 0 0 0 4px rgba(188, 24, 136, 0.1);
}
textarea { min-height: 100px; resize: vertical; }

form .btn { margin-top: 20px; width: 100%; text-align: center; }

/* ============================================
   XABAR BLOKLARI
   ============================================ */
.error, .success, .info {
    padding: 13px 15px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    animation: fadeInUp 0.35s var(--ease);
    border-left: 3px solid transparent;
}
.error { background: #fef2f2; color: #c0392b; border-left-color: #e74c3c; }
.success { background: #f0fbf4; color: #0a7a3d; border-left-color: #2ecc71; }
.info { background: #eff6ff; color: #1a4d8f; border-left-color: #3b82f6; }

/* ============================================
   DASHBOARD / ADMIN KARTOCHKALARI
   ============================================ */
.dashboard-card {
    background: #fff;
    padding: 24px;
    border-radius: 14px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s var(--ease);
    animation: fadeInUp 0.4s var(--ease) both;
    will-change: transform;
}
.dashboard-card:hover { box-shadow: var(--shadow-md); }
.container.wide > .dashboard-card:nth-of-type(1) { animation-delay: 0.05s; }
.container.wide > .dashboard-card:nth-of-type(2) { animation-delay: 0.15s; }

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    transition: transform 0.2s var(--ease);
}
.badge.paid { background: #e6f9ee; color: #0a7a3d; animation: pulseSoft 2.5s ease-in-out infinite; }
.badge.unpaid { background: #fdeeee; color: #c0392b; }

code {
    background: #f1f1f6;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 13px;
    color: #b6157e;
}
.mono-box {
    background: #1e1e2a;
    color: #d4d4e4;
    padding: 16px;
    border-radius: 10px;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 13px;
    overflow-x: auto;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
    animation: fadeInUp 0.4s var(--ease);
}

/* ============================================
   JADVAL (admin panel)
   ============================================ */
table { animation: fadeInUp 0.4s var(--ease) both; animation-delay: 0.1s; }
table tr { transition: background 0.2s var(--ease); }
table tr:hover td { background: #faf7fb; }
table td, table th { transition: background 0.2s var(--ease); }

/* ============================================
   RESPONSIV
   ============================================ */
@media (max-width: 640px) {
    .navbar { padding: 14px 18px; }
    .hero { padding: 60px 16px 40px; }
    .hero h1 { font-size: 30px; }
    .container { margin: 24px auto; padding: 24px; border-radius: 14px; }
}

/* ============================================
   HERO (ikki ustunli, illyustratsiya bilan)
   ============================================ */
.hero-wrap {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 70px 40px 40px;
    animation: floatIn 0.6s var(--ease);
}
.eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ig-purple);
    background: rgba(188, 24, 136, 0.08);
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 18px;
}
.hero-text h1 {
    font-size: 40px;
    line-height: 1.18;
    letter-spacing: -0.5px;
    margin-bottom: 18px;
}
.hero-text p {
    font-size: 17px;
    color: var(--text-muted);
    margin-bottom: 26px;
    max-width: 480px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-trust {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-muted);
}
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust i { color: var(--ig-purple); }

.hero-illustration {
    position: relative;
    display: flex;
    justify-content: center;
    animation: floatIn 0.7s var(--ease) 0.1s both;
}
.hero-illustration svg {
    width: 100%;
    max-width: 300px;
    filter: drop-shadow(0 20px 40px rgba(20, 20, 40, 0.15));
}
.hero-badge {
    position: absolute;
    bottom: 10px;
    left: -10px;
    background: #fff;
    border-radius: 12px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-md);
    font-size: 12px;
    animation: floatIn 0.6s var(--ease) 0.4s both, floatBob 3s ease-in-out 1s infinite;
}
.hero-badge i { color: #0a7a3d; font-size: 18px; }
.hero-badge strong { display: block; color: var(--text); }
.hero-badge span { color: var(--text-muted); }
@keyframes floatBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ============================================
   STATISTIKA PANELI
   ============================================ */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 20px auto 70px;
    padding: 30px 20px;
}
.stat { text-align: center; animation: fadeInUp 0.5s var(--ease) both; }
.stat strong {
    display: block;
    font-size: 28px;
    font-weight: 700;
    background: var(--ig-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stat span { font-size: 13px; color: var(--text-muted); }

/* ============================================
   BO'LIMLAR (umumiy)
   ============================================ */
.section { max-width: 1000px; margin: 0 auto; padding: 30px 20px 70px; }
.section-title { text-align: center; font-size: 30px; letter-spacing: -0.3px; }
.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 15px;
    margin: 8px 0 40px;
}

/* ============================================
   QANDAY ISHLAYDI (steps)
   ============================================ */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
}
.step {
    position: relative;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 30px 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
    animation: fadeInUp 0.5s var(--ease) both;
    will-change: transform;
}
.steps .step:nth-child(2) { animation-delay: 0.1s; }
.steps .step:nth-child(3) { animation-delay: 0.2s; }
.step:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.step-num {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ig-gradient);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(188, 24, 136, 0.3);
}
.step-icon { font-size: 30px; color: var(--ig-purple); margin: 14px 0 12px; }
.step h3 { font-size: 16px; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--text-muted); }

/* ============================================
   XUSUSIYAT IKONKALARI (mavjud .feature-card ustiga)
   ============================================ */
.feature-icon { font-size: 24px; color: var(--ig-purple); margin-bottom: 12px; display: block; }

/* ============================================
   TARIF KARTOCHKASI QO'SHIMCHALARI
   ============================================ */
.plan-card.featured { border: 2px solid var(--ig-purple); }
.plan-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--ig-gradient);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}
.plan-features {
    list-style: none;
    text-align: left;
    margin: 18px 0 22px;
    font-size: 14px;
    color: var(--text-muted);
}
.plan-features li { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.plan-features i { color: #0a7a3d; font-size: 13px; }

/* ============================================
   FAQ (accordion, JS'siz)
   ============================================ */
.faq { max-width: 700px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq details {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    transition: box-shadow 0.25s var(--ease);
}
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary {
    cursor: pointer;
    font-weight: 500;
    font-size: 15px;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: '+';
    font-size: 20px;
    color: var(--ig-purple);
    transition: transform 0.25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 12px; color: var(--text-muted); font-size: 14px; }

/* ============================================
   YAKUNIY CTA
   ============================================ */
.cta-final {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 80px;
    padding: 50px 30px;
    border-radius: 20px;
    background: var(--ig-gradient);
    color: #fff;
    animation: floatIn 0.5s var(--ease) both;
}
.cta-final h2 { font-size: 26px; margin-bottom: 10px; }
.cta-final p { opacity: 0.9; margin-bottom: 22px; }
.cta-final .btn { background: #fff; color: var(--ig-purple); box-shadow: 0 8px 20px rgba(0,0,0,0.15); }
.cta-final .btn:hover { background: #fff; color: var(--ig-purple); }

/* ============================================
   FOOTER
   ============================================ */
.footer {
    text-align: center;
    padding: 30px 20px 50px;
    color: var(--text-muted);
    font-size: 13px;
}
.footer .logo {
    font-weight: 700;
    font-size: 16px;
    background: var(--ig-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 6px;
}

/* ============================================
   RESPONSIV (hero-wrap uchun)
   ============================================ */
@media (max-width: 800px) {
    .hero-wrap { grid-template-columns: 1fr; padding: 40px 20px; text-align: center; }
    .hero-text p { margin-left: auto; margin-right: auto; }
    .hero-actions, .hero-trust { justify-content: center; }
    .hero-illustration { margin-top: 20px; }
    .section-title { font-size: 24px; }
}

/* ============================================
   HARAKATNI KAMAYTIRISH SOZLAMASI
   (foydalanuvchi tizimida "kam animatsiya" yoqilgan bo'lsa hurmat qilamiz)
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
