.control-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 340px;
    max-height: calc(100vh - 40px);
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    z-index: 10;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.control-panel::-webkit-scrollbar {
    width: 4px;
}
.control-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 15px;
}

.header h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #ffffff 40%, var(--accent-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.header p {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.section-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-red);
    font-weight: 600;
    margin-bottom: 12px;
}

.control-group {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 14px;
}

.control-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

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

.label-val {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 500;
}

.label-val span.val {
    color: var(--accent-red);
    font-weight: 600;
}

/* Custom inputs styling */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--accent-red);
    cursor: pointer;
    box-shadow: 0 0 10px var(--accent-red);
    transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Switch toggles */
.switch-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 10px;
}

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

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-red);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

button {
    font-family: 'Outfit', sans-serif;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

button:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    box-shadow: 0 0 10px rgba(246, 1, 1, 0.4);
}

/* Round Action Buttons (Camera lock, YouTube, Twitter) */
.camera-lock-btn,
.round-action-btn {
    position: fixed;
    left: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--accent-red);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s, opacity 0.3s ease, visibility 0.3s ease;
    text-decoration: none;
}
.camera-lock-btn {
    bottom: 20px;
}
.round-action-btn.social-btn-youtube {
    bottom: 74px;
}
.round-action-btn.social-btn-twitter {
    bottom: 128px;
}
.round-action-btn.social-btn-instagram {
    bottom: 182px;
}
.camera-lock-btn:hover,
.round-action-btn:hover {
    background-color: #d60101;
    transform: scale(1.05);
    color: white;
    box-shadow: 0 0 12px rgba(246, 1, 1, 0.6);
}
.camera-lock-btn:active,
.round-action-btn:active {
    transform: scale(0.95);
}

/* Hide buttons and sidebars in TV screen focus mode */
body.tv-focused .camera-lock-btn,
body.tv-focused .round-action-btn,
body.tv-focused .sidebar-tab,
body.tv-focused .sidebar-tab-left,
body.tv-focused .sidebar-panel,
body.tv-focused .sidebar-panel-left {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}
