:root {
    --primary: #7c3aed;
    --secondary: #a78bfa;
    --accent: #06b6d4;
    --bg-dark: #0a0e27;
    --glass: rgba(255, 255, 255, 0.08);
    --font: 'Noto Sans SC', sans-serif;
}

body {
    margin: 0;
    overflow: hidden;
    background: #000;
    color: #fff;
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
}

/* --- 3D Scene --- */
#scene-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    /* Brighter gradient with tech feel */
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 25%, #2d1b69 50%, #1e293b 75%, #0f172a 100%);
}

.fade-in {
    animation: fadeUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none !important;
    opacity: 0;
}

/* --- UI --- */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    padding: 30px 40px;
    box-sizing: border-box;
    pointer-events: none;
}

/* Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0.9;
}

.brand {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-orb {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent);
}

.status {
    font-size: 12px;
    opacity: 0.6;
}

/* Conversation */
.conversation-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 20px 0;
    padding-top: 40px;
}

.bubble {
    padding: 24px 32px;
    border-radius: 24px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    max-width: 650px;
    width: 90%;
    line-height: 1.8;
    pointer-events: auto;
    transition: all 0.5s ease;
}

.bubble.ai {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(6, 182, 212, 0.3);
    font-size: 18px;
    color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 20px 50px rgba(6, 182, 212, 0.1), inset 0 0 20px rgba(6, 182, 212, 0.05);
    max-height: 55vh;
    overflow-y: auto;
    /* Custom Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(6, 182, 212, 0.3) transparent;
}

.bubble.ai::-webkit-scrollbar {
    width: 4px;
}

.bubble.ai::-webkit-scrollbar-thumb {
    background: rgba(6, 182, 212, 0.4);
    border-radius: 4px;
}

.bottom-input-container {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    min-height: 100px;
    justify-content: flex-end;
}

.bubble.user {
    background: transparent;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Three Dots Animation */
.wave-dots {
    display: flex;
    gap: 8px;
    align-items: center;
    height: 10px;
}

.dot {
    width: 6px;
    height: 6px;
    background: #a78bfa;
    border-radius: 50%;
    opacity: 0.6;
}

.wave-dots.active .dot {
    animation: waveJump 1.2s infinite ease-in-out;
}

.wave-dots.active .dot:nth-child(1) {
    animation-delay: 0s;
}

.wave-dots.active .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.wave-dots.active .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes waveJump {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-8px);
        opacity: 1;
        background: var(--accent);
        box-shadow: 0 0 10px var(--accent);
    }
}

/* --- Boot --- */
#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0e27 0%, #1e1b4b 50%, #0a0e27 100%);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: bootFadeIn 0.8s ease-out;
}

@keyframes bootFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.boot-content {
    text-align: center;
    max-width: 400px;
}

.boot-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    position: relative;
    filter: drop-shadow(0 0 30px rgba(6, 182, 212, 0.6));
}

.core-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 15px;
    height: 15px;
    background: #06b6d4;
    border-radius: 50%;
    box-shadow: 0 0 40px #06b6d4, 0 0 60px rgba(6, 182, 212, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.3);
    animation: corePulse 2s infinite ease-in-out;
}

.ring-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent);
    border-radius: 50%;
    animation: ringPulse 3s infinite ease-out;
    opacity: 0;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}

@keyframes ringPulse {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes corePulse {
    0%, 100% {
        box-shadow: 0 0 40px #06b6d4, 0 0 60px rgba(6, 182, 212, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 60px #06b6d4, 0 0 80px rgba(6, 182, 212, 0.8), inset 0 0 30px rgba(255, 255, 255, 0.5);
        transform: scale(1.1);
    }
}

h1 {
    font-weight: 300;
    letter-spacing: 5px;
    margin-bottom: 5px;
    font-size: 28px;
}

p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.tagline {
    font-size: 14px;
    color: rgba(6, 182, 212, 0.8);
    margin-bottom: 25px;
}

.features {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 12px;
    min-width: 80px;
}

.feature-icon {
    font-size: 24px;
}

.feature-item span:last-child {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.hint {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
}

/* Chat Preview */
.chat-preview {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    max-height: 220px;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(6, 182, 212, 0.1);
    animation: slideUp 0.8s ease-out 0.2s both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    animation: slideIn 0.5s ease-out;
}

.chat-message.ai-msg {
    background: rgba(6, 182, 212, 0.2);
    border-left: 3px solid #06b6d4;
    color: rgba(255, 255, 255, 0.95);
    text-align: left;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.1);
}

.chat-message.user-msg {
    background: rgba(124, 58, 237, 0.2);
    border-left: 3px solid #7c3aed;
    color: rgba(255, 255, 255, 0.9);
    text-align: right;
    margin-left: 40px;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.1);
}

.chat-message.typing {
    display: flex;
    gap: 4px;
    align-items: center;
}

.chat-message.typing .dot {
    width: 4px;
    height: 4px;
    background: #06b6d4;
    border-radius: 50%;
    animation: typingBlink 1.4s infinite;
}

.chat-message.typing .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.chat-message.typing .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typingBlink {
    0%, 60%, 100% {
        opacity: 0.3;
    }
    30% {
        opacity: 1;
    }
}

.glass-btn {
    padding: 14px 45px;
    background: rgba(6, 182, 212, 0.15);
    border: 1.5px solid rgba(6, 182, 212, 0.5);
    border-radius: 50px;
    color: #06b6d4;
    font-size: 14px;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
    animation: buttonPulse 2s ease-in-out infinite;
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(6, 182, 212, 0.4);
    }
}

.glass-btn:hover {
    background: rgba(6, 182, 212, 0.25);
    border-color: rgba(6, 182, 212, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(6, 182, 212, 0.4), inset 0 0 10px rgba(6, 182, 212, 0.1);
}

.glass-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.3);
}