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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
}

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

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

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

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

.trackpad-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.coordinates-display {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #666;
}

.trackpad-container {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

#trackpad {
    border: 3px solid #ddd;
    border-radius: 12px;
    cursor: none;
    box-shadow: 
        inset 0 2px 5px rgba(0,0,0,0.1),
        0 5px 15px rgba(0,0,0,0.1);
    background: linear-gradient(145deg, #f0f0f0, #e6e6e6);
}

.gesture-feedback {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.status-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.controls-panel {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    height: fit-content;
}

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

.control-group h3 {
    margin-bottom: 10px;
    color: #333;
    font-size: 1rem;
}

.control-group input[type="range"] {
    width: 100%;
    margin-bottom: 5px;
}

.control-group span {
    font-size: 12px;
    color: #666;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    cursor: pointer;
}

.control-group input[type="checkbox"] {
    margin-right: 8px;
}

.control-group select,
.control-group button {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 5px;
    font-size: 14px;
}

.control-group button {
    background: #667eea;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.control-group button:hover {
    background: #5a6fd8;
}

.debug-panel {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.debug-panel h3 {
    margin-bottom: 15px;
    color: #495057;
}

.debug-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.debug-grid h4 {
    margin-bottom: 10px;
    color: #6c757d;
    font-size: 14px;
}

.debug-grid div {
    font-size: 12px;
    color: #6c757d;
    line-height: 1.4;
}

#heatmap {
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100px;
    height: 75px;
}

footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    font-size: 14px;
}

footer a {
    color: #ffeb3b;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.easter-egg-hint {
    margin-top: 5px;
    font-size: 12px;
    opacity: 0.6;
}

/* Responsive design */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .coordinates-display {
        flex-direction: column;
        gap: 5px;
    }
    
    #trackpad {
        width: 300px;
        height: 225px;
    }
    
    .debug-grid {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2rem;
    }
}

/* Animation classes */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.celebrating {
    animation: pulse 0.5s ease-in-out;
}

/* Range slider styling */
input[type="range"] {
    -webkit-appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}