:root {
    --primary: #00ffff;
    --bg: #010101;
    --panel-bg: rgba(10, 10, 15, 0.7);
    --panel-border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.4);
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

#container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    touch-action: none; /* Disable all browser-level touch gestures (zoom/pan) on the 3D canvas */
}

#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    box-sizing: border-box;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: auto;
    padding: 3rem;
}

.brand .logo-container {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.4rem;
}

.brand .logo {
    height: 24px;
    width: auto;
}

.brand .tm {
    font-size: 0.5rem;
    color: var(--primary);
    margin-left: 0.15rem;
    font-weight: 600;
}

.panel-tagline {
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text-dim);
    margin: 0;
    opacity: 0.8;
}

.brand .sub-copyright {
    font-size: 0.55rem;
    color: var(--text-dim);
    opacity: 0.5;
    letter-spacing: 0.05rem;
    margin-top: 0.25rem;
}

.contact-link {
    font-size: 0.7rem;
    color: var(--primary);
    text-decoration: none;
    opacity: 0.6;
    margin-top: 0.5rem;
    display: inline-block;
}

.camera-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--text);
    padding: 0.7rem 1.2rem;
    border-radius: 0.5rem; /* More architectural square-ish corners */
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    text-transform: uppercase;
}

.camera-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.camera-btn.active {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 255, 255, 0.05);
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--text-dim);
    border-radius: 50%;
    transition: all 0.4s ease;
}

.camera-btn.active .status-dot {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

.pulse {
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.mail-btn {
    display: none;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(10px);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mail-btn:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--primary);
}

.mobile-toggle {
    display: none;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(10px);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
}

.icon-dots {
    font-size: 1.2rem;
    letter-spacing: -2px;
    margin-right: -2px;
}

/* Side Panels */
.side-panel {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--panel-bg);
    backdrop-filter: blur(30px);
    border: 1px solid var(--panel-border);
    padding: 1.25rem;
    border-radius: 1.5rem;
    width: 240px;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    z-index: 10;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.side-panel.left { left: 3rem; }
.side-panel.right { right: 3rem; }

.panel-section label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-dim);
    letter-spacing: 0.15rem;
    margin-bottom: 0.75rem;
}

/* Shape Grid */
.button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.button-grid button {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    color: white;
    padding: 0.6rem;
    border-radius: 0.6rem;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
}

.button-grid button.active {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--primary);
}

/* Color Grid */
.color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
    padding: 0 1rem;
}

.color-circle {
    width: 24px;
    height: 24px;
    margin: 0 auto;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.color-circle:hover { transform: scale(1.15); }

.color-circle.active {
    border-color: white;
    box-shadow: 0 0 15px currentColor;
}

/* Tracking Stats */
.stat-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.stat-info {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.progress-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px var(--primary);
}

/* Gesture List */
.gesture-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gesture-list li {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.gesture-list li strong {
    font-size: 0.75rem;
    font-weight: 500;
}

.gesture-list li span {
    font-size: 0.7rem;
    color: var(--text-dim);
}

.status-footer {
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--panel-border);
}

#hand-status {
    font-size: 0.7rem;
    color: var(--text-dim);
}

/* Footer */
.main-footer {
    position: absolute;
    bottom: 3rem;
    left: 3rem;
    right: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
    border-top: 1px solid var(--panel-border);
    padding-top: 1.5rem;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-brand-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
}

.footer-logo {
    height: 16px;
    width: auto;
    opacity: 0.8;
}

.copyright {
    font-size: 0.65rem;
    color: var(--text-dim);
    letter-spacing: 0.05rem;
}

.statement-section {
    margin-top: 1rem;
}

.bold-statement {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03rem;
    color: #ffffff;
    margin: 0;
    background: linear-gradient(to bottom, #ffffff, #888888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-mail-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    opacity: 0.4;
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-mail-icon:hover {
    opacity: 1;
    color: var(--primary);
    transform: translateY(-2px);
}

@media (max-width: 1000px) {
    #ui-overlay {
        padding: 1.5rem;
    }

    .top-bar {
        padding: 1.5rem;
    }

    .brand .logo {
        height: 18px;
    }

    .camera-btn {
        display: none;
    }

    .mobile-toggle {
        display: none; /* Removed as requested */
    }

    .mail-btn {
        display: flex; /* Show mail icon on top mobile */
    }

    .side-panel.right {
        display: none !important; /* Remove gesture layout on mobile */
    }

    .side-panel.left {
        position: fixed;
        top: auto;
        bottom: 8.5rem;
        left: 1.5rem !important;
        right: 1.5rem !important;
        width: auto;
        opacity: 1;
        pointer-events: none;
        display: block;
        background: transparent;
        border: none;
        backdrop-filter: none;
        box-shadow: none;
        text-align: center;
        transform: none;
        transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .side-panel.left.interaction-hidden {
        opacity: 0;
    }

    .bold-statement {
        font-size: 1.4rem;
        line-height: 1.2;
    }

    .panel-tagline {
        display: none; /* Hide interactive instructions on mobile */
    }

    .main-footer {
        position: fixed;
        bottom: 1.5rem;
        left: 1.5rem;
        right: 1.5rem;
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        background: rgba(1, 1, 1, 0.4);
        backdrop-filter: blur(15px);
        border: 1px solid var(--panel-border);
        border-radius: 1.2rem;
        padding: 1rem;
    }

    .footer-right {
        display: none; /* Remove email from footer mobile */
    }

    .footer-left {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-brand-stack {
        align-items: center;
    }
}
