/* CSS Variables */
:root {
    --primary-bg: #0A0B14;
    --secondary-bg: #11131F;
    --card-bg: rgba(17, 19, 31, 0.95);
    --glass-bg: rgba(255, 255, 255, 0.02);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --accent-blue: #0EA5E9;
    --accent-purple: #8B5CF6;
    --accent-emerald: #10B981;
    --accent-amber: #F59E0B;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-xl: 0 35px 60px -12px rgba(0, 0, 0, 0.35);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.app-container {
    min-height: 100vh;
    background: 
        radial-gradient(circle at 20% 50%, rgba(14, 165, 233, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
        var(--primary-bg);
}

.header {
    padding: 60px 0 40px;
    text-align: center;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
}

.logo {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    display: flex;
    gap: 0.3em;
    justify-content: center;
    align-items: baseline;
    padding: 0 0.2em;
}

.logo-color {
    font-family: 'Comic Sans MS', 'Chalkduster', 'Bradley Hand', cursive;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: colorPulse 12s ease-in-out infinite;
    transform: rotate(-2deg);
    font-style: italic;
    padding: 0 0.1em;
}

.logo-is {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: isPulse 15s ease-in-out infinite;
    font-weight: 400;
}

.logo-data {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: dataPulse 18s ease-in-out infinite;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

@keyframes colorPulse {
    0%, 100% { 
        background-position: 0% 50%;
        filter: hue-rotate(0deg);
    }
    25% {
        background-position: 100% 50%;
        filter: hue-rotate(90deg);
    }
    50% { 
        background-position: 200% 50%;
        filter: hue-rotate(180deg);
    }
    75% {
        background-position: 300% 50%;
        filter: hue-rotate(270deg);
    }
}

@keyframes isPulse {
    0%, 100% { 
        background-position: 50% 0%;
        filter: hue-rotate(45deg);
    }
    33% {
        background-position: 150% 50%;
        filter: hue-rotate(135deg);
    }
    66% { 
        background-position: 250% 100%;
        filter: hue-rotate(225deg);
    }
}

@keyframes dataPulse {
    0%, 100% { 
        background-position: 100% 50%;
        filter: hue-rotate(120deg);
    }
    20% {
        background-position: 200% 25%;
        filter: hue-rotate(200deg);
    }
    40% { 
        background-position: 0% 75%;
        filter: hue-rotate(300deg);
    }
    60% {
        background-position: 150% 0%;
        filter: hue-rotate(60deg);
    }
    80% {
        background-position: 50% 100%;
        filter: hue-rotate(240deg);
    }
}

@keyframes gradientFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: 12px;
}

.description {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

/* Header Share Section */
.header-share {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.share-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.025em;
}

.share-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.share-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--glass-bg);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

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

.share-button:hover::before {
    left: 100%;
}

.share-button:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    background: rgba(255, 255, 255, 0.04);
}

.share-button:active {
    transform: translateY(-1px);
    transition: transform 0.1s ease;
}

.share-button svg {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.share-button:hover svg {
    opacity: 1;
}

/* Platform-specific colors */
.twitter-share:hover {
    border-color: rgba(29, 161, 242, 0.5);
    background: rgba(29, 161, 242, 0.1);
    color: #1DA1F2;
}

.linkedin-share:hover {
    border-color: rgba(10, 102, 194, 0.5);
    background: rgba(10, 102, 194, 0.1);
    color: #0A66C2;
}

.reddit-share:hover {
    border-color: rgba(255, 69, 0, 0.5);
    background: rgba(255, 69, 0, 0.1);
    color: #FF4500;
}

.copy-link:hover {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-emerald);
}

.copy-link.copied {
    border-color: rgba(16, 185, 129, 0.8);
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-emerald);
    transform: scale(1.05);
}

.copy-link.copied::after {
    content: 'Copied!';
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(16, 185, 129, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(-5px); }
    20% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-5px); }
}

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

.analysis-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 32px;
    margin-bottom: 48px;
}

