/* Asosiy va Light Mode ranglari */
:root {
    --primary-green: #00d428;
    --primary-green-hover: #00b322;
    --bg-color: #f8faf9;
    --surface-color: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --border-color: #e5e5e5;
    --card-shadow: 0 15px 35px rgba(0,0,0,0.05);
    --input-bg: #f5f5f5;
    --hero-gradient: linear-gradient(135deg, #f8faf9 0%, #e1f5e6 100%);
    --footer-bg: #111111;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* O'zgartirish orqali Dark Mode */
body.dark {
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --text-primary: #f5f5f5;
    --text-secondary: #aaaaaa;
    --border-color: #333333;
    --card-shadow: 0 15px 35px rgba(0,0,0,0.3);
    --input-bg: #2a2a2a;
    --hero-gradient: linear-gradient(135deg, #121212 0%, #081a0d 100%);
    --footer-bg: #0a0a0a;
}

/* Umumiy sozlamalar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
    scroll-behavior: smooth;
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease;
    position: relative;
    isolation: isolate;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(0, 212, 40, 0.12), transparent 26%),
        radial-gradient(circle at 85% 0%, rgba(0, 212, 40, 0.08), transparent 22%),
        radial-gradient(circle at 78% 84%, rgba(0, 212, 40, 0.08), transparent 28%);
    pointer-events: none;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: linear-gradient(rgba(0, 0, 0, 0.015) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, 0.015) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
}

a { text-decoration: none; }

/* Animatsiyalar */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.text-animated .text-word,
.text-animated .text-line {
    display: inline-block;
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    animation: riseIn 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    animation-delay: var(--delay);
    will-change: transform, opacity;
}

.text-animated .text-line {
    display: block;
    margin-bottom: 0.28em;
}

@keyframes riseIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.4s ease;
    box-shadow: 0 12px 30px rgba(0,0,0,0.05);
}

body.dark header {
    background: rgba(16, 16, 16, 0.72);
}

.logo svg {
    height: 45px;
    width: auto;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    display: block;
}

.logo-icon {
    height: 44px;
    width: auto;
    flex-shrink: 0;
}

.logo-text {
    height: 44px;
    width: auto;
}

.footer-logo-text {
    height: 38px;
    width: auto;
    filter: grayscale(1) brightness(0.85);
    opacity: 0.95;
    margin-bottom: 16px;
}

.theme-toggle {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
}

.nav-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-lang {
    background-color: transparent;
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-lang:hover {
    background-color: var(--primary-green);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 212, 40, 0.4);
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-green), #00e82c);
    color: #fff;
    padding: 12px 28px;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 212, 40, 0.25);
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 212, 40, 0.35);
}

/* Hero Qismi */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 100px 5% 90px;
    min-height: 85vh;
    background: var(--hero-gradient);
    gap: 40px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.hero::before,
.hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero::before {
    width: 420px;
    height: 420px;
    right: -160px;
    top: -120px;
    background: radial-gradient(circle, rgba(0, 212, 40, 0.12), transparent 70%);
}

.hero::after {
    width: 280px;
    height: 280px;
    left: -90px;
    bottom: -120px;
    background: radial-gradient(circle, rgba(0, 212, 40, 0.08), transparent 70%);
}

.hero-text {
    flex: 1;
    position: relative;
    z-index: 1;
    max-width: 640px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--primary-green);
    margin-bottom: 20px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -1px;
    max-width: 16ch;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 35px;
    max-width: 600px;
    line-height: 1.8;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.hero-image::before {
    content: '';
    position: absolute;
    width: 80%;
    height: 80%;
    background: var(--primary-green);
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    z-index: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hero-ring {
    position: absolute;
    width: min(560px, 118%);
    aspect-ratio: 1.9 / 1;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-14deg);
    z-index: 0;
    pointer-events: none;
    overflow: visible;
    filter: drop-shadow(0 10px 22px rgba(0, 212, 40, 0.18));
}

