#interactive-demo {
    background: radial-gradient(circle at 50% 50%, #0f172a 0%, #020617 100%);
    padding: 100px 0;
    overflow: hidden;
    scroll-margin-top: 80px;
    position: relative;
}

/* Subtle Animated Grid Layer */
#interactive-demo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(212, 175, 55, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    animation: grid-drift 60s linear infinite;
}

@keyframes grid-drift {
    from {
        background-position: 0 0;
    }

    to {
        background-position: 500px 500px;
    }
}

.demo-container {
    display: grid;
    grid-template-columns: 420px 1fr;
    align-items: start;
    /* Align to top for dashboard layout */
    gap: 40px;
    max-width: 1550px;
    margin: 40px auto;
    padding: 60px 40px;

    /* Ethereal Dashboard Container Style */
    background: var(--glass-surface);
    backdrop-filter: var(--glass-blur-lg);
    -webkit-backdrop-filter: var(--glass-blur-lg);
    border-radius: 40px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-glass), 0 20px 80px rgba(0, 0, 0, 0.4);
}

@media (max-width: 1200px) {
    .demo-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 40px 20px;
        max-width: 100%;
    }
}


/* --- Floor Plan Layout (Premium Display) --- */
.floor-plan-container {
    flex: 1;
    width: 100%;
    aspect-ratio: 1.2 / 1;
    background-image: url('../images/demo-home.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;

    /* Remove 3D Perspective for precise light alignment */
    transform: none;
    transition: filter 0.3s;

    border-radius: 40px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(212, 175, 55, 0.1);

    background-color: #050a15;
    border: 1px solid rgba(255, 255, 255, 0.05);

    filter: brightness(0.6);
    overflow: visible;
    /* Allow bubbles/hints to pop out */
}

.floor-plan-container:hover {
    /* transform: translateY(-5px); Removed as requested */
    /* Simple vertical lift instead of rotation */
}

@media (max-width: 1100px) {
    .floor-plan-container {
        transform: none;
        max-width: 600px;
        margin: 0 auto;
    }

    .floor-plan-container:hover {
        transform: none;
    }
}


/* Room Overlays */
.room {
    position: absolute;
    pointer-events: none;
    /* Center the label at bottom */
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 20px;
}

/* Always-visible Label */
.room-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    /* Ensure readability */
    z-index: 5;
}

/* Hide Icons */
.room i {
    display: none;
}

/* --- Status Bubbles --- */
.status-bubble {
    position: absolute;
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 8px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-white);
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 20;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    transition: all 0.3s ease;
}

.status-bubble i {
    color: var(--gold-primary);
    font-size: 0.9rem;
}

.status-bubble.temp {
    top: 15%;
    left: 15%;
}

.status-bubble.security {
    top: 10%;
    right: 20%;
}

.status-bubble.energy {
    bottom: 15%;
    right: 15%;
}

.floor-plan-container:hover .status-bubble {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

/* 
   LIGHTING TECHNIQUE:
   ::before -> Bulb
   ::after  -> Glow
   Hidden by default (opacity 0)
*/
.room::before,
.room::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 0.4s ease;
}


/* --- Living Room (Bottom Left) --- */
/* --- Living Room (Bottom Left) --- */
.living-room {
    bottom: 5%;
    left: 5%;
    width: 45%;
    height: 40%;
}

/* Lamp Bulb: Aligned with the floor lamp behind the couch */
.living-room::before {
    top: 27%;
    left: 40%;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #fff 15%, rgba(255, 230, 150, 0.9) 35%, transparent 70%);
    filter: blur(4px);
    z-index: 2;
    box-shadow: 0 0 15px 2px rgba(255, 200, 50, 0.6);
}

/* Room Glow: Centered on the bulb */
.living-room::after {
    top: 15%;
    left: 10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle at center, rgba(255, 190, 80, 0.5), transparent 70%);
    filter: blur(25px);
    z-index: 1;
}



/* --- Kitchen (Bottom Right) --- */
.kitchen {
    bottom: 7%;
    right: 23%;
    width: 40%;
    height: 40%;
}

/* Kitchen Light: Aligned with the central pendant light */
.kitchen::before {
    top: 28%;
    left: 62%;
    width: 50px;
    height: 50px;
    background: radial-gradient(circle, #fff 15%, rgba(255, 255, 220, 0.8) 35%, transparent 70%);
    filter: blur(4px);
    z-index: 2;
    box-shadow: 0 0 20px 5px rgba(255, 255, 200, 0.4);
}

/* Kitchen Ambient Glow */
.kitchen::after {
    top: 10%;
    left: 40%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle at center, rgba(255, 245, 220, 0.5), transparent 70%);
    filter: blur(20px);
    z-index: 1;
}



