:root {
    /* Premium Palette */
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --accent: #f59e0b;
    --bg-main: #f9fafb;
    --white: #ffffff;
    --grey-50: #f9fafb;
    --grey-100: #f3f4f6;
    --grey-200: #e5e7eb;
    --grey-300: #d1d5db;
    --grey-400: #9ca3af;
    --grey-500: #6b7280;
    --grey-600: #4b5563;
    --grey-700: #374151;
    --grey-800: #1f2937;
    --grey-900: #111827;
    
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-tertiary: #9ca3af;
    
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --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-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Variables */
body.dark-mode {
    --bg-main: #0f172a;
    --white: #1e293b;
    --grey-50: #1e293b;
    --grey-100: #334155;
    --grey-200: #334155;
    --grey-300: #475569;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    transition: background-color var(--transition-base), color var(--transition-base);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--grey-200);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

body.dark-mode .header {
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid var(--grey-100);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: -0.025em;
}

.theme-btn {
    background: var(--grey-100);
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.theme-btn:hover {
    background: var(--grey-200);
    color: var(--text-primary);
}

/* Hero */
.hero {
    padding: 5rem 0 3rem;
    text-align: center;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Tool Section */
.tool-section {
    padding-bottom: 5rem;
}

.selection-card {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-premium);
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid var(--grey-200);
}

body.dark-mode .selection-card {
    border-color: var(--grey-100);
}

.step-section {
    margin-bottom: 2.5rem;
}

.step-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--grey-500);
    margin-bottom: 1.25rem;
}

/* Step 1: Category Toggles */
.toggle-group {
    display: flex;
    gap: 1rem;
}

.toggle-btn {
    flex: 1;
    padding: 1rem;
    background: var(--grey-100);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.toggle-btn:hover {
    background: var(--grey-200);
}

.toggle-btn.active {
    background: var(--white);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-md);
}

/* Step 2: Color Search & Grid */
.search-container {
    margin-bottom: 1.5rem;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 1px solid var(--grey-300);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-fast);
    background: var(--grey-50);
    color: var(--text-primary);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background: var(--white);
}

.color-category-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 1.5rem 0 1rem;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem;
}

.color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.color-option:hover {
    background: var(--grey-100);
    transform: translateY(-2px);
}

.color-swatch {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    border: 2px solid var(--grey-200);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
    transition: all var(--transition-fast);
}

.color-option.selected .color-swatch {
    box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--primary);
}

.color-option.selected .color-name {
    color: var(--primary);
    font-weight: 600;
}

.color-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
}

/* Step 3: Style Pills */
.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pill-btn {
    padding: 0.625rem 1.25rem;
    background: var(--grey-100);
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pill-btn:hover {
    background: var(--grey-200);
}

.pill-btn.active {
    background: var(--primary-gradient);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

/* CTA Button */
.cta-container {
    padding-top: 1rem;
    text-align: center;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    color: var(--white);
    padding: 1.125rem 3rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1.125rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
}

.cta-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-premium);
    filter: brightness(1.05);
}

.cta-btn:active:not(:disabled) {
    transform: translateY(0);
}

.cta-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--grey-400);
    box-shadow: none;
}

/* Results Section */
.results-section {
    padding: 6rem 0;
    background: var(--grey-50);
    border-top: 1px solid var(--grey-200);
}

body.dark-mode .results-section {
    background: rgba(15, 23, 42, 0.5);
    border-color: var(--grey-100);
}

.section-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 3rem;
    text-align: center;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.result-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--grey-200);
    transition: all var(--transition-base);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.result-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-premium);
}

.best-match-badge {
    position: absolute;
    top: -12px;
    background: var(--accent);
    color: var(--white);
    padding: 0.375rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.4);
}

.avatar-container {
    width: 220px;
    height: 220px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-svg {
    width: 100%;
    height: 100%;
}

.outfit-colors {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.outfit-swatch {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    border: 1px solid var(--grey-200);
}

.outfit-label {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.outfit-style-tag {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

/* Extra Sections */
.trending-section {
    padding: 6rem 0;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.showcase-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--grey-200);
    text-align: center;
    transition: all var(--transition-fast);
}

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

.showcase-colors {
    display: flex;
    justify-content: center;
    gap: -0.5rem;
    margin-bottom: 1.5rem;
}

.showcase-swatch {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    border: 3px solid var(--white);
    box-shadow: var(--shadow-sm);
}

.showcase-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.showcase-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* FAQ Section */
.faq-section {
    padding: 6rem 0;
    background: var(--grey-50);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 1rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--grey-200);
    overflow: hidden;
}

.faq-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    text-align: left;
}

.faq-question {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.faq-icon {
    font-size: 1.25rem;
    transition: transform var(--transition-base);
    color: var(--primary);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base) ease-out;
}

.faq-item.active .faq-content {
    max-height: 300px;
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    padding: 5rem 0 2.5rem;
    border-top: 1px solid var(--grey-200);
    background: var(--white);
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    margin-top: 1rem;
    color: var(--text-secondary);
    max-width: 320px;
}

.footer-links h4 {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    border-top: 1px solid var(--grey-100);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.hidden {
    display: none !important;
}

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

.animate-fade {
    animation: fadeIn 0.4s ease forwards;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .selection-card {
        padding: 1.5rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .toggle-group {
        flex-direction: column;
    }
    
    .cta-btn {
        width: 100%;
    }
}

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--grey-200);
}

body.dark-mode .cookie-consent-banner {
    background-color: var(--bg-main);
    border-top-color: var(--grey-100);
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.5);
}

.cookie-content {
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex: 1;
    min-width: 280px;
    margin: 0;
}

.cookie-buttons {
    display: flex;
    gap: 0.75rem;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
}

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

.cookie-btn.accept:hover {
    background-color: var(--primary-hover);
}

.cookie-btn.decline {
    background-color: var(--grey-100);
    color: var(--text-secondary);
}

.cookie-btn.decline:hover {
    background-color: var(--grey-200);
}

body.dark-mode .cookie-btn.decline {
    background-color: var(--grey-800);
    color: var(--white);
}