/* Premium Modern Calculator Design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Clean, Professional Color Palette */
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --background: #fafafa;
    --surface: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Remove background elements */
.background-gradient,
.glass-orbs {
    display: none;
}

/* Ad Minimal */
.ad-minimal {
    max-width: 1200px;
    margin: 0 auto 24px;
    padding: 0 20px;
}

.ad-minimal > span,
.ad-minimal.vertical > span {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

.ad-minimal.vertical > span {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-minimal.bottom {
    margin-top: 60px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-top: 24px;
}

.back-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.back-btn svg {
    width: 16px;
    height: 16px;
}

/* Hero */
.hero {
    text-align: center;
    padding: 60px 20px 40px;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.hero p {
    color: var(--text-secondary);
    font-size: clamp(1rem, 2vw, 1.125rem);
    font-weight: 400;
}

/* Calculator Container */
.calc-container {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    margin-top: 40px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.sidebar-ad {
    order: 2;
}

.calculator {
    order: 1;
    max-width: 800px;
}

/* Clean Card */
.glass-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.content-section {
    line-height: 1.8;
}

.content-section h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.content-section h3 {
    font-size: 1.375rem;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.content-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.content-section p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.content-section ul,
.content-section ol {
    color: var(--text-secondary);
}

.content-section a {
    color: var(--primary);
    text-decoration: none;
}

.content-section a:hover {
    text-decoration: underline;
}

/* Unit Toggle */
.unit-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    background: var(--background);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.unit-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.unit-btn svg {
    width: 16px;
    height: 16px;
}

.unit-btn.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.unit-btn:hover:not(.active) {
    color: var(--text-primary);
}

/* Form */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.unit-text {
    color: var(--text-tertiary);
    font-weight: 400;
}

.input-group input,
.input-group select {
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-group select {
    cursor: pointer;
}

/* Input with icon */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .icon {
    position: absolute;
    left: 14px;
    color: var(--text-tertiary);
    font-weight: 500;
    pointer-events: none;
}

.input-with-icon input {
    padding-left: 32px;
}

.input-with-icon .icon-right {
    position: absolute;
    right: 14px;
    color: var(--text-tertiary);
    font-weight: 500;
    pointer-events: none;
}

.input-with-icon .icon-right + input {
    padding-right: 40px;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-btn:hover {
    background: var(--primary-dark);
}

.submit-btn:active {
    transform: scale(0.98);
}

.submit-btn svg {
    width: 18px;
    height: 18px;
}

/* Result */
.result {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    animation: fadeIn 0.3s ease;
}

.result.hidden {
    display: none;
}

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

/* BMI Display */
.bmi-display {
    text-align: center;
    margin-bottom: 40px;
}

.bmi-circle {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 24px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: var(--border);
    stroke-width: 10;
}

.progress-ring-fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 534;
    stroke-dashoffset: 534;
    transition: stroke-dashoffset 1s ease;
}

.bmi-value-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.bmi-value {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    color: var(--primary);
}

.bmi-label {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-top: 4px;
}

.bmi-category {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.bmi-message {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* BMI Scale */
.bmi-scale {
    margin-top: 32px;
}

.scale-bar {
    height: 12px;
    background: linear-gradient(to right,
        #3b82f6 0%, #3b82f6 18.5%,
        #10b981 18.5%, #10b981 25%,
        #f59e0b 25%, #f59e0b 30%,
        #ef4444 30%, #ef4444 100%
    );
    border-radius: 6px;
    position: relative;
    margin-bottom: 12px;
}

.scale-marker {
    position: absolute;
    top: -4px;
    width: 3px;
    height: 20px;
    background: var(--text-primary);
    border-radius: 2px;
    box-shadow: var(--shadow);
    transition: left 0.8s ease;
}

.scale-marker::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-primary);
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* Breakdown Grid */
.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.breakdown-item {
    background: var(--background);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.breakdown-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.breakdown-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Diet Plans */
.diet-plans {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.diet-plans.hidden {
    display: none;
}

.diet-plans h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
    color: var(--text-primary);
}

.plans-grid {
    display: grid;
    gap: 16px;
}

.plan-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    transition: all 0.2s ease;
}

.plan-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.plan-card h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.plan-card p {
    color: var(--text-secondary);
    font-size: 0.938rem;
    margin-bottom: 16px;
    line-height: 1.6;
}

.plan-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.plan-link:hover {
    background: var(--primary-dark);
}

/* Disclaimer */
.disclaimer {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 32px;
}

.disclaimer-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 8px;
}

.disclaimer-title svg {
    width: 18px;
    height: 18px;
}

.disclaimer p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #78350f;
    margin: 0;
}

.disclaimer a {
    color: #92400e;
    text-decoration: underline;
}

.disclaimer a:hover {
    color: #78350f;
}

/* Footer */
.footer {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-top: 1px solid var(--border);
    margin-top: 80px;
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Responsive */
@media (max-width: 968px) {
    .calc-container {
        grid-template-columns: 1fr;
    }

    .sidebar-ad {
        display: none;
    }

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

@media (max-width: 640px) {
    .glass-card {
        padding: 24px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .unit-toggle {
        flex-direction: column;
        gap: 6px;
    }

    .bmi-circle {
        width: 160px;
        height: 160px;
    }

    .bmi-value {
        font-size: 2.5rem;
    }

    .scale-labels {
        flex-wrap: wrap;
        gap: 8px;
    }

    .scale-labels span {
        flex: 0 0 48%;
    }
}

/* Selection */
::selection {
    background: var(--primary);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}