.hero-ring path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 760;
    stroke-dashoffset: 760;
    animation: heroRingDraw 3s cubic-bezier(0.2, 0.85, 0.2, 1) 0.18s forwards;
}

.hero-ring-top {
    stroke: rgba(0, 212, 40, 0.62);
    stroke-width: 6;
}

.hero-ring-bottom {
    stroke: rgba(0, 212, 40, 0.26);
    stroke-width: 2.2;
    animation-delay: 0.34s;
}

@keyframes heroRingDraw {
    from {
        stroke-dashoffset: 760;
        opacity: 0.3;
    }
    to {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

.hero-image img {
    width: 100%;
    max-width: 460px;
    border-radius: 36px;
    box-shadow: var(--card-shadow);
    z-index: 1;
    position: relative;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.35);
}

/* Form va Inputlar dizayni */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 14px 20px;
    background-color: var(--input-bg);
    border: 2px solid transparent;
    color: var(--text-primary);
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary-green);
    background-color: var(--surface-color);
    box-shadow: 0 0 0 4px rgba(0, 212, 40, 0.1);
}

/* BMI Kalkulyator */
.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 3rem);
    margin: 80px 0 50px;
    color: var(--primary-green);
    font-weight: 800;
    position: relative;
    padding-bottom: 18px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 84px;
    height: 4px;
    border-radius: 999px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, var(--primary-green), transparent);
}

.bmi-section {
    padding: 40px 5%;
}

.bmi-container {
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(0, 212, 40, 0.03), transparent 30%), var(--surface-color);
    padding: 40px;
    border-radius: 28px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.bmi-container::before {
    content: '';
    position: absolute;
    inset: auto -40px -90px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(0, 212, 40, 0.05);
    filter: blur(10px);
}

.bmi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.bmi-result-card {
    grid-column: 1 / -1;
    background: var(--input-bg);
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    margin-top: 20px;
    display: none;
    border: 2px solid var(--border-color);
}

.bmi-result-card.show {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bmi-scale {
    width: 100%;
    margin-bottom: 15px;
}

.bmi-scale-visual {
    display: flex;
    width: 100%;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.bmi-zone {
    height: 100%;
}
.bmi-zone:nth-child(1) { width: 23%; background: #3498db; } /* Underweight up to 18.5 */
.bmi-zone:nth-child(2) { width: 33%; background: #2ecc71; } /* Normal 18.5-25 */
.bmi-zone:nth-child(3) { width: 25%; background: #f39c12; } /* Overweight 25-30 */
.bmi-zone:nth-child(4) { width: 19%; background: #e74c3c; } /* Obese 30+ */


#bmi-indicator {
    position: absolute;
    top: -4px;
    left: 0;
    width: 4px;
    height: 20px;
    background: var(--text-primary);
    border-radius: 2px;
    transform: translateX(-50%);
    transition: left 0.5s ease-out;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.bmi-labels {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: 23%; /* Align with the zones */
    width: 77%;
}
.bmi-labels span {
    position: relative;
    left: -10%;
}
.bmi-labels span:last-child {
    left: -20%;
}


/* Ta'riflar */
.pricing-section {
    padding: 50px 5%;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.pricing-card {
    background: linear-gradient(180deg, rgba(0, 212, 40, 0.03), transparent 28%), var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 40px 30px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-12px);
    border-color: var(--primary-green);
    box-shadow: 0 22px 44px rgba(0,0,0,0.1);
}

.badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 212, 40, 0.1);
    color: var(--primary-green);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.pricing-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.pricing-card .price {
    font-size: 2.2rem;
    color: var(--primary-green);
    font-weight: 800;
    margin-bottom: 25px;
}

.pricing-card ul {
    list-style: none;
    margin-bottom: 30px;
    flex-grow: 1;
}

.pricing-card ul li {
    margin-bottom: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
}

.pricing-card ul li::before {
    content: '✓';
    color: var(--primary-green);
    font-weight: bold;
    margin-right: 10px;
    background: rgba(0, 212, 40, 0.1);
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Lead Form Qismi */
.lead-section {
    padding: 90px 5%;
    background: linear-gradient(135deg, rgba(0, 212, 40, 0.04), transparent 35%), var(--hero-gradient);
    text-align: center;
}

.lead-container {
    max-width: 600px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(0, 212, 40, 0.03), transparent 25%), var(--surface-color);
    padding: 50px 40px;
    border-radius: 32px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.lead-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 212, 40, 0.05), transparent 45%);
    pointer-events: none;
}

/* Natijalar Qismi */
.results-section {
    padding: 40px 5%;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.result-card {
    background: linear-gradient(180deg, rgba(0, 212, 40, 0.03), transparent 28%), var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
}

.result-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 22px 46px rgba(0,0,0,0.12);
}

.result-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 220px;
    object-fit: cover;
    display: block;
}

.result-card-content {
    padding: 24px 24px 26px;
}

.result-card-content h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.result-card-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.result-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), transparent);
    opacity: 0.9;
}

