/* ============================================
   Hue Logo Styles
   ============================================ */
.hue-logo {
    height: 1.8rem;
    width: auto;
    filter: brightness(0) invert(1);
}

.hue-logo-modal {
    height: 2rem;
    width: auto;
    filter: brightness(0) invert(1);
    margin-right: 0.25rem;
}

/* Light theme: make Hue logos dark */
[data-theme="light"] .hue-logo,
[data-theme="light"] .hue-logo-modal {
    filter: brightness(0) invert(0.2);
}

/* ============================================
   Light Member Toggle Switch
   ============================================ */
.light-member .toggle-switch.on .toggle-slider {
    transform: translateX(20px);
}

/* ============================================
   Hue Lights Modal
   ============================================ */
.hue-modal {
    z-index: 1001;
}

.modal-hue-fullscreen {
    width: 95vw;
    max-width: 95vw;
    height: 95vh;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
}

.hue-modal-content {
    flex: 1;
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.hue-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ============================================
   Hue Room Card
   ============================================ */
.hue-room-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.hue-room-card.room-on {
    border-color: #ffa726;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-elevated) 100%);
}

.hue-room-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
    padding-right: 3.5rem;
}

.hue-room-header:hover {
    background: var(--bg-tertiary);
}

.hue-room-icon {
    font-size: 2rem;
    min-width: 2.5rem;
    text-align: center;
}

.hue-room-info {
    flex: 1;
    min-width: 0;
}

.hue-room-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hue-room-status {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.hue-room-toggle {
    flex-shrink: 0;
}

.hue-room-expand {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.hue-room-expand:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.hue-room-expand svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.hue-room-card.expanded .hue-room-expand svg {
    transform: rotate(180deg);
}

/* ============================================
   Room Details (Expandable)
   ============================================ */
.hue-room-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-light);
}

.hue-room-card.expanded .hue-room-details {
    max-height: 800px;
}

.hue-room-brightness {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.hue-room-brightness label,
.hue-room-scenes label,
.hue-room-lights label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hue-room-brightness input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--bg-tertiary);
    appearance: none;
    cursor: pointer;
}

.hue-room-brightness input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffa726;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Scenes Grid
   ============================================ */
.hue-room-scenes {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.hue-scenes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.hue-scene-btn {
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hue-scene-btn:hover {
    background: var(--bg-elevated);
    border-color: #ffa726;
}

.hue-scene-btn:active {
    transform: scale(0.98);
}

/* ============================================
   Individual Lights
   ============================================ */
.hue-room-lights {
    padding: 1rem;
}

.hue-light-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 1rem;
    min-height: 140px;
    gap: 0.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-tertiary);
    border: 1px solid transparent;
}

.hue-light-row:hover {
    background: var(--bg-elevated);
}

.hue-light-row.light-on {
    background: rgba(255, 167, 38, 0.15);
    border: 1px solid rgba(255, 167, 38, 0.3);
}

.hue-light-row.loading {
    opacity: 0.5;
    pointer-events: none;
}

.hue-light-row.syncing {
    background: rgba(156, 39, 176, 0.15);
    border: 1px solid rgba(156, 39, 176, 0.4);
    cursor: not-allowed;
}

.hue-light-state.sync-active {
    color: #ce93d8;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.hue-light-icon {
    font-size: 2.5rem;
    text-align: center;
}

.hue-light-info {
    flex: 1;
    text-align: center;
    min-width: 0;
    width: 100%;
}

