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

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #0f0f23, #1a1a2e);
    color: #00ff88;
    min-height: 100vh;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(0, 255, 136, 0.1);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

h1 {
    font-size: 2.5rem;
    color: #00ffff;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: #88ff88;
    opacity: 0.8;
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.display-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.display-panel {
    background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        0 0 30px rgba(0, 0, 0, 0.8),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    border: 2px solid #333;
}

#canvas {
    border-radius: 10px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.controls-grid {
    display: grid;
    gap: 20px;
}

.control-group {
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 10px;
    padding: 20px;
}

.control-group h3 {
    color: #00ffff;
    margin-bottom: 15px;
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

#charInput {
    width: 100%;
    padding: 12px;
    font-size: 1.5rem;
    font-family: 'Courier New', monospace;
    background: #1a1a1a;
    border: 2px solid #00ff88;
    border-radius: 5px;
    color: #00ffff;
    text-align: center;
    margin-bottom: 10px;
}

#charInput:focus {
    outline: none;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

button {
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border: 2px solid #00ff88;
    color: #00ffff;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    transition: all 0.3s ease;
}

button:hover {
    background: linear-gradient(145deg, #00ff88, #00cc70);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.6);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

#clearBtn {
    width: 100%;
    font-size: 1.1rem;
    padding: 12px;
}

.segment-controls {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.segment-btn {
    aspect-ratio: 1;
    font-size: 1.2rem;
    font-weight: bold;
}

.segment-btn.active {
    background: linear-gradient(145deg, #ff6600, #ff8800);
    color: #000;
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.8);
}

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

.customization-controls {
    display: grid;
    gap: 15px;
}

.customization-controls label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #88ff88;
}

select, input[type="range"] {
    background: #1a1a1a;
    border: 2px solid #00ff88;
    border-radius: 5px;
    color: #00ffff;
    padding: 8px;
    font-family: 'Courier New', monospace;
}

select:focus, input[type="range"]:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

input[type="range"] {
    -webkit-appearance: none;
    height: 8px;
    background: #333;
    border-radius: 4px;
}

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

.character-gallery {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.char-btn {
    aspect-ratio: 1;
    font-size: 1rem;
    padding: 8px;
}

.animation-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.info-panel {
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.info-panel h3 {
    color: #00ffff;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.info-panel p {
    color: #88ffff;
    line-height: 1.6;
}

footer {
    text-align: center;
    padding: 30px 20px;
    border-top: 1px solid rgba(0, 255, 136, 0.2);
    color: #66ff99;
}

footer p {
    margin-bottom: 5px;
}

footer a {
    color: #00ffff;
    text-decoration: none;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

footer a:hover {
    text-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
}

@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .character-gallery {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .animation-controls {
        grid-template-columns: 1fr;
    }
    
    .segment-controls {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .display-panel {
        padding: 15px;
    }
    
    #canvas {
        width: 250px;
        height: 333px;
    }
}