:root {
    --bg-deep-space: #0B0E14;
    --accent-purple: #A855F7;
    --accent-pink: #F472B6;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-deep-space);
    color: white;
    overflow-x: hidden;
    min-height: 100dvh;
}

.min-h-dvh {
    min-height: 100dvh !important;
}

.h-dvh {
    height: 100dvh !important;
}

/* Glassmorphism */
.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Neon Glow */
.neon-glow {
    transition: all 0.3s ease-in-out;
}

.neon-glow:hover {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.6), 0 0 40px rgba(244, 114, 182, 0.4);
    transform: translateY(-2px);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Ambient Background Glow */
.ambient-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, rgba(11, 14, 20, 0) 70%);
    top: -200px;
    right: -200px;
    z-index: -1;
    border-radius: 50%;
}

.ambient-glow-2 {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(244, 114, 182, 0.1) 0%, rgba(11, 14, 20, 0) 70%);
    bottom: -100px;
    left: -100px;
    z-index: -1;
    border-radius: 50%;
}

/* Floating Animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

/* Mobile Chat Height Fixes */
#chat-main-content,
#info-panel {
    min-height: 0;
    flex-grow: 1;
}

/* Ensure the main container doesn't collapse with absolute children */
#main-chat-section>.flex-grow {
    display: flex;
    flex-direction: column;
}

@media (max-width: 1023px) {
    #info-panel {
        background-color: #0f1117;
        z-index: 999;
    }
}

/* Custom Scrollbar Utility */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.2);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 85, 247, 0.4);
}

/* Chat Screen Compact Footer - Non-breaking version */
body.chat-layout-compact footer {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    margin-top: 0 !important;
}

body.chat-layout-compact footer .grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 1.5rem !important;
}

body.chat-layout-compact footer .grid>div {
    flex: 1 !important;
    min-width: fit-content !important;
    margin-bottom: 0 !important;
}

body.chat-layout-compact footer .container {
    max-width: 100% !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

body.chat-layout-compact footer h4 {
    display: none !important;
    /* Hide headings in chat page to save vertical space */
}

body.chat-layout-compact footer .space-y-4,
body.chat-layout-compact footer .space-y-3 {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 1rem !important;
}

body.chat-layout-compact footer .space-y-4 *,
body.chat-layout-compact footer .space-y-3 * {
    margin: 0 !important;
}

body.chat-layout-compact footer .grid-cols-2 {
    display: flex !important;
    flex-direction: row !important;
    gap: 1rem !important;
}

/* ─── MOBILE RESPONSIVE BREAKPOINTS ───────────────────────────── */
@media (max-width: 768px) {

    /* Shrink ambient glows — they're 600px/500px, too large on phones */
    .ambient-glow {
        width: 250px;
        height: 250px;
        top: -80px;
        right: -80px;
    }

    .ambient-glow-2 {
        width: 200px;
        height: 200px;
        bottom: -50px;
        left: -50px;
    }

    /* Message bubbles — wider on mobile for readability */
    .message-bubble {
        max-width: 92% !important;
    }

    /* Footer — stack on mobile */
    footer .grid {
        grid-template-columns: 1fr !important;
        text-align: center;
    }

    footer .md\:items-end {
        align-items: center !important;
    }

    footer .md\:items-start {
        align-items: center !important;
    }

    footer .md\:text-left {
        text-align: center !important;
    }

    footer .md\:justify-start {
        justify-content: center !important;
    }

    /* Global container padding on small screens */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Glass panels — slightly less padding on mobile */
    .glass-panel.p-10 {
        padding: 1.5rem !important;
    }

    /* Fixed Viewport Height Fix for Mobile */
    .h-screen-dvh {
        height: 100dvh !important;
    }
}

@media (max-width: 480px) {

    /* Extra small phones */
    .ambient-glow {
        width: 180px;
        height: 180px;
    }

    .ambient-glow-2 {
        width: 150px;
        height: 150px;
    }
}

/* Character Creation Choice Buttons */
.speech-btn.active-choice {
    background: rgba(168, 85, 247, 0.1) !important;
    border-color: rgba(168, 85, 247, 0.5) !important;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
}

.speech-btn.active-choice b {
    color: var(--accent-purple);
}

.speech-btn.active-choice i {
    opacity: 1 !important;
    color: var(--accent-purple);
}