.hue-light-name {
    font-size: 1rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.hue-light-state {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.hue-light-toggle {
    display: none; /* Hidden in compact grid - whole button is clickable */
}

.no-lights {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0.5rem 0;
}

/* Loading state for room cards */
.hue-room-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* ============================================
   Entertainment Area Styling
   ============================================ */
.hue-room-card.entertainment-area {
    border-color: #9c27b0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(156, 39, 176, 0.15) 100%);
}

.hue-room-card.entertainment-area .hue-room-header:hover {
    background: rgba(156, 39, 176, 0.2);
}

.entertainment-activate-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9c27b0;
}

.entertainment-activate-icon svg {
    width: 24px;
    height: 24px;
}

.hue-room-card.entertainment-area.activated {
    border-color: #4caf50;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(76, 175, 80, 0.15) 100%);
}

.hue-room-card.entertainment-area.activated .entertainment-activate-icon {
    color: #4caf50;
}

/* ============================================
   Responsive Hue Modal
   ============================================ */
@media (max-width: 480px) {
    .modal-hue-fullscreen {
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .hue-scenes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hue-scene-btn {
        padding: 0.6rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* ============================================
   Hue Tabs
   ============================================ */
.hue-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
    flex-shrink: 0;
}

.hue-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.5rem 0.75rem;
    border: 2px solid transparent;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 80px;
    color: var(--text-secondary);
}

.hue-tab:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.hue-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.hue-tab.entertainment {
    color: #d8b4fe;
}

.hue-tab.entertainment:hover {
    background: rgba(168, 85, 247, 0.15);
}

.hue-tab.entertainment.active {
    background: #a855f7;
    border-color: #a855f7;
    color: white;
}

.hue-tab-icon {
    font-size: 1.25rem;
}

.hue-tab-name {
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    letter-spacing: 0.3px;
}

.hue-tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* ============================================
   Hue Room Content (Tabbed View)
   ============================================ */
.hue-room-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hue-room-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.hue-room-left-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 50%;
}

.hue-room-right-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 50%;
}

.hue-room-main-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hue-room-main-toggle:hover {
    background: var(--hover-bg);
}

.hue-room-power {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.hue-room-power svg {
    width: 240px;
    height: 240px;
    stroke: var(--text-muted);
    transition: stroke 0.3s ease;
}

.hue-room-power.on {
    background: var(--primary-color);
    box-shadow: 0 0 30px rgba(255, 179, 0, 0.4);
}

.hue-room-power.on svg {
    stroke: white;
}

.hue-room-power-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.hue-room-brightness-section,
.hue-room-lights-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem;
}

.hue-room-scenes-section {
    padding: 0;
}

.hue-lights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.hue-room-brightness-section label,
.hue-room-scenes-section label,
.hue-room-lights-section label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   Brightness Control
   ============================================ */
.hue-brightness-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hue-brightness-control input[type="range"] {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #0f3460, #ffa726);
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.hue-brightness-control input[type="range"]::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #0f3460, #ffa726);
}

.hue-brightness-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid #ffa726;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    margin-top: -8px;
}

.hue-brightness-control input[type="range"]::-moz-range-track {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #0f3460, #ffa726);
}

.hue-brightness-control input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid #ffa726;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.hue-brightness-value {
    min-width: 50px;
    text-align: right;
    font-weight: 600;
    color: var(--text-primary);
}

/* Disabled brightness when syncing */
.hue-room-brightness-section.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.hue-room-brightness-section.disabled input[type="range"] {
    cursor: not-allowed;
}

.hue-scenes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
}

/* ============================================
   Entertainment Content
   ============================================ */
.hue-entertainment-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hue-entertainment-selector {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem;
}

.hue-entertainment-selector label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hue-entertainment-areas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.hue-entertainment-area-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.hue-entertainment-area-btn:hover {
    border-color: #9b59b6;
    background: rgba(155, 89, 182, 0.1);
}

.hue-entertainment-area-btn.selected {
    border-color: #9b59b6;
    background: rgba(155, 89, 182, 0.2);
    box-shadow: 0 0 15px rgba(155, 89, 182, 0.3);
}

.hue-entertainment-area-btn .area-icon {
    font-size: 2rem;
}

.hue-entertainment-area-btn .area-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.hue-entertainment-area-btn .area-lights {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.hue-entertainment-selected {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid #9b59b6;
}

.selected-area-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.selected-area-icon {
    font-size: 2.5rem;
}

.selected-area-info {
    flex: 1;
}

.selected-area-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.selected-area-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #9b59b6;
}

