/* How Big is a Pixel? - Styles */

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

:root {
    --bg-dark: #0a0a0f;
    --bg-card: #1a1a2e;
    --bg-card-light: #252540;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --accent-purple: #8b5cf6;
    --accent-purple-dim: #6d4bc4;
    --red: #ff4444;
    --green: #44ff44;
    --blue: #4488ff;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Screens */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.screen.active {
    display: flex;
    opacity: 1;
}

/* Start Screen */
#start-screen {
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a0f 100%);
    align-items: center;
    justify-content: center;
    text-align: center;
}

.start-content {
    max-width: 600px;
    padding: 2rem;
}

/* Pixel Grid Demo Animation */
.pixel-icon {
    margin-bottom: 2rem;
}

.pixel-grid-demo {
    display: inline-grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 16px;
    animation: pixelPulse 3s ease-in-out infinite;
}

.pixel-grid-demo span {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    animation: pixelGlow 2s ease-in-out infinite;
}

.pixel-grid-demo span:nth-child(1) { animation-delay: 0s; }
.pixel-grid-demo span:nth-child(2) { animation-delay: 0.1s; }
.pixel-grid-demo span:nth-child(3) { animation-delay: 0.2s; }
.pixel-grid-demo span:nth-child(4) { animation-delay: 0.3s; }
.pixel-grid-demo span:nth-child(5) { animation-delay: 0.4s; }
.pixel-grid-demo span:nth-child(6) { animation-delay: 0.5s; }
.pixel-grid-demo span:nth-child(7) { animation-delay: 0.6s; }
.pixel-grid-demo span:nth-child(8) { animation-delay: 0.7s; }
.pixel-grid-demo span:nth-child(9) { animation-delay: 0.8s; }

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

@keyframes pixelGlow {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.start-content h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.start-content .subtitle {
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-purple-dim) 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.4);
}

.primary-btn svg {
    transition: transform 0.2s;
}

.primary-btn:hover svg {
    transform: translateX(4px);
}

.hint {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Experience Screen */
#experience-screen {
    background: #000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#zoom-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: zoom-in;
}

#zoom-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    image-rendering: auto;
    transition: image-rendering 0s;
}

#zoom-canvas.pixelated {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Pixel Grid Overlay */
#pixel-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#pixel-grid.visible {
    opacity: 1;
    background-image:
        linear-gradient(rgba(255,255,255,0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.2) 1px, transparent 1px);
    background-size: var(--grid-size, 50px) var(--grid-size, 50px);
    background-position: center center;
}

/* Subpixel View */
#subpixel-view {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    padding: 30px;
    background: rgba(0,0,0,0.9);
    border-radius: 20px;
    border: 2px solid rgba(255,255,255,0.1);
}

#subpixel-view.visible {
    opacity: 1;
}

