/* Custom styles for LetterGlitch */

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

body {
    background: #0a0a0a;
    color: #00ffff;
    font-family: 'Roboto Mono', monospace;
    overflow-x: hidden;
}

.header {
    text-align: center;
    padding: 20px;
    background: linear-gradient(90deg, #1a1a1a, #2a2a2a, #1a1a1a);
    border-bottom: 2px solid #00ffff;
}

.app-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.5rem;
    color: #00ffff;
    text-shadow: 0 0 20px #00ffff, 0 0 40px #00ffff;
    animation: titleGlow 2s ease-in-out infinite alternate;
    margin-bottom: 10px;
}

@keyframes titleGlow {
    from { text-shadow: 0 0 20px #00ffff, 0 0 40px #00ffff; }
    to { text-shadow: 0 0 30px #ff006e, 0 0 50px #ff006e; }
}

.tagline {
    font-size: 1rem;
    color: #39ff14;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.main-container {
    display: flex;
    min-height: calc(100vh - 140px);
}

.canvas-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

#canvas {
    border: 2px solid #00ffff;
    border-radius: 5px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    background: #000;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.glitch-loader {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2rem;
    color: #00ffff;
    animation: glitchText 0.5s infinite linear;
}

@keyframes glitchText {
    0% { text-shadow: 2px 0 #ff006e; }
    25% { text-shadow: -2px 0 #00ffff; }
    50% { text-shadow: 2px 0 #39ff14; }
    75% { text-shadow: -2px 0 #ffbe0b; }
    100% { text-shadow: 2px 0 #8338ec; }
}

.controls-panel {
    width: 350px;
    background: #1a1a1a;
    border-left: 2px solid #00ffff;
    padding: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 140px);
}

.upload-zone {
    border: 2px dashed #00ffff;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-zone:hover, .upload-zone.drag-over {
    border-color: #39ff14;
    background: rgba(57, 255, 20, 0.1);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.3);
}

.upload-content {
    pointer-events: none;
}

.camera-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.upload-btn {
    background: linear-gradient(45deg, #00ffff, #39ff14);
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
    pointer-events: auto;
}

.upload-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.control-section {
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(42, 42, 42, 0.5);
    border-radius: 10px;
    border: 1px solid #333;
}

.control-section h3 {
    font-family: 'Orbitron', sans-serif;
    color: #39ff14;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 1px;
}

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

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #333, #00ffff);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #00ffff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.7);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #00ffff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.7);
}

select {
    width: 100%;
    background: #333;
    color: #00ffff;
    border: 1px solid #00ffff;
    padding: 8px;
    border-radius: 5px;
    font-family: 'Roboto Mono', monospace;
}

textarea {
    width: 100%;
    min-height: 80px;
    background: #333;
    color: #00ffff;
    border: 1px solid #00ffff;
    padding: 10px;
    border-radius: 5px;
    font-family: 'Roboto Mono', monospace;
    resize: vertical;
}

.character-types {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.character-types label {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    cursor: pointer;
}

.character-types input[type="checkbox"] {
    margin-right: 5px;
    accent-color: #00ffff;
}

.color-palette-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.palette-btn {
    background: #333;
    color: #00ffff;
    border: 1px solid #555;
    padding: 10px;
    border-radius: 5px;
    font-family: 'Roboto Mono', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.palette-btn:hover {
    border-color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.palette-btn.active {
    background: linear-gradient(45deg, #00ffff, #39ff14);
    color: #000;
    border-color: #39ff14;
}

.preset-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.preset-btn, .randomize-btn {
    background: linear-gradient(45deg, #8338ec, #ff006e);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 5px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.preset-btn:hover, .randomize-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(131, 56, 236, 0.5);
}

.randomize-btn {
    grid-column: span 2;
    background: linear-gradient(45deg, #ffbe0b, #ff006e);
}

.export-section {
    padding: 15px;
    background: rgba(42, 42, 42, 0.5);
    border-radius: 10px;
    border: 1px solid #333;
}

.export-section h3 {
    font-family: 'Orbitron', sans-serif;
    color: #39ff14;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.export-btn {
    width: 100%;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #39ff14, #00ffff);
    color: #000;
    border: none;
    padding: 12px;
    border-radius: 5px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.export-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.5);
}

/* Checkbox styling */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #00ffff;
    margin-right: 8px;
}

/* Scrollbar styling */
.controls-panel::-webkit-scrollbar {
    width: 8px;
}

.controls-panel::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.controls-panel::-webkit-scrollbar-thumb {
    background: #00ffff;
    border-radius: 4px;
}

.controls-panel::-webkit-scrollbar-thumb:hover {
    background: #39ff14;
}

/* Responsive design */
@media (max-width: 1200px) {
    .main-container {
        flex-direction: column;
    }
    
    .controls-panel {
        width: 100%;
        max-height: none;
        border-left: none;
        border-top: 2px solid #00ffff;
    }
    
    #canvas {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 768px) {
    .app-title {
        font-size: 1.8rem;
    }
    
    .controls-panel {
        padding: 15px;
    }
    
    .color-palette-grid,
    .preset-buttons {
        grid-template-columns: 1fr;
    }
    
    .randomize-btn {
        grid-column: span 1;
    }
}