/* ==========================================================================
   Gemini Luminescence Demo - Glassmorphic Styling
   ========================================================================== */

:root {
    --bg-dark: #07080a;
    --sidebar-bg: rgba(13, 16, 23, 0.65);
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --accent-glow: rgba(140, 112, 255, 0.45);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.1);
    --active-blue: #2f86ff;
    --active-purple: #8c70ff;
    --glass-blur: 24px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-dark);
    color: var(--text-primary);
}

.app-container {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
}

/* ==========================================================================
   WebGL Canvas
   ========================================================================== */
#lumiCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: #000;
}

/* ==========================================================================
   Control Sidebar Panel
   ========================================================================== */
.control-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    bottom: 20px;
    width: 380px;
    background: var(--sidebar-bg);
    border: 1px solid var(--sidebar-border);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: 20px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.panel-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid var(--sidebar-border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.logo-spark {
    font-size: 1.6rem;
    background: linear-gradient(135deg, #a9a7ff, #56ccf2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulseGlow 3s ease-in-out infinite;
}

.logo h1 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff, #9ca3af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.4;
}

/* Scrollable Container */
.panel-sections {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Custom Scrollbar */
.panel-sections::-webkit-scrollbar {
    width: 6px;
}

.panel-sections::-webkit-scrollbar-track {
    background: transparent;
}

.panel-sections::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
}

.panel-sections::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   UI Controls & Forms
   ========================================================================== */
.panel-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.panel-section h3 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* Buttons */
.btn-group {
    display: flex;
    gap: 8px;
}

.btn {
    flex: 1;
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 10px;
    border: 1px solid var(--sidebar-border);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--active-purple), var(--active-blue));
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(140, 112, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(140, 112, 255, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-secondary.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.05);
}

/* Mic Active Indicators */
.voice-section {
    background: rgba(140, 112, 255, 0.05);
    border: 1px solid rgba(140, 112, 255, 0.15);
    border-radius: 14px;
    padding: 16px;
}

.mic-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mic-level-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mic-level-container label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.level-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.level-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--active-blue), var(--active-purple));
    border-radius: 3px;
    transition: width 0.05s ease;
}

/* Color Pickers Grid */
.color-pickers-grid {
    display: flex;
    gap: 12px;
}

.color-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.color-item label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.color-item input[type="color"] {
    -webkit-appearance: none;
    border: none;
    width: 100%;
    height: 38px;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}

.color-item input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-item input[type="color"]::-webkit-color-swatch {
    border: 1px solid var(--sidebar-border);
    border-radius: 8px;
}

/* Gradient Wheel Colors */
.wheel-colors-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}

.wheel-colors-section label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.color-wheel-pickers {
    display: flex;
    gap: 6px;
}

.color-wheel-pickers input[type="color"] {
    -webkit-appearance: none;
    border: none;
    width: 100%;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
}

.color-wheel-pickers input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-wheel-pickers input[type="color"]::-webkit-color-swatch {
    border: 1px solid var(--sidebar-border);
    border-radius: 6px;
}

/* Sliders */
.slider-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 500;
}

.slider-label span:nth-child(2) {
    color: var(--active-blue);
    font-family: monospace;
    font-size: 0.8rem;
    font-weight: bold;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--text-primary);
    cursor: pointer;
    border: 2px solid var(--active-purple);
    box-shadow: 0 0 8px rgba(140, 112, 255, 0.6);
    transition: transform 0.1s ease;
}

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

/* ==========================================================================
   Footer & Meta Info
   ========================================================================== */
.panel-footer {
    padding: 16px 24px 24px 24px;
    border-top: 1px solid var(--sidebar-border);
}

.technical-insights {
    font-size: 0.68rem;
    color: var(--text-secondary);
    line-height: 1.45;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 10px;
}

.technical-insights strong {
    color: #fff;
    display: block;
    margin-bottom: 2px;
}

/* Animations */
@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 2px var(--active-purple));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 6px #56ccf2);
    }
}

/* Mobile Compatibility */
@media (max-width: 768px) {
    .control-panel {
        top: auto;
        left: 20px;
        right: 20px;
        bottom: 20px;
        width: calc(100% - 40px);
        max-height: 50%;
    }
}