/* Color Laboratory */
.color-lab {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 32px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    height: fit-content;
    position: sticky;
    top: 24px;
}

.lab-header {
    margin-bottom: 32px;
}

.lab-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.lab-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* Color Picker */
.color-picker-container {
    position: relative;
    margin-bottom: 32px;
}

.color-wheel {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    cursor: crosshair;
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 20px 40px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    margin: 0 auto;
    display: block;
}

.color-wheel:hover {
    box-shadow: 
        0 0 0 1px rgba(255, 255, 255, 0.2),
        0 25px 50px rgba(0, 0, 0, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.picker-target {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

/* Input Controls */
.hex-input-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--glass-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.hex-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.hex-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.hex-input:invalid {
    border-color: #EF4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.random-button {
    background: var(--gradient-primary);
    border: none;
    border-radius: 8px;
    padding: 10px 12px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
}

.random-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.random-button:active {
    transform: translateY(0);
}

/* Color Sample */
.color-sample {
    width: 100%;
    height: 120px;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.color-sample::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Color Data Display */
.color-data {
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-row:last-child {
    border-bottom: none;
}

.data-label {
    color: var(--text-muted);
    font-weight: 500;
}

.data-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* Scientific Analysis */
.scientific-analysis {
    display: grid;
    gap: 24px;
}

.analysis-section {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 32px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.section-badge {
    background: var(--gradient-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Charts */
.chart-container {
    position: relative;
    height: 350px;
    margin: 20px 0;
}

.mini-chart {
    height: 200px;
}

/* Metrics */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.metric-card {
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
    cursor: help;
}

.metric-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'JetBrains Mono', monospace;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-unit {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 4px;
}

/* Color References */
.color-reference {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--glass-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.reference-sample {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.reference-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Tabs */
.analysis-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 24px;
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid var(--border-color);
}

.tab-button {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-button.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Spectral Analysis */
.spectral-analysis {
    margin: 24px 0;
}

.wavelength-spectrum {
    width: 100%;
    height: 60px;
    background: linear-gradient(90deg, 
        #8B00FF 0%,     /* 380nm - Violet */
        #4B0082 10%,    /* 400nm - Indigo */
        #0000FF 20%,    /* 450nm - Blue */
        #00FFFF 35%,    /* 500nm - Cyan */
        #00FF00 50%,    /* 550nm - Green */
        #FFFF00 65%,    /* 580nm - Yellow */
        #FF7F00 80%,    /* 620nm - Orange */
        #FF0000 100%    /* 750nm - Red */
    );
    border-radius: 8px;
    position: relative;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.wavelength-marker {
    position: absolute;
    top: -8px;
    width: 3px;
    height: 76px;
    background: #ffffff;
    border-radius: 2px;
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.4);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.spectrum-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

/* Accessibility Matrix */
.accessibility-matrix {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 24px 0;
}

.compliance-card {
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.compliance-score {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
}

.compliance-pass {
    color: var(--accent-emerald);
}

.compliance-fail {
    color: #EF4444;
}

.compliance-warning {
    color: var(--accent-amber);
}

/* Harmony Analysis */
.harmony-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.harmony-scheme {
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: help;
}

.harmony-scheme:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.scheme-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.scheme-name {
    font-weight: 600;
    color: var(--text-primary);
}

.scheme-angle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--accent-blue);
    background: rgba(14, 165, 233, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.harmony-colors {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    justify-content: center;
}

.harmony-color {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.harmony-color.primary {
    border-color: var(--accent-amber);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
}

.harmony-color:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.scheme-description {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
}

.harmony-wheel {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 12px auto;
    position: relative;
    background: conic-gradient(
        from 90deg,
        hsl(0, 70%, 60%) 0deg,
        hsl(60, 70%, 60%) 60deg,
        hsl(120, 70%, 60%) 120deg,
        hsl(180, 70%, 60%) 180deg,
        hsl(240, 70%, 60%) 240deg,
        hsl(300, 70%, 60%) 300deg,
        hsl(360, 70%, 60%) 360deg
    );
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.wheel-marker {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.4);
    transform: translate(-50%, -50%);
    z-index: 15;
}

.wheel-marker.primary {
    width: 18px;
    height: 18px;
    border: 3px solid var(--accent-amber);
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.3), 
        0 0 12px rgba(245, 158, 11, 0.8),
        0 2px 8px rgba(0, 0, 0, 0.4);
    z-index: 20;
}

.wheel-marker.harmony {
    border: 3px solid var(--accent-blue);
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.3), 
        0 0 8px rgba(14, 165, 233, 0.6),
        0 2px 8px rgba(0, 0, 0, 0.4);
}

.harmony-line {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    height: 2px;
    transform-origin: left center;
    z-index: 10;
    pointer-events: none;
}

.harmony-line.primary {
    background: rgba(245, 158, 11, 0.5);
    height: 3px;
}

/* Angle Analysis */
.angle-analysis {
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    margin-top: 24px;
}

.analysis-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.angle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.angle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
}

.angle-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.angle-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: var(--accent-emerald);
}

/* Spectral Decomposition Styles */
.decomposition-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 24px;
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid var(--border-color);
}

.decomp-tab-button {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.decomp-tab-button.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.decomp-tab-content {
    display: none;
}

.decomp-tab-content.active {
    display: block;
}

.component-breakdown {
    margin: 24px 0;
}

.component-channel {
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.component-channel:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.channel-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.channel-icon {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.channel-info {
    flex: 1;
}

.channel-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.channel-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-blue);
}

.channel-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.channel-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
}

.red-fill {
    background: linear-gradient(90deg, #EF4444, #DC2626);
}

.green-fill {
    background: linear-gradient(90deg, #10B981, #059669);
}

.blue-fill {
    background: linear-gradient(90deg, #3B82F6, #2563EB);
}

.channel-percentage {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: right;
}

.wavelength-components {
    margin: 24px 0;
}

.wavelength-range {
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 16px 20px;
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
    transition: all 0.3s ease;
    cursor: help;
}

.wavelength-range:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.range-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.range-name {
    font-weight: 600;
    color: var(--text-primary);
}

.range-wavelength {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.range-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.range-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.violet-range .range-fill {
    background: linear-gradient(90deg, #8B00FF, #9400D3);
}

.blue-range .range-fill {
    background: linear-gradient(90deg, #0000FF, #0066FF);
}

.green-range .range-fill {
    background: linear-gradient(90deg, #00FF00, #32CD32);
}

.yellow-range .range-fill {
    background: linear-gradient(90deg, #FFFF00, #FFD700);
}

.orange-range .range-fill {
    background: linear-gradient(90deg, #FF7F00, #FF8C00);
}

.red-range .range-fill {
    background: linear-gradient(90deg, #FF0000, #DC143C);
}

.range-contribution {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-emerald);
    text-align: right;
}

.opponent-components {
    margin: 24px 0;
}

.opponent-axis {
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.opponent-axis:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.axis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.axis-name {
    font-weight: 600;
    color: var(--text-primary);
}

.axis-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent-blue);
}

.axis-visualizer {
    margin-bottom: 12px;
}

.axis-scale {
    display: flex;
    align-items: center;
    gap: 12px;
}

.scale-label {
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.green-label {
    color: #10B981;
}

.red-label {
    color: #EF4444;
}

.blue-label {
    color: #3B82F6;
}

.yellow-label {
    color: #F59E0B;
}

.dark-label {
    color: var(--text-muted);
}

.light-label {
    color: var(--text-primary);
}

.axis-bar {
    flex: 1;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.red-green-bar {
    background: linear-gradient(90deg, #10B981 0%, rgba(255, 255, 255, 0.1) 50%, #EF4444 100%);
}

.blue-yellow-bar {
    background: linear-gradient(90deg, #3B82F6 0%, rgba(255, 255, 255, 0.1) 50%, #F59E0B 100%);
}

.lightness-bar {
    background: linear-gradient(90deg, #000000 0%, #FFFFFF 100%);
}

.axis-center {
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.6);
    transform: translateX(-50%);
}

.axis-indicator {
    position: absolute;
    top: -2px;
    width: 16px;
    height: 16px;
    background: #FFFFFF;
    border: 2px solid var(--accent-blue);
    border-radius: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: left 0.3s ease;
}

.lightness-fill {
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.8));
    border-radius: 6px;
    transition: width 0.3s ease;
}

.axis-description {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
}

.component-explanation {
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    margin-top: 20px;
}

.component-explanation h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.component-explanation p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.decomposition-summary {
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    margin-top: 24px;
}

.decomposition-summary h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.recipe-components {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recipe-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.recipe-icon {
    font-size: 1.25rem;
    width: 32px;
    text-align: center;
}

.recipe-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Tooltip */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 300px;
    line-height: 1.5;
    box-shadow: var(--shadow-xl);
}

.tooltip-title {
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--accent-blue);
}

.tooltip-simple {
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(16, 185, 129, 0.1);
    border-left: 3px solid var(--accent-emerald);
    border-radius: 4px;
    font-style: italic;
    line-height: 1.4;
}

.tooltip-technical {
    margin-bottom: 8px;
    opacity: 0.9;
    font-size: 0.85rem;
}

.tooltip-formula {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    margin: 8px 0;
}

.tooltip-range {
    font-size: 0.8rem;
    opacity: 0.7;
    font-style: italic;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Focus States */
.metric-card:focus-visible,
.tab-button:focus-visible,
.share-button:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Footer */
.footer {
    margin-top: 80px;
    padding: 60px 24px 40px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(180deg, transparent 0%, rgba(17, 19, 31, 0.5) 100%);
}

.footer-logo {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 900;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    display: flex;
    gap: 0.3em;
    justify-content: center;
    align-items: baseline;
    padding: 0 0.2em;
}

.footer-logo .logo-color {
    font-family: 'Comic Sans MS', 'Chalkduster', 'Bradley Hand', cursive;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: colorPulse 12s ease-in-out infinite;
    transform: rotate(-2deg);
    font-style: italic;
    padding: 0 0.1em;
}

.footer-logo .logo-is {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: isPulse 15s ease-in-out infinite;
    font-weight: 400;
}

.footer-logo .logo-data {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: dataPulse 18s ease-in-out infinite;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.footer-byline {
    font-size: 1.1rem;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: bylinePulse 20s ease-in-out infinite;
    font-weight: 300;
    margin-bottom: 24px;
    font-style: italic;
}

@keyframes bylinePulse {
    0%, 100% { 
        background-position: 25% 50%;
        filter: hue-rotate(30deg);
    }
    20% {
        background-position: 75% 25%;
        filter: hue-rotate(100deg);
    }
    40% { 
        background-position: 125% 75%;
        filter: hue-rotate(180deg);
    }
    60% {
        background-position: 175% 25%;
        filter: hue-rotate(260deg);
    }
    80% {
        background-position: 225% 100%;
        filter: hue-rotate(320deg);
    }
}

/* Footer Share Section */
.footer-share {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.footer-share .share-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.025em;
}

.footer-share .share-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.footer-share .share-button {
    padding: 10px 16px;
    font-size: 0.8rem;
}

.footer-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.footer-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 300% 300%;
    animation: buttonPulse 25s ease-in-out infinite;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.footer-button::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.6s ease;
}

.footer-button:hover::before {
    left: 100%;
}

.footer-button:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    filter: brightness(1.1) saturate(1.1);
}

.footer-button:active {
    transform: translateY(-1px);
    transition: transform 0.1s ease;
}

.footer-button svg {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.email-button {
    animation-delay: -5s;
}

.linkedin-button {
    animation-delay: -12s;
}

@keyframes buttonPulse {
    0%, 100% { 
        background-position: 0% 50%;
        filter: hue-rotate(60deg);
    }
    25% {
        background-position: 100% 25%;
        filter: hue-rotate(150deg);
    }
    50% { 
        background-position: 200% 75%;
        filter: hue-rotate(240deg);
    }
    75% {
        background-position: 300% 0%;
        filter: hue-rotate(300deg);
    }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .analysis-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 0 16px;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .accessibility-matrix {
        grid-template-columns: 1fr;
    }
    
    .color-lab {
        position: static;
    }
    
    .header-share {
        gap: 12px;
    }
    
    .share-buttons {
        gap: 8px;
        justify-content: center;
    }
    
    .share-button {
        padding: 8px 12px;
        font-size: 0.75rem;
        min-width: auto;
        gap: 6px;
        border-radius: 6px;
    }
    
    .share-button svg {
        width: 14px;
        height: 14px;
    }
    
    /* Hide text on mobile, show only icons */
    .share-button span {
        display: none;
    }
    
    /* Show text only for copy button to maintain clarity */
    .copy-link span {
        display: inline;
    }
    
    .footer {
        padding: 40px 16px 30px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 12px;
    }
    
    .footer-button {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .footer-share .share-buttons {
        gap: 8px;
        justify-content: center;
    }
    
    .footer-share .share-button {
        padding: 8px 12px;
        font-size: 0.75rem;
        min-width: auto;
        gap: 6px;
    }
    
    .footer-share .share-button svg {
        width: 14px;
        height: 14px;
    }
    
    /* Hide text on mobile for footer share buttons too */
    .footer-share .share-button span {
        display: none;
    }
    
    .footer-share .copy-link span {
        display: inline;
    }
    
    .decomposition-tabs {
        flex-direction: column;
        gap: 8px;
    }
    
    .decomp-tab-button {
        padding: 16px;
    }
    
    .axis-scale {
        flex-direction: column;
        gap: 8px;
    }
    
    .scale-label {
        min-width: auto;
    }
    
    .recipe-item {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}

/* Targeted Mobile Orientation Fix - Only for header and footer */
@media screen and (max-width: 768px) {
    /* Only apply width fixes to header and footer */
    .header,
    .footer {
        width: 100vw !important;
        min-width: 100vw !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        margin-left: calc(-50vw + 50%) !important;
        position: relative;
    }
    
    /* Ensure header/footer content containers stay centered */
    .header > *,
    .footer > * {
        max-width: 100%;
        padding-left: 16px;
        padding-right: 16px;
        box-sizing: border-box;
    }
    
    /* Don't constrain the main app content */
    .app-container {
        width: 100%;
        max-width: none;
        overflow-x: hidden;
    }
    
    .main-container {
        width: 100%;
        max-width: 1600px;
        margin: 0 auto;
        padding: 0 16px;
    }
}

/* Force recalculation only on orientation change */
@media screen and (orientation: portrait) {
    .header,
    .footer {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

@media screen and (orientation: landscape) {
    .header,
    .footer {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* Force proper reflow for main content on orientation change */
@media screen and (max-width: 768px) {
    /* Ensure main content containers can reflow properly */
    .main-container,
    .analysis-grid,
    .color-lab,
    .scientific-analysis {
        width: 100% !important;
        max-width: 100% !important;
        /* Force GPU layer to help with reflows */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    /* Force reflow for analysis sections */
    .analysis-section {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Ensure color wheel container reflows properly */
    .color-picker-container {
        width: 100% !important;
        display: flex;
        justify-content: center;
    }
    
    /* Force canvas reflow */
    .color-wheel {
        max-width: 280px !important;
        height: auto !important;
    }
}

/* Force recalculation on orientation change */
@media screen and (orientation: portrait) and (max-width: 768px) {
    .main-container,
    .analysis-grid,
    .color-lab,
    .scientific-analysis,
    .analysis-section {
        /* Force reflow */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}