.hue-entertainment-activate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1.25rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hue-entertainment-activate-btn:hover {
    background: linear-gradient(135deg, #8e44ad, #7d3c98);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.4);
}

.hue-entertainment-activate-btn:active {
    transform: translateY(0);
}

.hue-entertainment-activate-btn svg {
    width: 24px;
    height: 24px;
}

.hue-entertainment-activate-btn.already-active {
    background: linear-gradient(135deg, #27ae60, #229954);
    cursor: default;
}

.hue-entertainment-activate-btn.already-active:hover {
    background: linear-gradient(135deg, #27ae60, #229954);
    transform: none;
    box-shadow: none;
}

.hue-entertainment-activate-btn.streaming {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.hue-entertainment-activate-btn.streaming:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
}

.hue-entertainment-buttons {
    margin-bottom: 1rem;
}

/* Entertainment active banner */
.hue-entertainment-active-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(39, 174, 96, 0.15);
    border: 1px solid rgba(39, 174, 96, 0.4);
    border-radius: 8px;
    color: #2ecc71;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.hue-entertainment-active-banner .active-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2ecc71;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(46, 204, 113, 0); }
}

/* Entertainment area active badge */
.hue-entertainment-area-btn.activated {
    border-color: #2ecc71;
    background: rgba(39, 174, 96, 0.15);
}

.area-active-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    background: #2ecc71;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
}

.hue-entertainment-lights {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem;
}

.hue-entertainment-lights label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hue-light-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.hue-light-item:last-child {
    border-bottom: none;
}

/* ============================================
   Sync Box Styles
   ============================================ */
.hue-syncbox-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.hue-syncbox-tab {
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.hue-syncbox-tab:hover {
    background: var(--bg-secondary);
    color: var(--text-color);
}

.hue-syncbox-tab.active {
    background: var(--orange-primary);
    border-color: var(--orange-primary);
    color: white;
}

.hue-syncbox-panel {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.25rem;
}

.hue-syncbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
}

.hue-syncbox-selector {
    display: flex;
    gap: 1rem;
    flex: 1;
}

.hue-syncbox-radio {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2.5rem;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-secondary);
    border: 3px solid transparent;
}

.hue-syncbox-radio:hover {
    background: var(--card-bg);
}

.hue-syncbox-radio.selected {
    background: var(--card-bg);
    border-color: var(--primary-color);
}

.hue-syncbox-radio.syncing {
    border-color: #a855f7;
}

.hue-syncbox-radio input[type="radio"] {
    width: 36px;
    height: 36px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.hue-syncbox-radio .radio-name {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-color);
}

.hue-syncbox-radio .radio-status {
    font-size: 1rem;
    padding: 0.3rem 0.75rem;
    border-radius: 12px;
    background: rgba(138, 43, 226, 0.2);
    color: #a855f7;
    margin-left: 0.5rem;
}

.hue-syncbox-toggle-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 2rem 3rem;
    border-radius: 16px;
    cursor: pointer;
    font-size: 2rem;
    font-weight: 600;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
}

.hue-syncbox-toggle-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(46, 204, 113, 0.4);
}

.hue-syncbox-toggle-btn.streaming {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.hue-syncbox-toggle-btn.streaming:hover {
    box-shadow: 0 8px 30px rgba(231, 76, 60, 0.4);
}

.hue-syncbox-toggle-btn svg {
    width: 48px;
    height: 48px;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Legacy - keep for backwards compat */
.hue-syncbox-toggle {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.hue-syncbox-toggle .hue-entertainment-activate-btn {
    width: 50%;
    min-width: 200px;
}

/* Syncbox Split Layout */
.hue-syncbox-split-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.hue-syncbox-left-column {
    flex: 1;
}

.hue-syncbox-right-column {
    flex: 1;
}

/* Syncbox Grid Layout */
.hue-syncbox-grid-section {
    margin-bottom: 1.5rem;
}

.hue-syncbox-grid-section label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hue-syncbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.hue-syncbox-grid-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.hue-syncbox-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 1rem;
    min-height: 140px;
    gap: 0.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-tertiary);
    border: 1px solid transparent;
}

.hue-syncbox-tile:hover {
    background: var(--bg-elevated);
}

.hue-syncbox-tile.selected {
    background: rgba(138, 43, 226, 0.2);
    border-color: #a855f7;
}

.hue-syncbox-tile .tile-icon {
    font-size: 2.5rem;
}

.hue-syncbox-tile .tile-name {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.hue-syncbox-tile .tile-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Legacy layout styles - keep for backwards compat */
.hue-syncbox-layout {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    max-width: 650px;
    margin: 0 auto;
}

.hue-syncbox-areas-column {
    flex: 1;
    min-width: 220px;
    max-width: 300px;
}

.hue-syncbox-areas-column label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hue-syncbox-settings-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    min-width: 220px;
    max-width: 300px;
}

.hue-syncbox-setting-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hue-syncbox-setting-btn:hover {
    background: var(--card-bg);
    border-color: #a0a0a0;
}

.hue-syncbox-setting-btn .setting-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
}

