/* Modern Responsive Styling System for Vitalify */

:root {
    /* Fonts */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Dark Mode Defaults */
    --bg-gradient: linear-gradient(135deg, #0b0f19 0%, #111827 100%);
    --card-bg: rgba(22, 28, 45, 0.65);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Brand & Utility Accents */
    --primary: #6366f1; /* Indigo */
    --primary-glow: rgba(99, 102, 241, 0.15);
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --accent-orange: #f97316;
    --accent-red: #ef4444;
    --accent-purple: #a855f7;

    --btn-hover: #4f46e5;
    --input-bg: rgba(17, 24, 39, 0.6);
    --input-border: rgba(255, 255, 255, 0.12);
    --input-focus: #6366f1;

    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.2);
}

/* Light Mode Override */
body.light-mode {
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --card-bg: rgba(255, 255, 255, 0.75);
    --card-border: rgba(0, 0, 0, 0.06);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --primary: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.1);
    --accent-cyan: #0891b2;
    --accent-green: #16a34a;
    --accent-orange: #ea580c;
    --accent-red: #dc2626;
    
    --btn-hover: #4338ca;
    --input-bg: rgba(255, 255, 255, 0.9);
    --input-border: rgba(0, 0, 0, 0.15);
    --input-focus: #4f46e5;
    
    --shadow-premium: 0 10px 30px -15px rgba(0, 0, 0, 0.1);
    --shadow-inner: inset 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Base Setup */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

body {
    font-family: var(--font-body);
    background: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Background Glow Decorations */
.background-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.2;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-cyan);
    bottom: -150px;
    right: -100px;
}

body.light-mode .glow-orb {
    opacity: 0.12;
    filter: blur(140px);
}

/* Container */
.app-container {
    width: 100%;
    max-width: 1200px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-radius: 16px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-premium);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.logo-area h1 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-area .badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    background: var(--primary-glow);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Theme Switcher */
.theme-toggle-btn {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

body.light-mode .sun-icon {
    display: block;
}

body.light-mode .moon-icon {
    display: none;
}

/* Layout */
.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 850px) {
    .main-layout {
        grid-template-columns: 1.1fr 1.3fr;
    }
}

/* Premium Card Styles */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 28px;
    box-shadow: var(--shadow-premium);
    overflow: hidden;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.3px;
}

/* Form Styling */
.form-group {
    margin-bottom: 22px;
}

.input-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Gender Card Selectors */
.gender-selector-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.gender-card {
    cursor: pointer;
    border-radius: 16px;
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    padding: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.gender-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-secondary);
}

.gender-content svg {
    stroke: var(--text-secondary);
    transition: all 0.2s ease;
}

.hidden-radio {
    display: none;
}

.gender-card:hover {
    border-color: var(--primary);
}

.gender-card.active {
    border-color: var(--primary);
    background: var(--primary-glow);
}

.gender-card.active .gender-content {
    color: var(--primary);
}

.gender-card.active .gender-content svg {
    stroke: var(--primary);
    transform: scale(1.1);
}

/* Sliding Unit Switcher */
.unit-toggle-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.unit-toggle {
    display: flex;
    position: relative;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 3px;
}

.unit-label-btn {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 16px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 9px;
    z-index: 2;
    transition: color 0.25s ease;
}

.unit-label-btn.active {
    color: white;
}

body.light-mode .unit-label-btn.active {
    color: white;
}

.unit-slider {
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc(50% - 3px);
    background: var(--primary);
    border-radius: 9px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* Shift active slider when Imperial is checked */
input#unitImperial:checked ~ .unit-slider {
    transform: translateX(100%);
}

input#unitImperial:checked ~ label[for="unitImperial"] {
    color: white;
}
input#unitImperial:checked ~ label[for="unitMetric"] {
    color: var(--text-secondary);
}

/* Custom Input Sliders */
.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.value-display {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.unit-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.slider-input {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--input-bg);
    outline: none;
    border: 1px solid var(--input-border);
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--text-primary);
    cursor: pointer;
    transition: transform 0.1s ease;
}

.slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

/* Number inputs (Imperial Height) */
.dual-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.input-with-label {
    position: relative;
    display: flex;
    align-items: center;
}

.number-input {
    width: 100%;
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: 12px;
    padding: 14px 16px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    outline: none;
}

.number-input:focus {
    border-color: var(--primary);
}

/* Hide number input spinners */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

.input-suffix {
    position: absolute;
    right: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
    pointer-events: none;
}

/* Custom Dropdown/Select */
.custom-select-wrapper {
    position: relative;
}

.custom-select {
    width: 100%;
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: 12px;
    padding: 14px 16px;
    padding-right: 40px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.custom-select:focus {
    border-color: var(--primary);
}

.custom-select option {
    background: #111827;
    color: #f3f4f6;
}

body.light-mode .custom-select option {
    background: #ffffff;
    color: #0f172a;
}

.select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-secondary);
}

/* Body Fat Toggle Switch Styles */
.bodyfat-toggle-container {
    margin-top: 15px;
    padding: 12px 0;
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
}

.toggle-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.toggle-checkbox {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--input-bg);
    border: 1.5px solid var(--input-border);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-checkbox:checked + .toggle-slider {
    background: var(--primary-glow);
    border-color: var(--primary);
}

.toggle-checkbox:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: var(--primary);
}

