/* ==========================================
   BEAUTY ROI CALCULATOR - PREMIUM DARK UI
   Design System by 100X Solutions
   ========================================== */

/* CSS Custom Properties (Design Tokens) */
:root {
    /* Colors */
    --bg-primary: #0F172A;
    --surface-dark: #111827;
    --card-bg: #1F2937;
    --text-primary: #FFFFFF;
    --accent-cyan: #22D3EE;
    --success-green: #22C55E;
    --warning-orange: #F59E0B;
    --muted: #9CA3AF;
    --border-color: #374151;
    --shadow-color: rgba(0, 0, 0, 0.3);
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 var(--shadow-color);
    --shadow-md: 0 4px 6px -1px var(--shadow-color);
    --shadow-lg: 0 10px 15px -3px var(--shadow-color);
    --shadow-xl: 0 20px 25px -5px var(--shadow-color);
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--space-4);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
    margin-bottom: var(--space-4);
    color: var(--muted);
}

a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: #0EA5B7;
}

/* ==========================================
   LAYOUT COMPONENTS
   ========================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

/* ==========================================
   HEADER
   ========================================== */

.header {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--surface-dark) 100%);
    padding: var(--space-8) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.brand {
    margin-bottom: var(--space-8);
}

.logo {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-2);
}

.tagline {
    font-size: var(--font-size-lg);
    color: var(--muted);
    margin: 0;
}

.viral-hook {
    max-width: 600px;
    margin: 0 auto;
}

.main-headline {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    margin-bottom: var(--space-3);
    color: var(--text-primary);
}

.subtext {
    font-size: var(--font-size-xl);
    color: var(--muted);
    margin: 0;
}

/* ==========================================
   MAIN CONTENT
   ========================================== */

.main-content {
    padding: var(--space-12) 0;
}

/* ==========================================
   INPUT SECTION
   ========================================== */

.input-section {
    margin-bottom: var(--space-16);
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.input-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.input-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-cyan);
}

.input-card.optional {
    opacity: 0.8;
}

.input-card h3 {
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.input-description {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-5);
}

/* Category Selection */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-3);
}

.category-item {
    display: flex;
    align-items: center;
    padding: var(--space-3);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.category-item:hover {
    border-color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.05);
}

.category-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.category-item input[type="checkbox"]:checked + .checkmark {
    background: var(--accent-cyan);
    border-color: var(--accent-cyan);
}

.category-item input[type="checkbox"]:checked ~ .category-info {
    color: var(--accent-cyan);
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-right: var(--space-3);
    transition: all var(--transition-fast);
    position: relative;
}

.checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.category-item input[type="checkbox"]:checked + .checkmark::after {
    display: block;
}

.category-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    transition: color var(--transition-fast);
}

.category-icon {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-1);
}

.category-name {
    font-size: var(--font-size-sm);
    font-weight: 500;
}

/* Budget Input */
.budget-input-container {
    text-align: center;
}

.budget-display {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: var(--space-1);
}

.currency {
    font-size: var(--font-size-2xl);
}

.budget-slider {
    width: 100%;
    height: 8px;
    border-radius: var(--radius-sm);
    background: var(--border-color);
    outline: none;
    margin-bottom: var(--space-4);
    -webkit-appearance: none;
    appearance: none;
}

.budget-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-cyan);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
}

.budget-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.budget-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-cyan);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-md);
}