.hue-syncbox-setting-btn .setting-value {
    font-size: 1.3rem;
    color: var(--text-primary);
    font-weight: 600;
}

.hue-syncbox-areas {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.hue-syncbox-areas .hue-entertainment-area-btn {
    flex-direction: row;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.hue-syncbox-areas .hue-entertainment-area-btn .area-name {
    font-size: 1rem;
}

.hue-entertainment-notice {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 1rem;
}

/* ============================================
   Syncbox Modals
   ============================================ */
.syncbox-modal {
    z-index: 1100; /* Above the hue modal */
}

.syncbox-modal .modal-content {
    max-width: 320px;
}

.syncbox-modal .modal-header {
    justify-content: center;
    position: relative;
}

.syncbox-modal .modal-header h2 {
    text-align: center;
}

.syncbox-modal .modal-close {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.syncbox-modal-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
}

.syncbox-modal-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.syncbox-modal-option:hover {
    background: var(--card-bg);
    border-color: var(--text-secondary);
}

.syncbox-modal-option.active {
    background: rgba(138, 43, 226, 0.2);
    border-color: #a855f7;
}

.syncbox-modal-option .option-icon {
    font-size: 1.5rem;
}

.syncbox-modal-option .option-label {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* ============================================
   Sync Warning Banner
   ============================================ */
.hue-sync-warning-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(138, 43, 226, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.sync-warning-text {
    flex: 1;
}

.sync-warning-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #d8b4fe;
    margin-bottom: 0.15rem;
}

.sync-warning-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.sync-warning-stop-btn {
    padding: 0.5rem 1rem;
    background: #a855f7;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.sync-warning-stop-btn:hover {
    background: #9333ea;
}

/* ============================================
   Light Brightness Popup
   ============================================ */
.light-brightness-modal {
    z-index: 1100;
}

.modal-light-brightness {
    max-width: 400px;
    width: 90%;
}

.light-brightness-content {
    padding: 1.5rem;
}

.light-brightness-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 10px;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.light-brightness-toggle-row:hover {
    background: var(--bg-tertiary);
}

.light-brightness-toggle-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.light-brightness-slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.light-brightness-slider-container input[type="range"] {
    flex: 1;
    height: 40px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, var(--bg-tertiary), #ffa726);
    border-radius: 20px;
    cursor: pointer;
}

.light-brightness-slider-container input[type="range"]::-webkit-slider-runnable-track {
    height: 40px;
    border-radius: 20px;
    background: linear-gradient(to right, var(--bg-tertiary), #ffa726);
}

.light-brightness-slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: white;
    border: 3px solid #ffa726;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    margin-top: 5px;
}

.light-brightness-slider-container input[type="range"]::-moz-range-track {
    height: 40px;
    border-radius: 20px;
    background: linear-gradient(to right, var(--bg-tertiary), #ffa726);
}

.light-brightness-slider-container input[type="range"]::-moz-range-thumb {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: white;
    border: 3px solid #ffa726;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.light-brightness-percent {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffa726;
    min-width: 60px;
    text-align: right;
}

.light-brightness-actions {
    display: flex;
    justify-content: center;
}

/* ============================================
   Scene Open Button
   ============================================ */
.hue-scenes-open-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hue-scenes-open-btn:hover {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-elevated) 100%);
    border-color: var(--primary-color);
}

.scenes-btn-icon {
    font-size: 1.5rem;
}

.scenes-btn-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.scenes-btn-count {
    background: var(--primary-color);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
}

/* ============================================
   Scene Modal
   ============================================ */
.scene-modal {
    z-index: 1100;
}

.modal-scene {
    max-width: 500px;
    width: 90%;
}

.scene-modal-content {
    padding: 1.5rem;
}

.scene-modal-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.scene-modal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 60px;
}

.scene-modal-btn:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ============================================
   Light Theme Overrides
   ============================================ */
[data-theme="light"] .hue-room-power {
    background: var(--bg-elevated);
    border: 3px solid var(--border);
}

[data-theme="light"] .hue-room-power svg {
    stroke: var(--text-muted);
}

[data-theme="light"] .hue-room-power.on {
    border-color: var(--accent);
    background: var(--bg-elevated);
    box-shadow: 0 0 30px rgba(45, 84, 94, 0.3);
}

[data-theme="light"] .hue-room-power.on svg {
    stroke: var(--accent);
}

[data-theme="light"] .hue-tab.active {
    background: var(--accent);
    border-color: var(--accent);
}

[data-theme="light"] .hue-light-row {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}

[data-theme="light"] .hue-light-row.light-on {
    background: rgba(45, 84, 94, 0.1);
    border-color: var(--accent);
}

[data-theme="light"] .hue-scenes-open-btn {
    background: var(--bg-elevated);
    border-color: var(--border);
}

[data-theme="light"] .hue-scenes-open-btn:hover {
    border-color: var(--accent);
}

[data-theme="light"] .scenes-btn-count {
    background: var(--accent);
}

[data-theme="light"] .hue-scene-btn:hover {
    border-color: var(--accent);
}

[data-theme="light"] .hue-room-card.room-on {
    border-color: var(--accent);
}

[data-theme="light"] .hue-tabs {
    background: var(--bg-secondary);
    border-color: var(--border);
}

[data-theme="light"] .hue-tab:hover {
    background: var(--bg-tertiary);
}

[data-theme="light"] .hue-room-card {
    background: var(--bg-elevated);
    border-color: var(--border);
}

[data-theme="light"] .hue-room-header:hover {
    background: var(--bg-secondary);
}

[data-theme="light"] .hue-room-details {
    background: var(--bg-secondary);
}

[data-theme="light"] .hue-syncbox-tile {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}

[data-theme="light"] .hue-syncbox-tile:hover {
    background: var(--bg-secondary);
}

[data-theme="light"] .hue-syncbox-radio {
    background: var(--bg-elevated);
    border-color: var(--border);
}

[data-theme="light"] .hue-syncbox-radio:hover {
    background: var(--bg-secondary);
}

[data-theme="light"] .hue-entertainment-area-btn {
    background: var(--bg-elevated);
    border-color: var(--border);
}

[data-theme="light"] .hue-entertainment-area-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--accent);
}