/* --- Bedroom (Top Right) --- */
.bedroom {
    top: 20%;
    right: 7%;
    width: 45%;
    height: 35%;
}

/* Bedside Lamp: Aligned with the nightstand lamp */
.bedroom::before {
    top: 50%;
    left: 62%;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, #fff 30%, rgba(255, 210, 100, 1) 60%, transparent 90%);
    filter: blur(3px);
    box-shadow: 0 0 15px 5px rgba(255, 180, 50, 0.6);
    z-index: 2;
}

/* Bedroom Ambience */
.bedroom::after {
    top: 30%;
    left: 35%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle at center, rgba(255, 180, 80, 0.5), transparent 65%);
    filter: blur(20px);
    z-index: 1;
}



/* ON State - Activate the pseudo-element lights */
.room.lights-on::before,
.room.lights-on::after {
    opacity: 1;
}

/* --- Responsive Reordering --- */
/* --- Hub Layout --- */
.controller-hub {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.mode-switcher {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mode-btn,
.curtain-mode-btn {
    flex: 1;
    background: transparent !important;
    border: none;
    color: var(--text-gray);
    padding: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.mode-btn:hover,
.curtain-mode-btn:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.05) !important;
}

.mode-btn.active,
.curtain-mode-btn.active {
    background: var(--gold-primary) !important;
    color: #000;
}

.controller-viewport {
    position: relative;
    width: 100%;
    height: 693px;
}

.phone-controller,
.smart-switch-panel {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: opacity 0.4s ease, transform 0.4s ease;
    width: 320px;
}

.phone-controller.hidden,
.smart-switch-panel.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(20px);
}


/* --- Mobile Phone Controller (Realistic iPhone 15 Pro Style) --- */
/* (Existing phone styles apply here automatically) */


/* --- Smart Touch Switch Panel --- */
.smart-switch-panel {
    perspective: 1000px;
    height: auto;
}


.switch-glass {
    width: 100%;
    aspect-ratio: 1/1;
    /* Square board */
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 12px;

    /* Distinct Border and Glossy Bezel */
    border: 1px solid rgba(255, 255, 255, 0.1);
    outline: 6px solid #1a1a1a;
    outline-offset: 2px;
    box-shadow:
        0 0 0 1px rgba(212, 175, 55, 0.3),
        /* Subtle gold rim */
        0 20px 50px rgba(0, 0, 0, 0.8),
        inset 0 0 30px rgba(0, 0, 0, 0.5);

    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
    padding: 12px;
    position: relative;
    overflow: hidden;
    /* Clips children to rounded corners */
}




/* More pronounced Glossy Finish */
.switch-glass::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0) 50%,
            rgba(212, 175, 55, 0.05) 100%);
    pointer-events: none;
    z-index: 20;
}

.switch-module {
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 5;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

/* Ensure sheen is on top of modules but allow clicks */
/* z-index default for switch-module is already 5, no need to restate empty rule */

/* Hint must be above sheen */
.interaction-hint {
    z-index: 100;
}

.switch-module:hover {
    background: rgba(212, 175, 55, 0.05);
}

.switch-module:active {
    background: rgba(0, 0, 0, 0.4);
    transform: scale(0.98);
}

/* Icon Style */
.switch-module i {
    font-size: 1.6rem;
    color: #4b5563;
    /* Muted off state */
    transition: 0.3s;
    text-shadow: none;
}

/* LED Indicator */
.led-indicator {
    width: 8px;
    height: 8px;
    background: #1f2937;
    /* Off state */
    border-radius: 50%;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
    transition: 0.3s;
}

/* ACTIVE STATE (ON) */
.switch-module.active i {
    color: #fff;
    text-shadow: 0 0 15px var(--gold-primary);
    transform: scale(1.1);
}

.switch-module.active .led-indicator {
    background: var(--gold-primary);
    box-shadow: 0 0 12px var(--gold-primary), 0 0 20px var(--gold-primary);
    animation: led-pulse 2s infinite;
}

@keyframes led-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* Master Off Special Style */
.switch-module.master-btn .led-indicator.pink {
    background: #451a1a;
    /* Deep dim red when inactive */
}

.switch-module.master-btn.active .led-indicator.pink {
    background: #ff4444;
    box-shadow: 0 0 12px #ff4444, 0 0 20px rgba(255, 68, 68, 0.4);
}

.switch-module.master-btn:hover i {
    color: #ff4444;
}

/* Panel Label */
.switch-label {
    text-align: center;
    margin-top: 12px;
    color: var(--text-white);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.6;
}

/* --- Mobile Phone Controller (Realistic iPhone 15 Pro Style) --- */
.phone-controller {
    width: 320px;
    height: 693px;
    /* Actual 19.5:9 aspect ratio dimensions */
    position: relative;
    z-index: 10;

    /* Titanium Frame Structure */
    background: #000;
    border-radius: 55px;
    box-shadow:
        0 0 0 2px #3a3a3a,
        /* Inner bezel */
        0 0 0 6px #1a1a1a,
        /* Dark band */
        0 0 0 7px #5a5a5a,
        /* Highlight rim */
        0 20px 50px rgba(0, 0, 0, 0.5);
    /* Drop shadow */

    padding: 12px;
    /* Bezel thickness */
}

/* Dynamic Island / Notch */
.phone-controller::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 85px;
    height: 25px;
    background: #000;
    border-radius: 20px;
    z-index: 100;
    /* Ensure it's above everything */
}


