@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P:wght@400&family=Courier+Prime:wght@400;700&display=swap');

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

body {
    font-family: 'Courier Prime', monospace;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #00ffff;
    min-height: 100vh;
    overflow-x: auto;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid #00ffff;
    border-radius: 10px;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 4px,
        #00ffff 4px,
        #00ffff 8px
    );
    animation: scanline 2s linear infinite;
}

@keyframes scanline {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.title {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.5rem;
    color: #ff00ff;
    text-shadow: 3px 3px 0px #00ffff, 6px 6px 0px #ff00ff;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.2rem;
    color: #00ff00;
    margin-bottom: 10px;
    font-weight: bold;
}

.tagline {
    font-size: 1rem;
    color: #ffff00;
    font-style: italic;
}

.main-content {
    display: grid;
    grid-template-columns: 300px 1fr 250px;
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.control-panel, .info-panel {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff00;
    border-radius: 10px;
    padding: 20px;
}

.upload-section {
    margin-bottom: 25px;
}

.upload-area {
    border: 3px dashed #ff00ff;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 0, 255, 0.05);
}

.upload-area:hover, .upload-area.dragover {
    border-color: #00ffff;
    background: rgba(0, 255, 255, 0.1);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.controls {
    margin-bottom: 25px;
}

.control-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #00ffff;
    font-weight: bold;
}

.slider {
    width: 100%;
    height: 8px;
    background: #333;
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #ff00ff;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #00ffff;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #ff00ff;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #00ffff;
}

.dropdown {
    width: 100%;
    padding: 10px;
    background: #1a1a1a;
    border: 2px solid #00ffff;
    border-radius: 5px;
    color: #00ffff;
    font-family: 'Courier Prime', monospace;
}

.dropdown option {
    background: #1a1a1a;
    color: #00ffff;
}

input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    accent-color: #ff00ff;
}

.demo-images h3 {
    color: #00ff00;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.sample-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.sample-btn {
    padding: 10px;
    background: rgba(0, 255, 0, 0.2);
    border: 2px solid #00ff00;
    border-radius: 5px;
    color: #00ff00;
    font-family: 'Courier Prime', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sample-btn:hover {
    background: rgba(0, 255, 0, 0.4);
    transform: translateY(-2px);
}

.canvas-section {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ff00ff;
    border-radius: 10px;
    padding: 20px;
}

.canvas-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 800px) {
    .canvas-container {
        grid-template-columns: 1fr;
    }
}

.canvas-wrapper {
    text-align: center;
}

.canvas-wrapper h3 {
    color: #ffff00;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

canvas {
    border: 2px solid #00ffff;
    border-radius: 5px;
    max-width: 100%;
    height: auto;
    background: #000;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.canvas-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 20px;
    background: rgba(0, 255, 255, 0.2);
    border: 2px solid #00ffff;
    border-radius: 5px;
    color: #00ffff;
    font-family: 'Courier Prime', monospace;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background: rgba(0, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.3);
}

.btn.primary {
    background: rgba(255, 0, 255, 0.2);
    border-color: #ff00ff;
    color: #ff00ff;
}

.btn.primary:hover {
    background: rgba(255, 0, 255, 0.4);
    box-shadow: 0 5px 15px rgba(255, 0, 255, 0.3);
}

.info-panel h3 {
    color: #ff00ff;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.color-info p {
    margin-bottom: 8px;
    color: #00ffff;
}

.color-info span {
    color: #00ff00;
    font-weight: bold;
}

.palette-preview {
    margin: 25px 0;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    margin-top: 10px;
}

.color-swatch {
    width: 100%;
    height: 20px;
    border: 1px solid #333;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.color-swatch:hover {
    transform: scale(1.2);
    border-color: #fff;
    z-index: 10;
    position: relative;
}

.fun-facts p {
    color: #ffff00;
    font-style: italic;
    transition: opacity 0.5s ease;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.footer {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff00;
    border-radius: 10px;
    margin-top: 20px;
}

.footer a {
    color: #ff00ff;
    text-decoration: none;
    font-weight: bold;
}

.footer a:hover {
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
}

/* Retro CRT effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 0, 0.03),
        rgba(0, 255, 0, 0.03) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1000;
}

/* Glow effects */
.title, .btn:hover, .upload-area:hover {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 15px currentColor;
    }
    to {
        text-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor;
    }
}