[data-theme="light"] .light-brightness-toggle-row {
    background: var(--bg-secondary);
}

[data-theme="light"] .light-brightness-toggle-row:hover {
    background: var(--bg-tertiary);
}

[data-theme="light"] .scene-modal-btn {
    background: var(--bg-elevated);
    border-color: var(--border);
}

[data-theme="light"] .scene-modal-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--accent);
    color: var(--accent);
}

[data-theme="light"] .syncbox-modal-option {
    background: var(--bg-elevated);
    border-color: var(--border);
}

[data-theme="light"] .syncbox-modal-option:hover {
    background: var(--bg-secondary);
}

/* Entertainment tab light theme - uses warm plum to complement Sand Tan palette */
[data-theme="light"] .hue-tab.entertainment {
    color: #7c3aed;
}

[data-theme="light"] .hue-tab.entertainment:hover {
    background: rgba(124, 58, 237, 0.12);
    color: #6d28d9;
}

[data-theme="light"] .hue-tab.entertainment.active {
    background: #7c3aed;
    border-color: #7c3aed;
    color: white;
}

/* Sync warning banner light theme */
[data-theme="light"] .hue-sync-warning-banner {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.3);
}

[data-theme="light"] .sync-warning-title {
    color: #6d28d9;
}

[data-theme="light"] .sync-warning-subtitle {
    color: var(--text-secondary);
}

[data-theme="light"] .sync-warning-stop-btn {
    background: #7c3aed;
}

[data-theme="light"] .sync-warning-stop-btn:hover {
    background: #6d28d9;
}
