/* Color Dimensions Article Specific Styles */

/* Enhanced Color Theory Theme */
.color-theory-gradient {
    background: linear-gradient(135deg, 
        #ff0000 0%,    /* Red */
        #ff8000 14%,   /* Orange */
        #ffff00 28%,   /* Yellow */
        #80ff00 42%,   /* Yellow-Green */
        #00ff00 56%,   /* Green */
        #00ff80 70%,   /* Green-Cyan */
        #00ffff 84%,   /* Cyan */
        #0080ff 100%   /* Blue */
    );
}

/* Color theory badge enhancements */
.color-theory-badge {
    background: linear-gradient(135deg, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff);
    background-size: 300% 300%;
    animation: spectrumShift 8s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.color-theory-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.4) 50%, 
        transparent 100%);
    animation: spectrumSweep 3s ease-in-out infinite;
}

@keyframes spectrumShift {
    0%, 100% { 
        background-position: 0% 50%;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.3);
    }
    25% { 
        background-position: 50% 100%;
        transform: scale(1.02);
        box-shadow: 0 0 20px 10px rgba(255, 255, 0, 0.2);
    }
    50% { 
        background-position: 100% 50%;
        transform: scale(1.05);
        box-shadow: 0 0 30px 15px rgba(0, 255, 0, 0.2);
    }
    75% { 
        background-position: 50% 0%;
        transform: scale(1.02);
        box-shadow: 0 0 20px 10px rgba(0, 255, 255, 0.2);
    }
}

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

/* Color spectrum background animation */
.color-spectrum {
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255, 0, 0, 0.15) 3px, transparent 3px),
        radial-gradient(circle at 40% 60%, rgba(255, 255, 0, 0.15) 2px, transparent 2px),
        radial-gradient(circle at 60% 20%, rgba(0, 255, 0, 0.15) 2.5px, transparent 2.5px),
        radial-gradient(circle at 80% 70%, rgba(0, 255, 255, 0.15) 2px, transparent 2px),
        radial-gradient(circle at 30% 80%, rgba(0, 0, 255, 0.15) 3px, transparent 3px),
        radial-gradient(circle at 70% 40%, rgba(255, 0, 255, 0.15) 2.5px, transparent 2.5px);
    background-size: 80px 80px, 60px 60px, 70px 70px, 50px 50px, 90px 90px, 65px 65px;
    animation: colorSpectrumFloat 20s linear infinite;
}

@keyframes colorSpectrumFloat {
    0% { 
        background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
        filter: hue-rotate(0deg);
    }
    25% { 
        background-position: 20px 20px, -15px 15px, 17px -12px, -8px 25px, 22px -18px, -12px 16px;
        filter: hue-rotate(90deg);
    }
    50% { 
        background-position: 40px 40px, -30px 30px, 35px -25px, -15px 50px, 45px -35px, -25px 32px;
        filter: hue-rotate(180deg);
    }
    75% { 
        background-position: 60px 60px, -45px 45px, 52px -37px, -23px 75px, 67px -53px, -37px 48px;
        filter: hue-rotate(270deg);
    }
    100% { 
        background-position: 80px 80px, -60px 60px, 70px -50px, -30px 100px, 90px -70px, -50px 65px;
        filter: hue-rotate(360deg);
    }
}

/* Enhanced color cube visualization */
.demo-card-experiment .color-cube-preview {
    perspective: 1000px;
    padding: 2rem;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(0, 0, 0, 0.05) 100%);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.demo-card-experiment .cube-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 2rem auto;
    transform-style: preserve-3d;
    animation: cubeRotation 12s linear infinite;
}