/* Subpixel Pattern Switching */
.subpixel-pattern {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.subpixel-pattern.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.subpixel-container {
    display: flex;
    gap: 6px;
    padding: 15px;
    background: #000;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.2);
}

/* LCD Subpixels */
.subpixel-container.lcd {
    background: linear-gradient(180deg, #111 0%, #000 100%);
}

.subpixel {
    width: 40px;
    height: 120px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.subpixel.red {
    background: linear-gradient(180deg, #ff0000 0%, #cc0000 100%);
}
.subpixel.green {
    background: linear-gradient(180deg, #00ff00 0%, #00cc00 100%);
}
.subpixel.blue {
    background: linear-gradient(180deg, #0066ff 0%, #0044cc 100%);
}

/* OLED Subpixels - stronger glow */
.subpixel-container.oled {
    background: #000;
    border-color: rgba(255,255,255,0.05);
}

.subpixel.oled-glow.red {
    background: radial-gradient(ellipse at center, #ff0000 0%, #cc0000 50%, #660000 100%);
    box-shadow: 0 0 30px rgba(255,0,0,0.8), inset 0 0 20px rgba(255,100,100,0.3);
}

.subpixel.oled-glow.green {
    background: radial-gradient(ellipse at center, #00ff00 0%, #00cc00 50%, #006600 100%);
    box-shadow: 0 0 30px rgba(0,255,0,0.8), inset 0 0 20px rgba(100,255,100,0.3);
}

.subpixel.oled-glow.blue {
    background: radial-gradient(ellipse at center, #0088ff 0%, #0066cc 50%, #003366 100%);
    box-shadow: 0 0 30px rgba(0,136,255,0.8), inset 0 0 20px rgba(100,180,255,0.3);
}

/* PenTile Pattern */
.subpixel-container.pentile {
    padding: 20px;
    background: #000;
}

.pentile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    transform: rotate(45deg);
}

.pentile-cell {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.pentile-cell.r {
    background: radial-gradient(circle, #ff0000 0%, #880000 100%);
    box-shadow: 0 0 20px rgba(255,0,0,0.7);
}

.pentile-cell.g {
    background: radial-gradient(circle, #00ff00 0%, #008800 100%);
    box-shadow: 0 0 15px rgba(0,255,0,0.7);
}

.pentile-cell.g.small {
    width: 35px;
    height: 35px;
    margin: auto;
}

.pentile-cell.b {
    background: radial-gradient(circle, #0088ff 0%, #004488 100%);
    box-shadow: 0 0 20px rgba(0,136,255,0.7);
}

/* Retina Pattern - Dense pixels */
.subpixel-container.retina {
    padding: 15px;
    background: linear-gradient(180deg, #1a1a1a 0%, #000 100%);
}

.retina-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 3px;
}

.retina-pixel {
    display: flex;
    gap: 1px;
    padding: 2px;
    background: rgba(30,30,30,0.8);
    border-radius: 2px;
}

.retina-pixel span {
    width: 12px;
    height: 40px;
    border-radius: 1px;
}

.retina-pixel span.r {
    background: linear-gradient(180deg, #ff0000 0%, #aa0000 100%);
    box-shadow: 0 0 4px rgba(255,0,0,0.5);
}

.retina-pixel span.g {
    background: linear-gradient(180deg, #00ff00 0%, #00aa00 100%);
    box-shadow: 0 0 4px rgba(0,255,0,0.5);
}

.retina-pixel span.b {
    background: linear-gradient(180deg, #0088ff 0%, #0055aa 100%);
    box-shadow: 0 0 4px rgba(0,136,255,0.5);
}

.subpixel-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
}

/* Zoom Indicator */
#zoom-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 100;
    background: rgba(0,0,0,0.7);
    padding: 15px 25px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.zoom-bar {
    position: relative;
    width: 280px;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: visible;
}

.zoom-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-purple), #a78bfa);
    border-radius: 3px;
    transition: width 0.1s ease-out;
}

.zoom-markers {
    position: absolute;
    top: -22px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.zoom-markers span {
    opacity: 0.5;
    transition: opacity 0.3s, color 0.3s, transform 0.3s;
}

.zoom-markers span.active {
    opacity: 1;
    color: var(--accent-purple);
    transform: scale(1.1);
}

.zoom-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Monaco', 'Consolas', monospace;
}

/* Info Cards */
#info-cards {
    position: fixed;
    top: 30px;
    left: 30px;
    max-width: 320px;
    z-index: 100;
}

.info-card {
    background: var(--bg-card);
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    display: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

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

.card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.info-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.info-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.info-card p:last-child {
    margin-bottom: 0;
}

.card-note {
    font-size: 0.8rem !important;
    opacity: 0.7;
    font-style: italic;
}

.info-card .red { color: var(--red); font-weight: 600; }
.info-card .green { color: var(--green); font-weight: 600; }
.info-card .blue { color: var(--blue); font-weight: 600; }

/* Fun Fact Container */
#fun-fact-container {
    position: fixed;
    bottom: 100px;
    left: 30px;
    right: 30px;
    max-width: 400px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--bg-card);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    z-index: 100;
}

.fun-fact-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

#fun-fact {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    transition: opacity 0.2s ease;
}

/* Color Mixer */
#color-mixer {
    position: fixed;
    top: 30px;
    right: 30px;
    background: var(--bg-card);
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 100;
    transition: all 0.4s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    max-width: 280px;
}

#color-mixer.hidden {
    opacity: 0;
    transform: translateX(20px);
    pointer-events: none;
}

#color-mixer h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.mixer-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.mixer-controls {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.slider-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.slider-group label {
    width: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.slider-group label.red { color: var(--red); }
.slider-group label.green { color: var(--green); }
.slider-group label.blue { color: var(--blue); }

.slider-group input[type="range"] {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    outline: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.slider-group span {
    width: 32px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: right;
    font-family: 'Monaco', 'Consolas', monospace;
}

.color-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

#mixed-color {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: #ff6432;
    box-shadow: 0 4px 20px rgba(255, 100, 50, 0.4);
    flex-shrink: 0;
}

.color-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#color-hex {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.color-hint {
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Screen Types Explorer */
#screen-types {
    position: fixed;
    bottom: 200px;
    left: 30px;
    background: var(--bg-card);
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 100;
    transition: all 0.4s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    max-width: 280px;
}

#screen-types.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

#screen-types h3 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.screen-types-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

/* Screen Type Tabs */
.screen-type-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-bottom: 0.75rem;
}

.screen-tab {
    padding: 0.4rem 0.3rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.screen-tab:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
}

.screen-tab.active {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    color: white;
}

/* Screen Type Info */
.screen-type-info {
    min-height: 100px;
}

.type-info {
    display: none;
}

.type-info.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.type-info h4 {
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.type-info p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

.type-info p strong {
    color: var(--text-primary);
}

.type-fact {
    background: rgba(139, 92, 246, 0.15);
    border-left: 3px solid var(--accent-purple);
    padding: 0.5rem 0.6rem;
    border-radius: 0 6px 6px 0;
    margin-top: 0.5rem;
    font-style: italic;
    font-size: 0.7rem;
}

/* Navigation Hint */
#nav-hint {
    position: fixed;
    bottom: 170px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    opacity: 0.8;
    animation: bounce 2s infinite;
    z-index: 100;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

#nav-hint.hidden {
    opacity: 0;
    pointer-events: none;
}

.scroll-icon svg {
    animation: scrollPulse 1.5s infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Continue Button */
.continue-btn {
    position: fixed;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.8rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-purple-dim) 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 150;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.continue-btn:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
}

.continue-btn.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(20px);
}

.continue-btn svg {
    transition: transform 0.2s;
}

.continue-btn:hover svg {
    transform: translateX(4px);
}

/* End Screen */
#end-screen {
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0a0a0f 100%);
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    overflow-y: auto;
}

.end-content {
    max-width: 700px;
    padding: 1rem;
}

.end-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: celebration 1s ease-out;
}

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

.end-content h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.end-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat {
    background: var(--bg-card);
    padding: 1.25rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-purple);
    margin-bottom: 0.25rem;
    font-family: 'Monaco', 'Consolas', monospace;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Real Pixels Section */
.real-pixels-section {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.real-pixels-section h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.real-pixels-section > p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.real-pixels-demo {
    display: flex;
    justify-content: center;
    gap: 2px;
    padding: 20px;
    background: #000;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.real-pixel-strip {
    display: flex;
    gap: 1px;
}

.real-subpixel {
    width: 12px;
    height: 50px;
    border-radius: 2px;
}

.real-subpixel.r {
    background: linear-gradient(180deg, #ff0000 0%, #990000 100%);
    box-shadow: 0 0 8px rgba(255,0,0,0.5);
}
.real-subpixel.g {
    background: linear-gradient(180deg, #00ff00 0%, #009900 100%);
    box-shadow: 0 0 8px rgba(0,255,0,0.5);
}
.real-subpixel.b {
    background: linear-gradient(180deg, #0088ff 0%, #004488 100%);
    box-shadow: 0 0 8px rgba(0,136,255,0.5);
}

.real-pixels-note {
    font-size: 0.8rem !important;
    color: var(--text-secondary);
    opacity: 0.8;
    font-style: italic;
}

.cta-section {
    margin-top: 1.5rem;
}

.cta-section h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.cta-section > p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.cta-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.cta-btn.primary {
    color: white;
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-purple-dim) 100%);
}

.cta-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.4);
}

.cta-btn.secondary {
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.2);
}

