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

body {
    font-family: 'Rajdhani', sans-serif;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

.header {
    background: linear-gradient(90deg, #1e3c72 0%, #2a5298 50%, #8e44ad 100%);
    padding: 1rem 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.title {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 900;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    background: linear-gradient(45deg, #00ffff, #ff00ff, #ffff00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.powered-by {
    font-size: 0.9rem;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.main-container {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    height: calc(100vh - 120px);
    gap: 1rem;
    padding: 1rem;
}

.sidebar {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    overflow-y: auto;
}

.left-sidebar {
    background: linear-gradient(135deg, rgba(255, 0, 100, 0.1) 0%, rgba(0, 255, 255, 0.1) 100%);
}

.right-sidebar {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.1) 0%, rgba(100, 0, 255, 0.1) 100%);
}

.panel h3, .panel h4 {
    font-family: 'Orbitron', monospace;
    color: #00ffff;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.led-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #666;
    transition: all 0.3s ease;
}

.joint-tracking {
    margin-bottom: 2rem;
}

.joint-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.joint-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    font-size: 0.9rem;
}

.signal-bars {
    display: inline-flex;
    gap: 2px;
    align-items: flex-end;
}

.signal-bars::before {
    content: '';
    width: 3px;
    height: 6px;
    background: #333;
    margin-right: 1px;
}

.signal-bars[data-strength="1"]::before { background: #ff3333; }
.signal-bars[data-strength="2"]::before { background: #ff6600; }
.signal-bars[data-strength="3"]::before { background: #ffcc00; }
.signal-bars[data-strength="4"]::before { background: #66ff00; }
.signal-bars[data-strength="5"]::before { background: #00ff00; box-shadow: 0 0 5px #00ff00; }

.recording-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.record-btn, .save-btn, .export-btn {
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.record-btn {
    background: #00ff88;
    color: #000;
}

.save-btn, .export-btn {
    background: rgba(0, 255, 255, 0.2);
    color: #00ffff;
    border: 1px solid #00ffff;
}

.save-btn:disabled, .export-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.record-btn:hover, .save-btn:hover:not(:disabled), .export-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.3);
}

.viewport {
    position: relative;
    background: radial-gradient(circle at center, rgba(0, 20, 40, 0.8) 0%, rgba(0, 0, 0, 0.9) 100%);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid rgba(0, 255, 255, 0.3);
}

.viewport-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 2rem;
    z-index: 10;
}

.frame-counter, .fps-counter {
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    color: #00ffff;
    backdrop-filter: blur(10px);
}

.motion-dropdown {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #00ffff;
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
    margin-bottom: 1.5rem;
    cursor: pointer;
}

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

.playback-controls {
    margin-bottom: 1.5rem;
}

.control-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.control-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #00ffff, #0080ff);
    color: #000;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
}

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

.progress-container, .speed-control {
    margin-bottom: 1rem;
}

.slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
}

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

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

.view-options {
    margin-top: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #00ffff;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.status-left {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(0, 255, 255, 0.5);
    background: rgba(0, 255, 255, 0.1);
    color: #00ffff;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Rajdhani', sans-serif;
    transition: all 0.3s ease;
}

.view-btn:hover, .view-btn.active {
    background: rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

.easter-egg {
    font-size: 0.8rem;
    opacity: 0.6;
    font-style: italic;
    color: #888;
    transition: all 0.3s ease;
}

.footer {
    text-align: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

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

.footer a:hover {
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr;
        height: auto;
    }
    
    .sidebar {
        padding: 1rem;
    }
    
    .title {
        font-size: 1.8rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .status-bar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .status-left {
        justify-content: center;
    }
    
    .viewport-overlay {
        flex-direction: column;
        gap: 0.5rem;
    }
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00ffff, #ff00ff);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #00cccc, #cc00cc);
}

/* Animation for recording indicators */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.led-indicator[style*="background: rgb(255, 51, 51)"] {
    animation: pulse 1s infinite;
}

/* Glitch effect for easter egg mode */
@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

.easter-egg[style*="color: rgb(255, 0, 255)"] {
    animation: glitch 0.3s infinite;
    text-shadow: 0 0 10px #ff00ff;
}