:root {
    --bg-black: #000000;
    --dark-teal: #002222;
    --electric-orange: #FF5733;
    --text-white: #ffffff;
    --text-gray: #A0A0A0;
    --font-inter: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    width: 100%;
    height: 100%;
    background: url('../common_assets/background-blur.png') no-repeat center center;
    background-size: cover;
    font-family: var(--font-inter);
    color: var(--text-white);
    overflow: hidden;
    perspective: 1000px;
}

.app-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transform-style: preserve-3d;
}

/* Background & Bokeh */
.background-base {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../common_assets/background-blur.png') no-repeat center center;
    background-size: cover;
    z-index: 0;
}

.bokeh-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.bokeh {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, var(--dark-teal) 0%, transparent 70%);
    filter: blur(40px);
    opacity: 0.6;
    animation: drift 20s infinite alternate ease-in-out;
}

.b1 {
    width: 300px;
    height: 300px;
    top: -10%;
    left: -10%;
}

.b2 {
    width: 400px;
    height: 400px;
    bottom: 10%;
    right: -20%;
    animation-delay: -5s;
}

.b3 {
    width: 250px;
    height: 250px;
    top: 40%;
    left: 60%;
    animation-delay: -10s;
}

.b4 {
    width: 350px;
    height: 350px;
    bottom: -10%;
    left: 20%;
    animation-delay: -15s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, -50px) scale(1.2);
    }
}

/* AI Orb */
.orb-container {
    position: absolute;
    top: 25%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    width: 200px;
    height: 200px;
    animation: breathe 4s ease-in-out infinite alternate;
    transition: top 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

.orb-container.modal-active {
    top: 15%;
    opacity: 0.5;
}

@keyframes breathe {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

.orb-glow {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--electric-orange);
    filter: blur(50px);
    opacity: 0.4;
    z-index: 2;
}

.orb-outer-glass {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.1), 0 0 30px rgba(255, 87, 51, 0.2);
    z-index: 4;
}

.orb-core {
    position: absolute;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at 30% 30%, #FF8C66 0%, var(--electric-orange) 100%);
    border-radius: 50%;
    z-index: 3;
    overflow: hidden;
    box-shadow: 0 0 30px var(--electric-orange);
}

.particles {
    position: relative;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.8) 1px, transparent 1px);
    background-size: 8px 8px;
    opacity: 0.5;
    animation: swirl 20s linear infinite;
}

.orb-container.swirling .particles {
    animation: swirl 2s linear infinite;
    opacity: 0.9;
}

@keyframes swirl {
    0% {
        transform: rotate(0deg) scale(1.2);
    }

    100% {
        transform: rotate(360deg) scale(1.2);
    }
}

/* Glass Message Pane & Parallax Wrapper */
.message-pane-wrapper {
    position: absolute;
    top: 55%;
    width: 100%;
    padding: 0 24px;
    display: flex;
    justify-content: center;
    z-index: 3;
    transform: translateZ(50px);
    transition: transform 0.1s ease-out, top 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.message-pane-wrapper.modal-active {
    top: 15%;
}

.message-pane {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    padding: 30px 24px;
    width: 100%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.message-pane.visible {
    opacity: 1;
    transform: translateY(0);
}

.ai-text {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-white);
    letter-spacing: 0.01em;
    line-height: 1.5;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background-color: var(--electric-orange);
    vertical-align: middle;
    margin-left: 2px;
    animation: blink 1s step-end infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Morphing Bottom Container */
.bottom-container {
    position: absolute;
    bottom: 8%;
    width: 90%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05), inset 0 0 20px rgba(255, 255, 255, 0.02);
    z-index: 4;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);

    /* Initially hidden */
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.bottom-container.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Holographic edge glow for input bar mode */
.bottom-container.is-input {
    height: 60px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.1), inset 0 0 10px rgba(255, 87, 51, 0.1);
    border-left: 1px solid rgba(0, 128, 128, 0.4);
    border-right: 1px solid rgba(255, 87, 51, 0.4);
}

/* Expanded state for Modal */
.bottom-container.is-modal {
    height: 220px;
    border-radius: 24px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

/* Views inside morphing container */
.input-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.input-view.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#name-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-white);
    font-size: 1.1rem;
    font-family: var(--font-inter);
}

#name-input::placeholder {
    color: rgba(160, 160, 160, 0.6);
}

.confirm-btn {
    background: transparent;
    border: none;
    color: var(--electric-orange);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.8) translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

.confirm-btn.visible {
    opacity: 1;
    transform: scale(1) translateX(0);
}

.confirm-btn:hover {
    background: rgba(255, 87, 51, 0.1);
}

.modal-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease 0.2s, visibility 0.4s ease 0.2s;
}

.modal-view.visible {
    opacity: 1;
    visibility: visible;
}

.modal-text {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-white);
    text-align: center;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-inter);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--electric-orange);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.3), 0 4px 15px rgba(255, 87, 51, 0.3);
}

.btn-primary:hover {
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.4), 0 6px 20px rgba(255, 87, 51, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--electric-orange);
    border: 1px solid var(--electric-orange);
}

.btn-secondary:hover {
    background: rgba(255, 87, 51, 0.05);
}

.cuesz-logo {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    z-index: 100;
}