.cta-btn.secondary:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.1);
}

.text-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}

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

/* Back Link */
.back-link {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    background: rgba(0,0,0,0.5);
    border-radius: 20px;
    transition: all 0.2s;
    z-index: 1000;
}

.back-link:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.1);
}

/* Responsive */
@media (max-width: 768px) {
    #info-cards {
        top: auto;
        bottom: 200px;
        left: 15px;
        right: 15px;
        max-width: none;
    }

    #color-mixer {
        top: auto;
        bottom: 200px;
        left: 15px;
        right: 15px;
        max-width: none;
    }

    #screen-types {
        position: fixed;
        top: auto;
        bottom: 200px;
        left: 15px;
        right: 15px;
        max-width: none;
    }

    #screen-types.hidden {
        transform: translateY(20px);
    }

    #fun-fact-container {
        bottom: 120px;
        left: 15px;
        right: 15px;
        max-width: none;
    }

    #zoom-indicator {
        bottom: 20px;
        padding: 12px 20px;
    }

    .zoom-bar {
        width: 220px;
    }

    .zoom-markers {
        font-size: 0.6rem;
    }

    #subpixel-view {
        padding: 20px;
    }

    .subpixel {
        width: 30px;
        height: 90px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .stat {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .real-pixels-demo {
        padding: 15px;
    }

    .real-subpixel {
        width: 8px;
        height: 35px;
    }

    .end-content {
        padding: 0.5rem;
    }

    #nav-hint {
        bottom: 190px;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .start-content h1 {
        font-size: 2rem;
    }

    .pixel-grid-demo span {
        width: 18px;
        height: 18px;
    }

    .end-icon {
        font-size: 3rem;
    }
}