/* Side Buttons */
.phone-controller::after {
    content: '';
    position: absolute;
    left: -8px;
    top: 100px;
    width: 4px;
    height: 35px;
    background: #1a1a1a;
    /* Mute switch */
    border-radius: 4px 0 0 4px;
    box-shadow: 0 60px 0 #2a2a2a, 0 110px 0 #2a2a2a;
    /* Volume Up/Down */
}

/* Power Button (Right) */
.phone-btn-right {
    position: absolute;
    right: -8px;
    top: 130px;
    width: 4px;
    height: 60px;
    background: #1a1a1a;
    border-radius: 0 4px 4px 0;
}

.app-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
    border-radius: 44px;
    /* Screen corner radius */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: 'SF Pro Display', 'Inter', sans-serif;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Slight screen edge definition */
    overflow: hidden;
    /* Fixes the corner clipping issue */
}



/* Refined App Header */
.app-header {
    padding: 70px 24px 20px;
    color: var(--text-white);
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0));
    backdrop-filter: blur(20px);
}


.app-header h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.5px;
    font-family: 'Outfit', sans-serif;
}

.app-header p {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin: 6px 0 0;
    font-weight: 400;
}


.controls-list {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    /* Allow scrolling if list grows */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.controls-list::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}



/* Professional Card-Style Control Items */
/* Professional Card-Style Control Items - Redesigned */
.control-item {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    padding: 22px 24px;
    border-radius: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* Stronger border */
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.control-item:hover {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.control-item.active {
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.05) 100%);
    border-color: rgba(212, 175, 55, 0.5);
    /* Gold border */
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.15);
    /* Golden Glow */
}

.control-item:active {
    transform: scale(0.97);
}

.control-info {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-white);
}

.control-info i {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 14px;
    /* Squircle style */
    font-size: 1.1rem;
    color: var(--gold-primary);
    transition: all 0.3s ease;
}

.control-item.active .control-info i {
    background: var(--gold-primary);
    color: #000;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.control-info span {
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--text-white);
}


/* Modern Toggle Switch - Rounded & Smooth */
.toggle-switch {
    width: 52px;
    height: 30px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 30px;
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active {
    background: var(--gold-primary);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    /* Glow when on */
    border-color: transparent;
}

.toggle-switch.active::after {
    transform: translateX(22px);
    background: #fff;
}

/* App Bottom Navigation Bar */
.app-nav {
    margin-top: auto;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 25px 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-gray);
    font-size: 0.7rem;
    font-weight: 500;
}

.nav-item.active {
    color: var(--gold-primary);
}

.nav-item i {
    font-size: 1.2rem;
}


/* Home Bar (Bottom Swipe Indicator) */
.app-screen::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30%;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

/* --- Interaction Hint Animation --- */
/* --- Interaction Hint Animation --- */
.interaction-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--gold-primary);
    white-space: nowrap;
    /* We can wrap if needed, but relative positioning usually has room */
    pointer-events: none;
    z-index: 1000;
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 30px;
    border: 1px solid var(--gold-primary);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    animation: hint-bump 2s infinite ease-in-out;
    margin-top: 20px;
    position: relative;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

@keyframes hint-bump {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}


/* --- Automated Curtain Demo Styles --- */
.balcony-viewport {
    width: 100%;
    aspect-ratio: 16 / 9;
    /* Wider, more cinematic */
    background: #050a15;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    position: relative;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 0 100px rgba(0, 0, 0, 0.8);
}

/* ... (skipping intervening lines) ... */

