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

body {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0f0f0f 100%);
    color: #e0e0e0;
    font-family: 'Courier New', monospace;
    min-height: 100vh;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2.5em;
    color: #00ffff;
    text-shadow: 0 0 20px #00ffff;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    color: #cccccc;
    font-style: italic;
}

.main-content {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.canvas-container {
    position: relative;
    border: 2px solid #00ffff;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    overflow: hidden;
}

#canvas {
    display: block;
    cursor: crosshair;
    background: #000;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #00ffff;
    padding: 20px;
    border-radius: 10px;
    font-size: 1.2em;
    display: none;
    z-index: 10;
}

.crosshair {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #ff0080;
    border-radius: 50%;
    background: rgba(255, 0, 128, 0.3);
    transform: translate(-50%, -50%);
    display: none;
    z-index: 5;
    pointer-events: none;
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
}

.controls-panel {
    background: rgba(0, 20, 40, 0.9);
    border: 1px solid #00ffff;
    border-radius: 15px;
    padding: 25px;
    min-width: 300px;
    max-width: 350px;
    height: fit-content;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

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

.control-group h3 {
    color: #00ffff;
    margin-bottom: 10px;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.control-btn, .preset-btn {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #00ffff;
    border: 1px solid #00ffff;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9em;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.control-btn:hover, .preset-btn:hover {
    background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    transform: translateY(-2px);
}

.preset-btn {
    font-size: 0.8em;
    padding: 8px 12px;
}

.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #333;
    outline: none;
    margin-top: 10px;
}

.slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #00ffff;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

.slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #00ffff;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

.select {
    width: 100%;
    padding: 10px;
    background: #1a1a2e;
    color: #00ffff;
    border: 1px solid #00ffff;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9em;
    cursor: pointer;
}

.select:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.info-panel {
    background: rgba(0, 40, 80, 0.3);
    border: 1px solid #004080;
    border-radius: 10px;
    padding: 15px;
    margin-top: 10px;
}

.coordinates {
    font-size: 0.9em;
    line-height: 1.6;
}

.coordinates div {
    margin-bottom: 5px;
}

.fun-fact {
    color: #ffff00;
    font-style: italic;
    margin-top: 10px;
    font-size: 0.85em;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    border-top: 1px solid #333;
    color: #888;
}

footer a {
    color: #00ffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Responsive design */
@media (max-width: 1200px) {
    .main-content {
        flex-direction: column;
        align-items: center;
    }
    
    #canvas {
        width: 100%;
        max-width: 800px;
        height: auto;
    }
    
    .controls-panel {
        max-width: 800px;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    #canvas {
        width: 100%;
        height: 400px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .control-btn, .preset-btn {
        width: 100%;
    }
}

/* Smooth transitions */
.control-btn, .preset-btn, .select, .slider {
    transition: all 0.3s ease;
}

/* Glow effects */
.controls-panel {
    position: relative;
}

.controls-panel::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #00ffff, #ff0080, #00ffff);
    border-radius: 17px;
    z-index: -1;
    opacity: 0.3;
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    from { opacity: 0.3; }
    to { opacity: 0.6; }
}

/* Loading animation */
.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}