/* Scene 04 Styles */
.scene04-page {
    position: relative;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.scene04-canvas {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    cursor: grab;
}

/* Scene 05 Styles */
.scene05-page {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

.scene05-canvas {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    cursor: grab;
}

/* Scene 06 Styles */
.scene06-page {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    min-height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.scene06-canvas {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: #1a1a1a;
}

/* Scene 2 Styles */
.scene2-root {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    background: #000;
}

.scene2-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.scene2-animation-bar {
    position: absolute;
    left: 50%;
    bottom: 1.25rem;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(92vw, 32rem);
    transform: translateX(-50%);
    padding: 0;
}

.scene2-animation-dropdown {
    position: relative;
    width: 100%;
}

.scene2-animation-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 1rem;
    background: rgba(8, 10, 18, 0.82);
    color: #fff;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
    text-align: left;
}

.scene2-animation-trigger:hover {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(14, 18, 28, 0.92);
}

.scene2-animation-title {
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.scene2-animation-value {
    flex: 1 1 auto;
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.94);
}

.scene2-animation-caret {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.68);
}

.scene2-animation-menu {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 0.65rem);
    display: none;
    gap: 0.4rem;
    padding: 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    background: rgba(8, 10, 18, 0.96);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(18px);
}

.scene2-animation-dropdown.open .scene2-animation-menu {
    display: grid;
}

.scene2-animation-option {
    width: 100%;
    padding: 0.8rem 0.9rem;
    border: 1px solid transparent;
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
    font-size: 0.92rem;
    font-weight: 600;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.scene2-animation-option:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.1);
}

.scene2-animation-option.active {
    border-color: rgba(118, 223, 255, 0.4);
    background: rgba(118, 223, 255, 0.14);
    color: #fff;
}

@media (max-width: 640px) {
    .scene2-animation-bar {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
        transform: none;
        width: auto;
    }

    .scene2-animation-trigger {
        gap: 0.5rem;
        padding: 0.75rem 0.85rem;
    }
}

/* Scene 3 Styles */
.scene3-page {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    overflow: hidden;
    background: #080b12;
}

.scene3-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    background: radial-gradient(circle at top, #2f3449 0%, #121826 52%, #070a10 100%);
    cursor: grab;
}

.scene3-canvas:active {
    cursor: grabbing;
}

.scene3-panel {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    z-index: 3;
    width: min(24rem, calc(100vw - 2.5rem));
    padding: 1rem 1rem 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    background: rgba(9, 13, 22, 0.82);
    color: #f8fafc;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(16px);
}

.scene3-panel-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.scene3-panel-header p {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: rgba(226, 232, 240, 0.72);
}

.scene3-light-list {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.9rem;
}

.scene3-light-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
}

.scene3-light-row.active {
    border-color: rgba(118, 223, 255, 0.32);
    background: rgba(118, 223, 255, 0.08);
}

.scene3-light-select {
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 0.96rem;
    font-weight: 700;
    text-align: left;
}

.scene3-light-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.scene3-light-toggle input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #76dfff;
}

.scene3-light-toggle span {
    min-width: 2.3rem;
    text-align: right;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: rgba(226, 232, 240, 0.78);
}

.scene3-intensity-control {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.95rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.scene3-intensity-control span {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.65);
}

.scene3-intensity-control input[type="range"] {
    width: 100%;
    cursor: pointer;
    accent-color: #76dfff;
}

.scene3-intensity-control strong {
    min-width: 2.75rem;
    text-align: right;
    font-size: 0.82rem;
    color: #f8fafc;
}

.scene3-color-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.95rem;
}

.scene3-color-control span {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.65);
}

.scene3-color-picker {
    flex: 1;
    height: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    cursor: pointer;
    background: transparent;
    padding: 0.25rem;
}

.scene3-light-select:hover {
    color: #76dfff;
}

.scene3-light-row.active .scene3-light-select {
    color: #76dfff;
}

@media (max-width: 768px) {
    .scene3-panel {
        top: 0.9rem;
        left: 0.9rem;
        width: calc(100vw - 1.8rem);
        padding: 0.9rem 0.9rem 0.85rem;
    }

    .scene3-light-row {
        padding: 0.65rem 0.75rem;
    }
}

/* Material Demo Styles */
.material-demo-page {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    overflow: hidden;
}

.material-demo-canvas {
    flex: 1;
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
}

.material-demo-canvas:active {
    cursor: grabbing;
}

/* Custom Material Demo Styles */
.custom-material-page {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    overflow: hidden;
}

.custom-material-canvas {
    flex: 1;
    display: block;
    width: 100%;
    height: 100%;
    cursor: grab;
}

.custom-material-canvas:active {
    cursor: grabbing;
}

/* Debug Panel (shared by both material demos) */
.debug-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(20, 20, 30, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 20px;
    min-width: 340px;
    max-width: 400px;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    z-index: 10;
}

.debug-title {
    margin: 0 0 8px 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: #ffffff;
    border-bottom: 2px solid rgba(120, 81, 255, 0.5);
    padding-bottom: 10px;
}

.demo-description {
    margin: 0 0 16px 0;
    font-size: 0.9rem;
    color: #b0b0b0;
    line-height: 1.4;
}

.debug-section {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.debug-section h4 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #7851ff;
}

.debug-section label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #d0d0d0;
}

.debug-section input[type="range"] {
    width: 160px;
    margin: 0 10px;
    accent-color: #7851ff;
    cursor: pointer;
}

.debug-section input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #4ecdc4;
}

.debug-section input[type="color"] {
    margin-left: 10px;
    cursor: pointer;
    width: 40px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: transparent;
}

.debug-section span {
    font-weight: 600;
    color: #ffffff;
    min-width: 40px;
    display: inline-block;
}

.debug-section p {
    margin: 6px 0;
    font-size: 0.9rem;
    color: #b0b0b0;
}

.debug-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.debug-section li {
    padding: 4px 0;
    font-size: 0.9rem;
    color: #b0b0b0;
}

@media (max-width: 768px) {
    .debug-panel {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        padding: 15px;
        max-height: calc(100vh - 20px);
    }

    .debug-section input[type="range"] {
        width: 100px;
    }
}
