@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700&family=Rajdhani:wght@400;500;600;700&display=swap');

:root {
    --bg-dark: #0b0d17;
    --panel-bg: rgba(20, 24, 41, 0.6);
    --panel-border: rgba(65, 105, 225, 0.3);
    --accent-blue: #00f0ff;
    --accent-blue-dim: rgba(0, 240, 255, 0.2);
    --accent-red: #ff3366;
    --text-main: #e0e5ff;
    --text-dim: #8b9bb4;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Rajdhani', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(0, 240, 255, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(255, 51, 102, 0.05), transparent 25%);
}

.dashboard {
    width: 100%;
    max-width: 480px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 12px;
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--accent-blue);
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--accent-blue-dim);
}

.status-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 255, 0, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 0, 0.2);
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #00ff00;
    border-radius: 50%;
    box-shadow: 0 0 8px #00ff00;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(0, 255, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 0, 0); }
}

#status {
    font-size: 0.9rem;
    font-weight: 600;
    color: #00ff00;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Camera Section */
.camera-section {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    padding: 4px;
    background: linear-gradient(135deg, var(--panel-border), transparent);
}

.camera-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #05050a;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.wifi-warning {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 0;
    text-align: center;
    padding: 20px;
}

.wifi-warning p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    font-family: 'Rajdhani', sans-serif;
    text-transform: uppercase;
}

.wifi-icon {
    width: 40px;
    height: 30px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-bottom: 5px;
}

.wifi-wave {
    position: absolute;
    border: 3px solid transparent;
    border-top-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.wave3 {
    width: 40px;
    height: 40px;
    bottom: -15px;
    animation: wifi-wave-pulse 1.5s infinite 0.4s;
}

.wave2 {
    width: 24px;
    height: 24px;
    bottom: -7px;
    animation: wifi-wave-pulse 1.5s infinite 0.2s;
}

.wave1 {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-color: transparent;
    bottom: 0px;
    animation: wifi-dot-pulse 1.5s infinite 0s;
}

@keyframes wifi-wave-pulse {
    0%, 100% { border-top-color: rgba(255, 255, 255, 0.1); filter: drop-shadow(0 0 0 transparent); }
    50% { border-top-color: var(--accent-blue); filter: drop-shadow(0 0 5px var(--accent-blue)); }
}

@keyframes wifi-dot-pulse {
    0%, 100% { background-color: rgba(255, 255, 255, 0.1); box-shadow: 0 0 0 transparent; }
    50% { background-color: var(--accent-blue); box-shadow: 0 0 5px var(--accent-blue); }
}

#cameraImage {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    position: relative;
}

.camera-feed-text {
    position: absolute;
    top: 10px;
    left: 14px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    z-index: 2;
    letter-spacing: 1px;
}

.camera-feed-text::before {
    content: "REC";
    margin-right: 8px;
    color: var(--accent-red);
}

.camera-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 3px 100%;
    z-index: 2;
    pointer-events: none;
}

.controls-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* D-Pad Controls */
.d-pad {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.pad-row {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.pad-row.middle {
    align-items: center;
}

.control-btn {
    width: 65px;
    height: 65px;
    border-radius: 16px;
    background: linear-gradient(145deg, #1a1e36, #121526);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--accent-blue);
    font-size: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 
        5px 5px 15px rgba(0,0,0,0.4),
        -2px -2px 10px rgba(255,255,255,0.02),
        inset 0 1px 0 rgba(255,255,255,0.1);
    transition: all 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
}

.control-btn:active {
    transform: translateY(4px);
    background: #0f1221;
    box-shadow: 
        inset 5px 5px 10px rgba(0,0,0,0.5),
        inset -2px -2px 10px rgba(255,255,255,0.02);
    color: #fff;
    text-shadow: 0 0 8px var(--accent-blue);
    border-color: var(--accent-blue);
}

.center-core {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle at center, #1a1e36, #0b0d17);
    border: 2px solid rgba(65, 105, 225, 0.1);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.center-core::after {
    content: '';
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(65, 105, 225, 0.05);
}

/* Sliders */
.sliders {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-dim);
    text-transform: uppercase;
    font-size: 0.85rem;
}

.value-display {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
}

.value-display.blue {
    color: var(--accent-blue);
    text-shadow: 0 0 5px var(--accent-blue-dim);
}

.value-display.red {
    color: var(--accent-red);
    text-shadow: 0 0 5px rgba(255, 51, 102, 0.3);
}

.neon-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: #1a1e36;
    border-radius: 3px;
    outline: none;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.neon-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 2px solid var(--accent-blue);
    cursor: pointer;
    box-shadow: 0 0 10px var(--accent-blue-dim);
    transition: all 0.2s ease;
}

.neon-slider::-webkit-slider-thumb:hover {
    background: var(--accent-blue);
    box-shadow: 0 0 15px var(--accent-blue);
}

#Light::-webkit-slider-thumb {
    border-color: var(--accent-red);
    box-shadow: 0 0 10px rgba(255, 51, 102, 0.3);
}

#Light::-webkit-slider-thumb:hover {
    background: var(--accent-red);
    box-shadow: 0 0 15px var(--accent-red);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-btn {
    background: rgba(0, 240, 255, 0.15);
    border: 1px solid rgba(0, 240, 255, 0.5);
    color: var(--accent-blue);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
    animation: btn-pulse 2s infinite;
}

@keyframes btn-pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.6); }
    70% { box-shadow: 0 0 0 12px rgba(0, 240, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0); }
}

.icon-btn:hover {
    background: rgba(0, 240, 255, 0.3);
    box-shadow: 0 0 15px var(--accent-blue);
    transform: scale(1.1);
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.1);
    animation: modal-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modal-pop {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-header h2 {
    font-family: 'Orbitron', sans-serif;
    color: var(--text-main);
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 28px;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close-btn:hover {
    color: var(--accent-red);
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.step-num {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 0 10px var(--accent-blue-dim);
}

.step p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-top: 4px;
}

.highlight-blue {
    color: #4da6ff;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(77, 166, 255, 0.3);
}

.highlight-network {
    color: #00ff00;
    font-family: monospace;
    font-size: 1rem;
    background: rgba(0, 255, 0, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 0, 0.2);
}