.toggle-label-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Body Fat Collapsible Panel */
.bodyfat-panel {
    background: rgba(99, 102, 241, 0.03);
    border-radius: 16px;
    padding: 18px;
    border: 1.5px dashed var(--input-border);
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: max-height 0.4s ease, opacity 0.4s ease, margin 0.4s ease;
    overflow: hidden;
}

.bodyfat-panel.hidden {
    display: none !important;
}

.panel-subtitle {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

/* Calculate Button */
.calculate-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-purple) 100%);
    border: none;
    color: white;
    border-radius: 16px;
    padding: 16px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 10px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.45);
    background: linear-gradient(135deg, var(--btn-hover) 0%, var(--accent-purple) 100%);
}

.calculate-btn:active {
    transform: translateY(0);
}

/* Results Section styling */
.results-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hidden {
    display: none !important;
}

/* Placeholder card */
.placeholder-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
    min-height: 400px;
}

.placeholder-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 24px;
}

.placeholder-card h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.placeholder-card p {
    max-width: 380px;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Active Results Dashboard UI */
.main-result-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
    border: 1px solid var(--card-border);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bmi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-subtitle {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
}

.bmi-category {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    margin-top: 4px;
    background: linear-gradient(to right, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bmi-display {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    width: 76px;
    height: 76px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-premium);
}

#bmiScoreText {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

/* Dynamic Gauge */
.gauge-container {
    width: 100%;
}

.gauge-bar {
    height: 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    overflow: visible;
    position: relative;
    margin-bottom: 12px;
}

.gauge-segment {
    height: 100%;
}

.gauge-segment.underweight {
    width: 18.5%;
    background: #0ea5e9;
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.gauge-segment.normal {
    width: 26.5%;
    background: #10b981;
}

.gauge-segment.overweight {
    width: 20%;
    background: #f59e0b;
}

.gauge-segment.obese {
    width: 35%;
    background: #ef4444;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

.gauge-pointer {
    position: absolute;
    top: -6px;
    left: 50%;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--text-primary);
    border: 5px solid var(--primary);
    transform: translateX(-50%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: left 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gauge-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0 4px;
}

/* Body Composition Card (Body Fat results) */
.bodyfat-result-card {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
    border: 1px solid var(--card-border);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bodyfat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.bodyfat-category {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 800;
    margin-top: 4px;
    color: var(--accent-purple);
}

.method-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--primary-glow);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.bodyfat-bar-container {
    width: 100%;
}

.bodyfat-bar {
    height: 18px;
    border-radius: 9px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    display: flex;
    overflow: hidden;
    margin-bottom: 8px;
}

.fat-bar {
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-red));
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lean-bar {
    background: linear-gradient(90deg, var(--accent-green), var(--accent-cyan));
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bodyfat-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 700;
}

.label-fat {
    color: var(--accent-orange);
}

.label-lean {
    color: var(--accent-green);
}

.mass-breakdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    border-top: 1px dashed var(--card-border);
    padding-top: 16px;
}

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

.mass-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.mass-val {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2px;
}

.mass-unit {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Metrics Grid Details */
.metrics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 500px) {
    .metrics-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.metric-card {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bmr-theme {
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent-purple);
}

.tdee-theme {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
}

.weight-theme {
    background: rgba(249, 115, 22, 0.15);
    color: var(--accent-orange);
}

.water-theme {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
}

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

.metric-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.metric-value {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2px;
}

.metric-unit {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Goals/Recommendations styling */
.goals-card {
    padding: 24px;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 18px;
}

.goals-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.goal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
}

.goal-type {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.goal-calories {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
}

.goal-calories .unit {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.goal-item.loss {
    border-left: 4px solid var(--accent-cyan);
}

.goal-item.maintenance {
    border-left: 4px solid var(--primary);
}

.goal-item.gain {
    border-left: 4px solid var(--accent-purple);
}

/* Feedback Box */
.feedback-card {
    padding: 24px;
}

.feedback-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feedback-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 1.05rem;
}

.feedback-paragraph {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.indicator.normal {
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}

.indicator.underweight {
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
}

.indicator.warning {
    background: var(--accent-orange);
    box-shadow: 0 0 8px var(--accent-orange);
}

.indicator.danger {
    background: var(--accent-red);
    box-shadow: 0 0 8px var(--accent-red);
}

/* Footer Styling */
.app-footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 16px 0;
    border-top: 1px solid var(--card-border);
}

/* Method Comparison Breakdown Styles */
.method-breakdown-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 16px;
    padding: 14px;
    margin-top: 16px;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.breakdown-row:not(:last-child) {
    border-bottom: 1px dashed var(--card-border);
    padding-bottom: 8px;
    margin-bottom: 2px;
}

.method-name {
    display: flex;
    align-items: center;
    gap: 6px;
}

.method-val {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
}

/* AI Coach & Modal Styles */
.ai-coach-card {
    margin-top: 24px;
}

.ai-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.ai-btn {
    background: var(--primary);
    border: none;
    border-radius: 12px;
    color: #fff;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.ai-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--shadow-color);
    filter: brightness(1.1);
}

.ai-placeholder {
    text-align: center;
    padding: 24px 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.ai-section {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--card-border);
}

.ai-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.ai-section h4 {
    color: var(--primary);
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.ai-section p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Spinner Loader */
.ai-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 12px;
    color: var(--text-secondary);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(139, 92, 246, 0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modals Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    display: none !important;
}

.modal-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 24px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: var(--accent-red);
}

.pin-field {
    font-family: monospace;
}


