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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #eee;
    min-height: 100vh;
    line-height: 1.6;
}

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

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

header h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.subtitle {
    color: #888;
    font-size: 1.1rem;
}

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

.canvas-container {
    position: relative;
    background: #0f0f1e;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

canvas {
    display: block;
    width: 100%;
    height: auto;
    cursor: crosshair;
}

.canvas-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
}

.coordinates {
    color: #4ecdc4;
    font-family: 'Courier New', monospace;
}

.controls {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.control-group h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 600;
}

.styled-select {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #eee;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.styled-select:hover {
    border-color: #667eea;
}

.styled-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
    color: #ccc;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.checkbox-label:hover {
    color: #fff;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.number-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.number-input {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.number-input label {
    width: 30px;
    color: #4ecdc4;
    font-weight: 600;
}

.number-input input {
    width: 70px;
    padding: 6px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #eee;
    font-size: 0.9rem;
    text-align: center;
}

.number-input span {
    color: #888;
}

.styled-input:focus {
    outline: none;
    border-color: #667eea;
}

.slider {
    width: calc(100% - 50px);
    margin-right: 10px;
    cursor: pointer;
}

.result-display {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.result-row:last-child {
    margin-bottom: 0;
}

.result-row .label {
    color: #888;
}

.result-row .value {
    color: #ffe66d;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.btn {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #eee;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.interpretation {
    background: rgba(102, 126, 234, 0.1);
    border-left: 3px solid #667eea;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.interpretation p {
    color: #ccc;
}

footer {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 0.9rem;
}

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

footer a:hover {
    color: #764ba2;
}

/* Responsive design */
@media (max-width: 1024px) {
    main {
        grid-template-columns: 1fr;
    }

    .controls {
        order: 2;
    }

    canvas {
        max-height: 500px;
    }
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.animate {
    animation: pulse 1s ease-in-out;
}