.budget-presets {
    display: flex;
    justify-content: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.preset-btn {
    padding: var(--space-2) var(--space-4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-dark);
    color: var(--muted);
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.preset-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.preset-btn.active {
    background: var(--accent-cyan);
    color: var(--bg-primary);
    border-color: var(--accent-cyan);
}

/* Context Inputs */
.context-group {
    margin-bottom: var(--space-4);
}

.context-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.context-select {
    width: 100%;
    padding: var(--space-3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface-dark);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    transition: border-color var(--transition-fast);
}

.context-select:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

/* Calculate Button */
.calculate-container {
    text-align: center;
}

.calculate-btn {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, #0EA5B7 100%);
    color: var(--bg-primary);
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-lg);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.calculate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.calculate-btn:hover::before {
    left: 100%;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

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

.calculate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.calculate-btn:disabled:hover {
    transform: none;
    box-shadow: var(--shadow-lg);
}

.btn-icon {
    font-size: var(--font-size-xl);
}

/* ==========================================
   RESULTS SECTION
   ========================================== */

.results-section {
    margin-bottom: var(--space-16);
    animation: fadeInUp 0.6s ease-out;
}

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

.results-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-md);
}

.results-title {
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.results-subtitle {
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-6);
}

/* ROI Rankings */
.roi-rankings {
    display: grid;
    gap: var(--space-4);
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: var(--space-4);
    background: var(--surface-dark);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.ranking-item:hover {
    border-color: var(--accent-cyan);
    transform: translateX(5px);
}

.rank-number {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--accent-cyan);
    margin-right: var(--space-4);
    min-width: 40px;
}

.category-icon-large {
    font-size: var(--font-size-2xl);
    margin-right: var(--space-3);
}

.ranking-details {
    flex: 1;
}

.ranking-category {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.ranking-score {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
}

.roi-score {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--success-green);
}

.roi-bar {
    flex: 1;
    height: 8px;
    background: var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.roi-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-green) 0%, var(--accent-cyan) 100%);
    border-radius: var(--radius-sm);
    transition: width 1s ease-out;
    width: 0;
}

.ranking-explanation {
    font-size: var(--font-size-sm);
    color: var(--muted);
    line-height: 1.5;
}

/* Impact Timeline */
.impact-timeline {
    display: grid;
    gap: var(--space-4);
}

.timeline-item {
    display: flex;
    align-items: center;
    padding: var(--space-4);
    background: var(--surface-dark);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.timeline-icon {
    font-size: var(--font-size-xl);
    margin-right: var(--space-4);
}

.timeline-details {
    flex: 1;
}

.timeline-category {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.timeline-bar {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.timeline-progress {
    flex: 1;
    height: 6px;
    background: var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.timeline-fill {
    height: 100%;
    background: var(--accent-cyan);
    border-radius: var(--radius-sm);
    transition: width 1s ease-out;
    width: 0;
}

.timeline-text {
    font-size: var(--font-size-sm);
    color: var(--muted);
    min-width: 80px;
}

/* Smart Insights */
.smart-insights {
    display: grid;
    gap: var(--space-4);
}

.insight-item {
    padding: var(--space-4);
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.1) 0%, rgba(34, 197, 94, 0.1) 100%);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: var(--radius-lg);
}

.insight-icon {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-2);
}

.insight-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.insight-text {
    color: var(--muted);
    line-height: 1.6;
}

/* ==========================================
   SEO CONTENT
   ========================================== */

.seo-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-16);
}

.seo-card {
    background: var(--surface-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: all var(--transition-normal);
}

.seo-card:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
}

.seo-card h3 {
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

.seo-card p {
    margin: 0;
}

/* ==========================================
   DISCLAIMER SECTION
   ========================================== */

.disclaimer-section {
    background: var(--surface-dark);
    padding: var(--space-8) 0;
    margin-bottom: var(--space-12);
}

.disclaimer-card {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    text-align: center;
}

.disclaimer-card h4 {
    color: var(--warning-orange);
    margin-bottom: var(--space-4);
}

.disclaimer-card ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-2);
    margin: 0;
}

.disclaimer-card li {
    color: var(--muted);
    font-size: var(--font-size-sm);
    padding: var(--space-2) 0;
}

.disclaimer-card li::before {
    content: '⚠️';
    margin-right: var(--space-2);
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    background: var(--surface-dark);
    border-top: 1px solid var(--border-color);
    padding: var(--space-8) 0;
    text-align: center;
}

.footer-content {
    max-width: 400px;
    margin: 0 auto;
}

.footer-brand {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.footer-tagline {
    color: var(--muted);
    margin: 0;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

/* Mobile First Approach */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .container {
        padding: 0 var(--space-6);
    }
    
    .input-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-8);
    }
    
    .input-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .main-headline {
        font-size: var(--font-size-4xl);
    }
    
    .logo {
        font-size: var(--font-size-4xl);
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .input-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .category-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .seo-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        padding: 0 var(--space-12);
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
button:focus,
input:focus,
select:focus,
.category-item:focus-within {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #FFFFFF;
        --muted: #CCCCCC;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
    body {
        background: white;
        color: black;
    }
    
    .header,
    .footer,
    .disclaimer-section {
        background: white;
        color: black;
    }
    
    .input-card,
    .results-card,
    .seo-card {
        border: 1px solid #ccc;
        box-shadow: none;
    }
}
