/* Custom CSS Design System - Sleek Premium Dark Mode with Glassmorphism */
:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-glass: rgba(15, 23, 42, 0.65);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(99, 102, 241, 0.5);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --primary: #6366f1;       /* Indigo */
    --primary-hover: #4f46e5;
    --accent: #14b8a6;        /* Teal */
    --accent-hover: #0d9488;
    --secondary: #334155;     /* Slate Muted */
    --secondary-hover: #475569;
    
    --gradient-hero: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
    --gradient-card: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
    --gradient-accent: linear-gradient(135deg, #14b8a6 0%, #2dd4bf 100%);
    --gradient-bar-current: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
    --gradient-bar-opt: linear-gradient(90deg, #10b981 0%, #34d399 100%);

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-neon: 0 0 20px rgba(99, 102, 241, 0.15);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Dynamic glow backdrops */
.glow-bg-1 {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.glow-bg-2 {
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* Layout Containers */
.app-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-glass);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.logo-accent {
    color: var(--accent);
}

.header-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 3rem 1rem 2rem;
}

.hero-section h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto;
    font-weight: 400;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg), var(--shadow-neon);
    position: relative;
    overflow: hidden;
}

.wizard-card {
    max-width: 800px;
    margin: 0 auto 3rem;
}

/* Progress Indicator */
.progress-bar-container {
    margin-bottom: 2.5rem;
    position: relative;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    gap: 0.5rem;
    transition: var(--transition-normal);
}

.step-indicator span {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
}

.step-indicator.active {
    color: var(--primary);
}

.step-indicator.completed {
    color: var(--accent);
}

.step-indicator::before {
    content: "";
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    transition: var(--transition-normal);
}

#step-ind-1::before { content: "1"; }
#step-ind-2::before { content: "2"; }
#step-ind-3::before { content: "3"; }
#step-ind-4::before { content: "4"; }

.step-indicator.active::before {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.step-indicator.completed::before {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-primary);
}

.progress-bar-track {
    position: absolute;
    top: 14px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--border-glass);
    z-index: 1;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--primary);
    transition: var(--transition-normal);
}

/* Wizard Steps styling */
.wizard-step {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.wizard-step.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.wizard-step h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.step-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* Option Cards (Radio Grid) */
.radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.option-card {
    cursor: pointer;
    position: relative;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
    transition: var(--transition-normal);
}

.option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.option-content {
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    transition: transform var(--transition-fast);
}

.option-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
}

.option-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.option-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.03);
}

.option-card:hover .option-icon {
    transform: scale(1.15) translateY(-2px);
}

.option-card input[type="radio"]:checked + .option-content {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
}

/* Specific fix when input is checked to highlight card border */
.option-card:has(input[type="radio"]:checked) {
    border-color: var(--primary);
    box-shadow: var(--shadow-neon);
}

/* Form Inputs & Sliders */
.form-group {
    margin-bottom: 2rem;
}

.input-wrapper {
    margin-bottom: 1.5rem;
}

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

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

.input-container input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    color: white;
    font-size: 1.1rem;
    outline: none;
    transition: var(--transition-normal);
}

.input-container input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.prefix-icon input {
    padding-left: 2rem;
}

.input-prefix {
    position: absolute;
    left: 0.85rem;
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Range Sliders */
.range-slider-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-secondary);
    outline: none;
    margin: 10px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(20, 184, 166, 0.5);
    transition: transform var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-val-display {
    align-self: flex-end;
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent);
}

/* Checkbox Grid Options */
.checkbox-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.checkbox-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.checkbox-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
}

.checkbox-custom {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-glass);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.checkbox-custom::after {
    content: "✓";
    font-weight: 700;
    color: var(--bg-primary);
    font-size: 0.85rem;
    display: none;
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-card {
    border-color: var(--accent);
    background: rgba(20, 184, 166, 0.05);
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-card .checkbox-custom {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-option input[type="checkbox"]:checked + .checkbox-card .checkbox-custom::after {
    display: block;
}

.checkbox-content h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
}

.checkbox-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.75rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition-normal);
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.btn-accent {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-accent:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 15px rgba(20, 184, 166, 0.4);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--secondary-hover);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-light {
    background: white;
    color: var(--bg-primary);
}

.btn-light:hover {
    background: #e2e8f0;
}

.step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
}

/* RESULTS DASHBOARD */
.results-header {
    text-align: center;
    margin-bottom: 2rem;
}

.results-header h2 {
    font-size: 2rem;
}

.metrics-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.metric-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.metric-card.highlight {
    border-color: var(--accent);
    background: rgba(20, 184, 166, 0.03);
    box-shadow: 0 0 15px rgba(20, 184, 166, 0.05);
}

.metric-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
}

.metric-card.highlight .metric-value {
    color: var(--accent);
}

/* Cost Visualizer Chart */
.cost-visualizer-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 2.5rem;
}

.cost-visualizer-container h3 {
    font-family: 'Outfit', sans-serif;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.chart-flex {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.chart-bar-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.bar-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    background: var(--bg-secondary);
    height: 36px;
    border-radius: 18px;
    overflow: hidden;
}

.bar {
    height: 100%;
    width: 0%; /* Populated dynamically */
    border-radius: 18px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar-current {
    background: var(--gradient-bar-current);
}

.bar-optimized {
    background: var(--gradient-bar-opt);
}

.bar-value-text {
    position: absolute;
    left: 1.25rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    font-size: 0.95rem;
}

/* Recommendations Card Grid */
.recommendations-section {
    margin-bottom: 2.5rem;
}

.recommendations-section h3 {
    font-family: 'Outfit', sans-serif;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.rec-cards-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.rec-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    transition: var(--transition-normal);
}

.rec-card:hover {
    border-color: rgba(99, 102, 241, 0.2);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.rec-badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.rec-badge-primary {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.rec-badge-accent {
    background: rgba(20, 184, 166, 0.15);
    color: #2dd4bf;
    border: 1px solid rgba(20, 184, 166, 0.2);
}

.rec-info-group {
    flex: 1 1 350px;
}

.rec-info-group h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.rec-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.rec-details-bullets {
    list-style: none;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}

.rec-details-bullets li::before {
    content: "✦";
    color: var(--accent);
    margin-right: 0.35rem;
}

.rec-action-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.rec-price {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
}

.rec-price span {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Premium Ad Placement Slot */
.ad-placement-card {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.05) 0%, rgba(99, 102, 241, 0.05) 100%);
    border: 1px solid rgba(20, 184, 166, 0.25);
    border-radius: var(--radius-md);
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
}

.ad-placement-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
}

.ad-badge {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.1em;
}

.ad-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    justify-content: space-between;
}

.ad-emoji {
    font-size: 2.5rem;
}

.ad-text {
    flex: 1 1 300px;
}

.ad-text h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.ad-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.results-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #0f172a;
    border: 1px solid var(--accent);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Footer Styling */
.app-footer {
    text-align: center;
    border-top: 1px solid var(--border-glass);
    padding-top: 2rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.2rem;
    }
    
    .glass-card {
        padding: 1.5rem;
    }
    
    .progress-steps span {
        display: none;
    }
    
    .rec-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .rec-action-group {
        align-items: flex-start;
        width: 100%;
    }
    
    .rec-action-group .btn {
        width: 100%;
    }
}