.smart-lock-panel {
    background: rgba(15, 23, 42, 0.9);
    /* Glassmorphism base */
    backdrop-filter: blur(20px);
    padding: 40px 30px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Consistent border */
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    width: 100%;
    max-width: 320px;
    text-align: center;
}

.balcony-scene {
    position: relative;
    width: 100%;
    height: 100%;
}

.city-view {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #e9ecef, #f8f9fa);
    /* Simple CSS cityscape */
    background-image: radial-gradient(circle at 20% 30%, #fff 0.5px, transparent 1px),
        radial-gradient(circle at 50% 10%, #fff 0.5px, transparent 1px),
        radial-gradient(circle at 80% 40%, #fff 0.5px, transparent 1px);
    background-size: 100% 100%;
}

/* Distant buildings silhouette */
.city-view::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(transparent, #000);
    clip-path: polygon(0% 100%, 10% 80%, 15% 90%, 25% 70%, 35% 85%, 45% 75%, 55% 90%, 65% 65%, 75% 85%, 85% 70%, 100% 100%);
    opacity: 0.4;
}

.curtain-track {
    position: absolute;
    top: 5%;
    left: 5%;
    right: 5%;
    height: 90%;
    display: flex;
    justify-content: space-between;
}

.curtain {
    width: 48%;
    height: 100%;
    /* Premium Velvet Fabric Simulation - Lightened for Visibility */
    background-color: #1e293b;
    /* Lighter Slate Navy Base */
    background-image:
        /* 1. Fabric Grain (Noise) */
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.15'/%3E%3C/svg%3E"),
        /* 2. Deep Shadow at Top (Rail) */
        linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 20%),
        /* 3. Velvet Sheen (Stronger Highlight) */
        radial-gradient(ellipse at 50% 40%, rgba(56, 189, 248, 0.2), transparent 70%),
        /* 4. Realistic Heavy Folds (Softer Shadows) */
        repeating-linear-gradient(90deg,
            rgba(0, 0, 0, 0.6) 0%,
            rgba(0, 0, 0, 0.1) 2%,
            transparent 5%,
            rgba(255, 255, 255, 0.08) 8%,
            transparent 11%,
            rgba(0, 0, 0, 0.1) 14%,
            rgba(0, 0, 0, 0.6) 16%);
    background-size: 200px 200px, 100% 100%, 100% 100%, 80px 100%;
    /* Pattern Matches Folds */
    box-shadow:
        0 0 50px rgba(0, 0, 0, 0.8),
        inset 0 0 100px rgba(0, 0, 0, 0.5);
    transition: all 2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
    position: relative;
    z-index: 2;
    /* Natural wavy bottom edge */
    clip-path: polygon(0 0, 100% 0, 100% 98%,
            90% 100%, 80% 98%, 70% 100%, 60% 98%, 50% 100%,
            40% 98%, 30% 100%, 20% 98%, 10% 100%, 0 98%);
}

/* Enhanced pleats and fabric sheen */
.curtain::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg,
            rgba(0, 0, 0, 0.5) 0px,
            transparent 25px,
            rgba(255, 255, 255, 0.05) 26px,
            transparent 50px);
    mix-blend-mode: overlay;
}

/* Add a gold trim/border at the bottom for premium look */
.curtain::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gold-primary);
    opacity: 0.3;
}

.curtain-left {
    transform-origin: left;
}

.curtain-right {
    transform-origin: right;
}

/* Curtain States */
.balcony-scene.open .curtain-left {
    transform: scaleX(0.1);
}

.balcony-scene.open .curtain-right {
    transform: scaleX(0.1);
}

.balcony-scene.closing .curtain-left {
    transform: scaleX(1.0);
}

.balcony-scene.closing .curtain-right {
    transform: scaleX(1.0);
}

.curtain-rail {
    position: absolute;
    top: 3%;
    left: 4%;
    right: 4%;
    height: 12px;
    background: linear-gradient(to bottom, #2a2a2a, #000);
    border-radius: 6px;
    z-index: 3;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.window-frame {
    position: absolute;
    inset: 0;
    border: 15px solid #000;
    pointer-events: none;
    z-index: 10;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8);
}

/* --- Physical Remote UI --- */
.physical-remote {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-start;
    /* Align to top */
    justify-content: center;
    padding-top: 0;
}

.remote-body {
    width: 180px;
    background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
    padding: 30px 20px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.8),
        inset 0 2px 2px rgba(255, 255, 255, 0.1);
    text-align: center;
}

.remote-header {
    color: var(--gold-primary);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 0.8rem;
    margin-bottom: 30px;
    opacity: 0.8;
}