.demo-card-experiment .color-cube {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.demo-card-experiment .cube-face {
    position: absolute;
    width: 150px;
    height: 150px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    opacity: 0.8;
}

.demo-card-experiment .cube-face.front {
    background: linear-gradient(45deg, #ff0000, #ffff00, #00ff00, #00ffff);
    transform: translateZ(75px);
}

.demo-card-experiment .cube-face.back {
    background: linear-gradient(-45deg, #ff00ff, #8000ff, #0080ff, #0000ff);
    transform: translateZ(-75px) rotateY(180deg);
}

.demo-card-experiment .cube-face.left {
    background: linear-gradient(90deg, #000000, #808080, #ffffff);
    transform: rotateY(-90deg) translateZ(75px);
}

.demo-card-experiment .cube-face.right {
    background: linear-gradient(-90deg, #000000, #808080, #ffffff);
    transform: rotateY(90deg) translateZ(75px);
}

.demo-card-experiment .cube-face.top {
    background: radial-gradient(circle, #ffffff, #cccccc, #999999);
    transform: rotateX(90deg) translateZ(75px);
}

.demo-card-experiment .cube-face.bottom {
    background: radial-gradient(circle, #333333, #000000);
    transform: rotateX(-90deg) translateZ(75px);
}

@keyframes cubeRotation {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    25% { transform: rotateX(15deg) rotateY(90deg); }
    50% { transform: rotateX(30deg) rotateY(180deg); }
    75% { transform: rotateX(15deg) rotateY(270deg); }
    100% { transform: rotateX(0deg) rotateY(360deg); }
}

/* Cube axes labels */
.demo-card-experiment .cube-axes {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.demo-card-experiment .axis {
    position: absolute;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--laboratory-dark);
}

.demo-card-experiment .hue-axis {
    bottom: 10px;
    right: 10px;
}

.demo-card-experiment .saturation-axis {
    top: 10px;
    right: 10px;
}

.demo-card-experiment .brightness-axis {
    top: 10px;
    left: 10px;
}

/* Color coordinate sliders */
.demo-card-experiment .color-coordinates {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.demo-card-experiment .coordinate-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.demo-card-experiment .coordinate-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--laboratory-dark);
}

.demo-card-experiment .color-slider {
    height: 8px;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
}

.demo-card-experiment .hue-slider {
    background: linear-gradient(90deg, 
        #ff0000 0%, 
        #ffff00 16.66%, 
        #00ff00 33.33%, 
        #00ffff 50%, 
        #0000ff 66.66%, 
        #ff00ff 83.33%, 
        #ff0000 100%);
}

.demo-card-experiment .saturation-slider {
    background: linear-gradient(90deg, 
        #808080 0%, 
        #ff0000 100%);
}

.demo-card-experiment .brightness-slider {
    background: linear-gradient(90deg, 
        #000000 0%, 
        #ff0000 50%, 
        #ffffff 100%);
}

.demo-card-experiment .color-slider::after {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background: white;
    border: 2px solid #333;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Color result display */
.demo-card-experiment .color-result {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
}

.demo-card-experiment .result-swatch {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: #4040BF;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: swatchPulse 2s ease-in-out infinite;
}

@keyframes swatchPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.demo-card-experiment .result-values {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.demo-card-experiment .hex-value {
    font-family: 'Source Code Pro', monospace;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--laboratory-dark);
}

.demo-card-experiment .rgb-value {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.9rem;
    color: var(--lab-gray);
}

/* Saturation dilution simulator styling */
.demo-card-standard .dilution-visualization {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(248, 249, 250, 0.9) 100%);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.demo-card-standard .color-mixing-chamber {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
}

.demo-card-standard .pure-color-source,
.demo-card-standard .gray-addition,
.demo-card-standard .result-color {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.demo-card-standard .color-sample {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.demo-card-standard .color-sample.pure {
    background: #ff0000;
    animation: pureColorShimmer 3s ease-in-out infinite;
}

.demo-card-standard .color-sample.result {
    background: #cc4040;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

@keyframes pureColorShimmer {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.demo-card-standard .mixing-arrow {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--scientific-cyan);
    animation: arrowPulse 2s ease-in-out infinite;
}

@keyframes arrowPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
}

.demo-card-standard .gray-amount-slider {
    width: 80px;
    height: 20px;
    background: linear-gradient(90deg, #ffffff, #808080);
    border-radius: 10px;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.demo-card-standard .slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.demo-card-standard .slider-thumb {
    position: absolute;
    top: 50%;
    left: 25%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: white;
    border: 2px solid #333;
    border-radius: 50%;
    cursor: pointer;
    animation: thumbFloat 3s ease-in-out infinite;
}

@keyframes thumbFloat {
    0%, 100% { left: 25%; }
    50% { left: 75%; }
}

.demo-card-standard .saturation-percentage {
    font-family: 'Source Code Pro', monospace;
    font-weight: 600;
    color: var(--scientific-cyan);
}

/* Saturation scale */
.demo-card-standard .saturation-scale {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(0, 169, 224, 0.05);
    border-radius: 8px;
}

.demo-card-standard .scale-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.demo-card-standard .scale-sample {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.demo-card-standard .scale-point[data-saturation="100"] .scale-sample {
    background: #ff0000;
}

.demo-card-standard .scale-point[data-saturation="75"] .scale-sample {
    background: #cc4040;
}

.demo-card-standard .scale-point[data-saturation="50"] .scale-sample {
    background: #998080;
}

.demo-card-standard .scale-point[data-saturation="25"] .scale-sample {
    background: #80999b;
}

.demo-card-standard .scale-point[data-saturation="0"] .scale-sample {
    background: #808080;
}

.demo-card-standard .scale-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--lab-gray);
}

/* Brightness perception tester styling */
.demo-card-tool .perception-test-area {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 249, 250, 0.95) 100%);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.demo-card-tool .test-image-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.demo-card-tool .test-image {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 2rem;
    border-radius: 8px;
    transition: all 0.5s ease;
}

.demo-card-tool .test-image.normal-view {
    background: #ffffff;
}

.demo-card-tool .test-image.squint-view {
    background: #f0f0f0;
    filter: blur(2px) contrast(0.8);
}

.demo-card-tool .color-patch,
.demo-card-tool .brightness-patch {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    margin: 0 auto;
}

.demo-card-tool .color-patch.red {
    background: #cc3333;
}

.demo-card-tool .color-patch.green {
    background: #33cc33;
}

.demo-card-tool .color-patch.blue {
    background: #3333cc;
}

.demo-card-tool .color-patch.yellow {
    background: #cccc33;
}

.demo-card-tool .brightness-patch.red-brightness {
    background: #777777;
}

.demo-card-tool .brightness-patch.green-brightness {
    background: #aaaaaa;
}

.demo-card-tool .brightness-patch.blue-brightness {
    background: #555555;
}

.demo-card-tool .brightness-patch.yellow-brightness {
    background: #dddddd;
}

/* View toggle buttons */
.demo-card-tool .view-toggle {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.demo-card-tool .view-btn {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(0, 169, 224, 0.3);
    background: rgba(0, 169, 224, 0.1);
    color: var(--scientific-cyan);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    font-weight: 600;
}

.demo-card-tool .view-btn:hover,
.demo-card-tool .view-btn.active {
    background: var(--scientific-cyan);
    color: white;
    transform: translateY(-1px);
}

/* Brightness analysis chart */
.demo-card-tool .brightness-analysis {
    background: rgba(255, 255, 255, 0.8);
    padding: 1rem;
    border-radius: 8px;
}

.demo-card-tool .brightness-chart {
    display: grid;
    gap: 0.5rem;
}

.demo-card-tool .chart-bar {
    display: grid;
    grid-template-columns: 60px 1fr 40px;
    align-items: center;
    gap: 0.5rem;
}

.demo-card-tool .bar-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-align: right;
}

.demo-card-tool .bar-fill {
    height: 8px;
    border-radius: 4px;
    transition: width 0.8s ease;
}

.demo-card-tool .red-bar .bar-fill {
    background: linear-gradient(90deg, #cc3333, #ff6666);
}

.demo-card-tool .green-bar .bar-fill {
    background: linear-gradient(90deg, #33cc33, #66ff66);
}

.demo-card-tool .blue-bar .bar-fill {
    background: linear-gradient(90deg, #3333cc, #6666ff);
}

.demo-card-tool .yellow-bar .bar-fill {
    background: linear-gradient(90deg, #cccc33, #ffff66);
}

.demo-card-tool .bar-value {
    font-family: 'Source Code Pro', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

/* Tone relationship comparison styling */
.demo-card-comparison .color-palette {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.demo-card-comparison .color-swatch {
    aspect-ratio: 1;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.demo-card-comparison .color-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Pure palette colors */
.demo-card-comparison .pure-red { background: #ff0000; }
.demo-card-comparison .pure-orange { background: #ff8000; }
.demo-card-comparison .pure-yellow { background: #ffff00; }
.demo-card-comparison .pure-green { background: #00ff00; }
.demo-card-comparison .pure-blue { background: #0000ff; }
.demo-card-comparison .pure-purple { background: #8000ff; }

/* Toned palette colors */
.demo-card-comparison .toned-red { background: #cc6666; }
.demo-card-comparison .toned-orange { background: #cc9966; }
.demo-card-comparison .toned-yellow { background: #cccc66; }
.demo-card-comparison .toned-green { background: #66cc66; }
.demo-card-comparison .toned-blue { background: #6666cc; }
.demo-card-comparison .toned-purple { background: #9966cc; }

.demo-card-comparison .palette-description {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--laboratory-dark);
}

/* Vibrancy calculator styling */
.demo-card-tool .vibrancy-visualization {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 249, 250, 0.95) 100%);
    padding: 1.5rem;
    border-radius: 8px;
}

.demo-card-tool .vibrancy-grid {
    margin-bottom: 2rem;
}

.demo-card-tool .grid-header {
    text-align: center;
    margin-bottom: 1rem;
}

.demo-card-tool .brightness-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--lab-gray);
}

.demo-card-tool .grid-body {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
}

.demo-card-tool .saturation-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--lab-gray);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.demo-card-tool .vibrancy-matrix {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1rem;
}

.demo-card-tool .vibrancy-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.demo-card-tool .vibrancy-cell:hover {
    border-color: var(--scientific-cyan);
    transform: translateY(-2px);
}

.demo-card-tool .cell-color {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.demo-card-tool .high-sat-dark .cell-color { background: #cc4400; }
.demo-card-tool .high-sat-mid .cell-color { 
    background: #ff6600; 
    animation: vibrancyPulse 2s ease-in-out infinite;
}
.demo-card-tool .high-sat-bright .cell-color { background: #ffaa66; }
.demo-card-tool .low-sat-dark .cell-color { background: #886644; }
.demo-card-tool .low-sat-mid .cell-color { background: #aa8866; }
.demo-card-tool .low-sat-bright .cell-color { background: #ccaa88; }

@keyframes vibrancyPulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(255, 102, 0, 0.3);
    }
    50% { 
        transform: scale(1.1); 
        box-shadow: 0 0 15px 5px rgba(255, 102, 0, 0.1);
    }
}

.demo-card-tool .vibrancy-rating {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.demo-card-tool .vibrancy-cell[data-vibrancy="high"] .vibrancy-rating {
    background: rgba(87, 204, 153, 0.3);
    color: var(--flash-green);
}

.demo-card-tool .vibrancy-cell[data-vibrancy="medium"] .vibrancy-rating {
    background: rgba(255, 155, 66, 0.3);
    color: var(--experiment-orange);
}

.demo-card-tool .vibrancy-cell[data-vibrancy="low"] .vibrancy-rating {
    background: rgba(45, 49, 66, 0.3);
    color: var(--laboratory-dark);
}

/* Simultaneous contrast demonstration */
.demo-card-tool .simultaneous-contrast {
    background: rgba(0, 169, 224, 0.05);
    padding: 1rem;
    border-radius: 8px;
}

.demo-card-tool .contrast-demonstration {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 1rem;
}

.demo-card-tool .contrast-pair {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.demo-card-tool .background-color {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.demo-card-tool .background-color.complementary {
    background: #0066cc;
}

.demo-card-tool .background-color.neutral {
    background: #888888;
}

.demo-card-tool .foreground-color {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.demo-card-tool .test-orange {
    background: #ff6600;
}

.demo-card-tool .contrast-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--lab-gray);
    text-align: center;
}

/* Hue wheel for vibrancy calculator */
.demo-card-tool .hue-selector {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.demo-card-tool .hue-wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        #ff0000 0deg,
        #ffff00 60deg,
        #00ff00 120deg,
        #00ffff 180deg,
        #0000ff 240deg,
        #ff00ff 300deg,
        #ff0000 360deg
    );
    border: 3px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
}

.demo-card-tool .hue-pointer {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: white;
    border: 2px solid #333;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: pointerBob 3s ease-in-out infinite;
}

@keyframes pointerBob {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

/* Color temperature and cast detector styling */
.demo-card-standard .cast-detection-area {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 249, 250, 0.95) 100%);
    padding: 1.5rem;
    border-radius: 8px;
}

.demo-card-standard .neutral-samples {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.demo-card-standard .sample-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.demo-card-standard .color-sample {
    aspect-ratio: 2;
    border-radius: 8px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
    position: relative;
    transition: all 0.3s ease;
}

.demo-card-standard .color-sample:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.demo-card-standard .warm-gray { background: #9d9a95; }
.demo-card-standard .true-gray { background: #999999; }
.demo-card-standard .cool-gray { background: #95999d; }
.demo-card-standard .warm-white { background: #fefcf8; }
.demo-card-standard .true-white { background: #ffffff; }
.demo-card-standard .cool-white { background: #f8fcfe; }

.demo-card-standard .sample-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--laboratory-dark);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.demo-card-standard .cast-indicator {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--scientific-cyan);
    background: rgba(255, 255, 255, 0.8);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    align-self: flex-end;
}

/* Lighting simulation controls */
.demo-card-standard .lighting-simulation {
    background: rgba(0, 169, 224, 0.05);
    padding: 1rem;
    border-radius: 8px;
}

.demo-card-standard .lighting-options {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
}

.demo-card-standard .lighting-btn {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(0, 169, 224, 0.3);
    background: rgba(0, 169, 224, 0.1);
    color: var(--scientific-cyan);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    font-weight: 600;
}

.demo-card-standard .lighting-btn:hover,
.demo-card-standard .lighting-btn.active {
    background: var(--scientific-cyan);
    color: white;
    transform: translateY(-1px);
}

/* Article-specific responsive enhancements */
@media (max-width: 768px) {
    .color-theory-badge {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
    
    .research-info {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .complexity-indicator,
    .research-stats {
        justify-content: center;
    }
    
    .demo-card-experiment .cube-container {
        width: 100px;
        height: 100px;
    }
    
    .demo-card-experiment .cube-face {
        width: 100px;
        height: 100px;
    }
    
    .demo-card-standard .sample-row {
        grid-template-columns: 1fr;
    }
    
    .demo-card-tool .vibrancy-matrix {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }
    
    .demo-card-tool .contrast-demonstration {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Print-specific styles for color dimensions article */
@media print {
    .demo-card-experiment::after,
    .demo-card-tool::after,
    .demo-card-standard::after,
    .demo-card-comparison::after {
        content: "Interactive Color Demo: Visit madscientistinresidence.com to experience color theory demonstrations and HSB color space exploration";
        display: block;
        text-align: center;
        padding: 1rem;
        background: #f0f0f0;
        border: 1px solid #ccc;
        font-style: italic;
        color: #666;
        margin-top: 1rem;
    }
    
    .color-theory-badge,
    .complexity-indicator,
    .color-cube,
    .result-swatch {
        animation: none !important;
    }
}

/* Accessibility enhancements for color content */
@media (prefers-reduced-motion: reduce) {
    .color-theory-badge,
    .color-spectrum,
    .cube-container,
    .result-swatch,
    .mixing-arrow,
    .slider-thumb,
    .vibrancy-cell,
    .hue-pointer {
        animation: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .color-theory-gradient {
        background: linear-gradient(135deg, #cc0000 0%, #0000cc 100%);
    }
    
    .color-sample,
    .scale-sample {
        border-width: 3px;
        border-color: #000000;
    }
    
    .vibrancy-rating {
        background: #ffffff !important;
        color: #000000 !important;
        border: 2px solid #000000;
    }
}