/* Footer */
footer {
    background: linear-gradient(180deg, #2a2a2a 0%, #1f1f1f 100%);
    color: #999;
    padding: 60px 5% 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 40px;
}

.footer-grid .footer-col {
    padding: 8px 0;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-grid .footer-col p,
.footer-grid .footer-col a {
    color: #a8a8a8;
}

.footer-grid .footer-col a:hover {
    color: var(--primary-green);
}

.footer-brand p {
    max-width: 320px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: #fff;
    background: rgba(255,255,255,0.1);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-green);
    color: #fff;
    transform: translateY(-3px);
}

.social-links a svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: currentColor;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

/* Natijalar kartalari */
.results-grid {
    align-items: stretch;
}

.result-card,
.pricing-card.fade-in[style*="overflow: hidden"] {
    max-width: 360px;
    margin: 0 auto;
    border-radius: 26px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
    box-shadow: 0 18px 40px rgba(0,0,0,0.08);
}

.result-card img,
.pricing-card.fade-in[style*="overflow: hidden"] img {
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    min-height: 220px;
    object-fit: cover;
    display: block;
}

.result-card-content,
.pricing-card.fade-in[style*="overflow: hidden"] > div {
    padding: 22px 24px;
}

.result-card-content h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.result-card-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.result-card:hover,
.pricing-card.fade-in[style*="overflow: hidden"]:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 50px rgba(0,0,0,0.14);
}

.result-card::after,
.pricing-card.fade-in[style*="overflow: hidden"]::after {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary-green), transparent);
}

/* Mobil Moslashuv */
@media (max-width: 768px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 40px;
    }
    .hero-title {
        font-size: 2.2rem;
        max-width: 100%;
    }
    .hero-ring {
        width: min(430px, 120%);
    }
    .hero-ring-top {
        stroke-width: 5;
    }
    .hero-ring-bottom {
        stroke-width: 1.8;
    }
    .hero-image img {
        max-width: 360px;
    }
    .bmi-grid { grid-template-columns: 1fr; } /* Mobil uchun bitta ustun */
    .bmi-container, .lead-container { padding: 30px 20px; }
    .pricing-grid { padding: 0; }
    .nav-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 10px;
    }
    .nav-actions .btn-primary {
        order: 3;
        flex-basis: 100%;
        width: 100%;
        margin-top: 4px;
    }
    .logo-icon,
    .logo-text {
        height: 38px;
    }
    .footer-grid {
        gap: 20px;
    }
    .footer-grid .footer-col {
        padding: 20px;
    }
    .footer-logo-text {
        height: 34px;
    }

    .result-card,
    .pricing-card.fade-in[style*="overflow: hidden"] {
        max-width: 100%;
    }
}