.remote-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.6rem;
    letter-spacing: 1px;
}

.remote-led {
    width: 6px;
    height: 6px;
    background: #333;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.remote-led.active {
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
}

.remote-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.remote-btn {
    background: linear-gradient(180deg, #2a2a2a, #1a1a1a);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    width: 70px;
    height: 70px;
    margin: 0 auto;
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.remote-btn i {
    font-size: 1.2rem;
}

.remote-btn span {
    font-size: 0.6rem;
    font-weight: 600;
    opacity: 0.5;
}

.remote-btn:hover {
    background: linear-gradient(180deg, #333, #222);
    transform: translateY(-2px);
}

.remote-btn:active {
    transform: scale(0.95);
    background: #000;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.remote-btn.stop {
    width: 60px;
    height: 60px;
    color: var(--gold-primary);
}

.remote-footer {
    margin-top: 40px;
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* --- Mobile Scheduling Styles --- */
.schedule-list {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

.schedule-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 15px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.schedule-info {
    display: flex;
    flex-direction: column;
}

.schedule-info .time {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-white);
}

.schedule-info .label {
    font-size: 0.75rem;
    color: var(--text-gray);
}

/* Manual App Buttons */
.manual-controls {
    display: flex;
    gap: 10px;
}

.app-small-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.app-small-btn:hover {
    background: var(--gold-primary);
    color: #000;
    border-color: var(--gold-primary);
    transform: translateY(-2px);
}

.app-small-btn:active {
    transform: scale(0.9);
}

.app-small-btn i {
    font-size: 1rem;
}

@keyframes hint-slide-bump {

    0%,
    100% {
        transform: translateY(-50%) translateX(0);
    }

    50% {
        transform: translateY(-50%) translateX(10px);
    }
}





/* The Hand Icon */
.interaction-hint i {
    font-size: 1.2rem;
    color: var(--gold-primary);
}

.interaction-hint span {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}


.interaction-hint.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.interaction-hint.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}




/* --- Smart Door Lock Demo Styles --- */
.lock-panel-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.smart-lock-panel {
    background: rgba(15, 23, 42, 0.9);
    /* Glassmorphism base */
    backdrop-filter: blur(20px);
    padding: 40px 30px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Consistent border */
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    width: 100%;
    max-width: 320px;
    text-align: center;
}

.lock-brand {
    font-size: 0.6rem;
    color: var(--gold-primary);
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 20px;
    opacity: 0.7;
}

.lock-status-display {
    background: #000;
    padding: 15px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    color: #333;
    border: 1px solid #222;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.lock-status-display.unlocked {
    color: #10b981;
    text-shadow: 0 0 10px #10b981;
}

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.key-btn {
    background: linear-gradient(145deg, #1a1a1a, #0a0a0a);
    border: 1px solid #222;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.key-btn:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.key-btn:active {
    transform: scale(0.9);
    background: #000;
}

.key-btn.enter {
    background: var(--gold-primary);
    color: #000;
    border: none;
}

.fingerprint-scan {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #222;
    padding: 20px;
    border-radius: 20px;
    color: var(--text-gray);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.fingerprint-scan i {
    font-size: 2.5rem;
    transition: color 0.3s;
}

.fingerprint-scan:hover {
    background: rgba(212, 175, 55, 0.05);
    border-color: var(--gold-primary);
    color: #fff;
}

.fingerprint-scan.scanning i {
    color: var(--gold-primary);
    animation: glow 1.5s infinite ease-in-out;
}

.mini-phone-notif {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid var(--gold-primary);
    border-radius: 20px;
    padding: 15px 20px;
    position: absolute;
    top: 110%;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
}

.mini-phone-notif.active {
    opacity: 1;
    transform: translateY(0);
}

.notif-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    color: var(--text-gray);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.notif-content {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #fff;
}

.notif-content i {
    font-size: 1.5rem;
    color: var(--gold-primary);
}

.notif-content strong {
    display: block;
    font-size: 0.85rem;
}

.notif-content p {
    font-size: 0.75rem;
    color: var(--text-gray);
}

.door-viewport {
    perspective: 1500px;
    width: 100%;
    height: 800px;
    background: #050a15;
    border-radius: 40px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.door-scene {
    width: 100%;
    height: 100%;
    position: relative;
}

.hall-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, #0a1120, #1e293b);
}

.door-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 400px;
    border: 10px solid #1a1a1a;
    border-bottom: none;
}

.door-leaf {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Premium Dark Walnut Wood Texture */
    background-color: #2d1b12;
    background-image:
        /* Fine Wood Grain */
        repeating-linear-gradient(90deg,
            rgba(0, 0, 0, 0.05) 0px,
            rgba(0, 0, 0, 0.05) 1px,
            transparent 1px,
            transparent 3px),
        /* Larger Grain Variation */
        repeating-linear-gradient(90deg,
            rgba(0, 0, 0, 0.1) 0px,
            rgba(0, 0, 0, 0.1) 2px,
            transparent 2px,
            transparent 8px),
        /* Depth Gradient */
        linear-gradient(to right,
            rgba(0, 0, 0, 0.8) 0%,
            rgba(0, 0, 0, 0.1) 10%,
            rgba(255, 255, 255, 0.05) 20%,
            rgba(0, 0, 0, 0.1) 90%,
            rgba(0, 0, 0, 0.8) 100%);
    transform-origin: left;
    transition: transform 1.5s cubic-bezier(0.645, 0.045, 0.355, 1);
    cursor: pointer;
    z-index: 10;
    box-shadow: 10px 0 50px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    /* For inset panels */
}

/* Panel Effect vs simple border */
.door-leaf::before {
    content: '';
    position: absolute;
    top: 50px;
    bottom: 50px;
    left: 40px;
    right: 40px;
    border: 2px solid rgba(0, 0, 0, 0.6);
    background: rgba(0, 0, 0, 0.2);
    box-shadow:
        inset 0 0 20px rgba(0, 0, 0, 0.8),
        0 1px 0 rgba(255, 255, 255, 0.1);
}

.door-leaf.open {
    transform: perspective(1200px) rotateY(-105deg);
}

.door-texture {
    /* Used for the inner recess panel details */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 70%;
    border: 20px solid rgba(0, 0, 0, 0.3);
    border-image: linear-gradient(to bottom right, rgba(0, 0, 0, 0.8), rgba(255, 255, 255, 0.05)) 1;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.9);
    opacity: 0.6;
}

.door-handle {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 140px;
    /* Modern Long Bar Handle */
    background: linear-gradient(to right, #222, #555, #222);
    border-radius: 8px;
    box-shadow:
        5px 5px 15px rgba(0, 0, 0, 0.5),
        inset 1px 1px 0 rgba(255, 255, 255, 0.2);
    z-index: 20;
}

/* Handle Standoffs */
.door-handle::before,
.door-handle::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 12px;
    background: #111;
}

.door-handle::before {
    top: 15px;
}

.door-handle::after {
    bottom: 15px;
}

.handle-led {
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s;
    box-shadow: 0 0 5px #ef4444;
}

.handle-led.unlocked {
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
}

/* Door Hint - Reusing interaction-hint styles but positioned specifically */
.door-hint {
    position: absolute;
    top: 50%;
    left: -20px;
    /* Float to the left of the door frame */
    transform: translate(-100%, -50%);
    /* Move fully left */
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0;
    width: max-content;
    animation: hint-point-left 2s infinite ease-in-out;
}

@keyframes hint-point-left {

    0%,
    100% {
        transform: translate(-100%, -50%) translateX(0);
    }

    50% {
        transform: translate(-100%, -50%) translateX(-10px);
    }
}

@keyframes glow {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* --- Enhanced Smart Handle & Mobile Mockup --- */
.door-handle {
    right: 20px;
    top: 50%;
    width: 12px;
    height: 70px;
    transform: translateY(-50%);
    background: linear-gradient(to right, #2a2a2a, #444, #2a2a2a);
    border-radius: 5px;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.handle-reader {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 14px;
    height: 14px;
    background: #000;
    border-radius: 50%;
    border: 1px solid #333;
}

.handle-led {
    width: 6px;
    height: 6px;
    top: 19px;
    left: 50%;
    transform: translateX(-50%);
}

.lock-mobile-mockup {
    width: 200px;
    height: 400px;
    flex-shrink: 0;
    background: #000;
    border-radius: 35px;
    border: 8px solid #2a2a2a;
    position: relative;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    background: url('https://images.unsplash.com/photo-1550684848-fac1c5b4e853?q=80&w=2070&auto=format&fit=crop') center/cover;
}

.lock-mobile-mockup::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.lock-panel-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px;
    width: 100%;
}

.mini-phone-notif {
    top: 30px;
    left: 10px;
    right: 10px;
    width: auto;
    transform: translateY(-100px);
    opacity: 0;
}

.mini-phone-notif.active {
    transform: translateY(0);
    opacity: 1;
}

@media (max-width: 1200px) {
    .lock-panel-wrapper {
        flex-direction: column;
        align-items: center;
    }
}

/* Final Polish for Door Demo */
.door-viewport {
    height: 750px !important;
}

.door-frame {
    width: 300px !important;
    height: 600px !important;
    border: 15px solid #1a1a1a !important;
}

.door-leaf {
    width: 100% !important;
    height: 100% !important;
    background: repeating-linear-gradient(45deg, #111, #111 2px, #0a0a0a 2px, #0a0a0a 4px) !important;
}

.door-eye {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 15px;
    background: #222;
    border-radius: 50%;
    border: 2px solid #333;
}

.lock-mobile-mockup {
    margin-top: 20px;
    border: 4px solid #333 !important;
}

.notif-content strong {
    color: var(--gold-primary);
}

.smart-lock-panel {
    border-color: rgba(212, 175, 55, 0.2) !important;
}

/* --- Horizontal Layout Fix --- */
.door-demo-grid {
    display: grid !important;
    grid-template-columns: auto auto 1fr !important;
    gap: 30px !important;
    align-items: center !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 40px !important;
}

@media (max-width: 1200px) {
    .door-demo-grid {
        grid-template-columns: 1fr !important;
        gap: 50px !important;
    }
}

.lock-mobile-mockup {
    width: 220px !important;
    height: 440px !important;
    flex-shrink: 0 !important;
}

.smart-lock-panel {
    width: 320px !important;
    flex-shrink: 0 !important;
}

.balcony-scene.half .curtain-left {
    transform: scaleX(0.5);
}

.balcony-scene.half .curtain-right {
    transform: scaleX(0.5);
}

/* --- Lock Panel Resize Fix --- */
.smart-lock-panel {
    width: 220px !important;
    height: 440px !important;
    padding: 25px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

.key-btn {
    width: 45px !important;
    height: 45px !important;
    font-size: 1rem !important;
}

.keypad {
    gap: 10px !important;
    margin-bottom: 20px !important;
}

.lock-status-display {
    padding: 10px !important;
    font-size: 1rem !important;
    margin-bottom: 15px !important;
}

.fingerprint-scan {
    padding: 15px !important;
}

.fingerprint-scan i {
    font-size: 1.8rem !important;
}

.fingerprint-scan span {
    font-size: 0.7rem !important;
}

.lock-brand {
    margin-bottom: 10px !important;
}

/* --- Fingerprint Hint Styles --- */
.fingerprint-scan {
    position: relative;
}

.fingerprint-hint {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gold-primary);
    color: #000;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
    animation: hint-bounce 2s infinite ease-in-out;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
    z-index: 110;
}

.fingerprint-hint::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--gold-primary);
}

@keyframes hint-bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* --- HOME MOODS SECTION --- */
.moods-container {
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.moods-container h4 {
    color: var(--text-white);
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.mood-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mood-chip {
    flex: 1;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: var(--gold-primary);
    padding: 12px 16px;
    border-radius: 16px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mood-chip:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold-primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
}

.mood-chip:active {
    transform: translateY(-1px) scale(0.98);
}

.mood-chip.active {
    background: var(--gold-primary);
    color: #000;
    border-color: var(--gold-primary);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

/* --- ENHANCED GLASSMORPHISM FOR DEVICE MOCKUPS --- */
.glass-app {
    background: rgba(248, 249, 250, 0.4) !important;
    backdrop-filter: blur(20px);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 30px 80px rgba(0, 0, 0, 0.6),
        inset 0 0 40px rgba(255, 255, 255, 0.02) !important;
}

.glass-app .app-screen {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(2, 6, 23, 0.95) 100%) !important;
    backdrop-filter: blur(30px);
}

/* Enhanced Status Bubbles with Glassmorphism */
.status-bubble {
    background: rgba(248, 249, 250, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(212, 175, 55, 0.4) !important;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(255, 255, 255, 0.02) !important;
}

/* --- DYNAMIC ENERGY COUNTER ANIMATION --- */
.status-bubble.energy span {
    display: inline-block;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.status-bubble.energy.updating {
    animation: energy-pulse 0.6s ease-in-out;
}

@keyframes energy-pulse {

    0%,
    100% {
        transform: translateY(-5px) scale(1);
    }

    50% {
        transform: translateY(-5px) scale(1.1);
    }
}

/* --- ENHANCED BUTTON PRESS ANIMATIONS --- */
.control-item {
    position: relative;
}

.control-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.3), transparent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
    z-index: 0;
}

.control-item.press-active::before {
    width: 300px;
    height: 300px;
}

.switch-module {
    position: relative;
}

.switch-module::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.2), transparent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
    pointer-events: none;
    z-index: 0;
}

.switch-module.press-active::before {
    width: 200px;
    height: 200px;
}

/* --- SMOOTH MODE SWITCHING ANIMATION --- */
.controller-viewport {
    position: relative;
    /* overflow: hidden; Removed to allow hints to show */
}

.phone-controller,
.smart-switch-panel,
.physical-remote {
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.phone-controller.hidden,
.smart-switch-panel.hidden,
.physical-remote.hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateX(-50%) scale(0.95) !important;
}

/* --- NOTIFICATION SLIDE-IN ANIMATION ENHANCEMENT --- */
.mini-phone-notif {
    transform: translateY(-120px) scale(0.9) !important;
    opacity: 0 !important;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.mini-phone-notif.active {
    transform: translateY(0) scale(1) !important;
    opacity: 1 !important;
    animation: notif-glow 2s ease-in-out;
}

@keyframes notif-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(212, 175, 55, 0.6);
    }
}

/* --- AUTO-DEMO BUTTON LOADING STATE --- */
.btn.demo-running {
    background: linear-gradient(90deg,
            var(--gold-primary) 0%,
            rgba(212, 175, 55, 0.7) 50%,
            var(--gold-primary) 100%) !important;
    background-size: 200% 100%;
    animation: gradient-shift 2s linear infinite;
    pointer-events: none;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

/* --- DYNAMIC LIGHT GLOW ENHANCEMENT --- */
.room.lights-on::before {
    animation: light-flicker 0.3s ease-in-out;
}

@keyframes light-flicker {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* --- RESPONSIVE ADJUSTMENTS --- */

@media (max-width: 768px) {

    /* Layout stacking */
    /* Layout stacking */
    .demo-container {
        display: flex !important;
        flex-direction: column-reverse;
        gap: 0 !important;
        /* Remove gap, handle via padding */
        padding: 0 !important;
        /* Remove container padding for edge-to-edge visualizer */
        border-radius: 24px !important;
        overflow: hidden;
    }

    /* Add padding back to the controls area */
    .dashboard-left-panel {
        padding: 24px 12px !important;
        /* Reduced side padding (was 24px) */
        width: 100%;
    }

    /* --- NATIVE UI TRANSFORMATION --- */
    /* Remove Phone Frame Styles */
    .phone-controller {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        height: auto !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
    }

    /* Hide notch and side buttons */
    .phone-controller::before,
    .phone-controller::after,
    .phone-btn-right {
        display: none !important;
    }

    /* App Screen becomes the main container */
    .app-screen {
        border-radius: 20px !important;
        height: 500px !important;
        /* Fixed height for scrolling */
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* --- FINAL MOBILE FIXES --- */

    /* 1. Touch Panel Sizing */
    .controller-viewport {
        display: block !important;
        /* Remove flex centering to allow full width flow */
        width: 100% !important;
        padding: 0 !important;
    }

    .smart-switch-panel {
        width: 100% !important;
        max-width: none !important;
        /* CRITICAL: Remove 320px limit */
        margin: 0 !important;
        transform: none !important;
        left: auto !important;
        right: auto !important;
    }

    .switch-glass {
        width: 100% !important;
        aspect-ratio: 1/1;
        /* Maintain square aspect ratio */
        border-radius: 20px !important;
    }

    /* 2. Alignment - Center Menus */
    .dashboard-nav {
        justify-content: center !important;
        width: 100% !important;
    }

    .dashboard-left-panel {
        align-items: center !important;
        text-align: center !important;
        padding: 20px 10px !important;
        /* Minimal side padding */
    }

    /* 3. Room Fill Lighting (Square) */
    .room::before,
    .room::after {
        border-radius: 4px !important;
        /* Square corners */
    }

    .room::after {
        /* Ambient Glow becomes full room fill */
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        filter: blur(5px) !important;
        opacity: 0;
    }

    .room.lights-on::after {
        opacity: 0.6 !important;
        /* Visible fill */
    }

    /* Hide the small bulb dot */
    .room::before {
        display: none !important;
    }

    /* Adjust specific room fill colors */
    .living-room::after {
        background: rgba(255, 200, 80, 0.4) !important;
    }

    .kitchen::after {
        background: rgba(255, 255, 220, 0.45) !important;
    }

    .bedroom::after {
        background: rgba(255, 180, 80, 0.4) !important;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.8rem !important;
    }

    .app-screen {
        height: 450px !important;
    }

    /* Ensure panel stays full width even on small screens */
    .smart-switch-panel {
        width: 100% !important;
    }
}