/* Base */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(180deg, #2c003e, #5a0070);
    background-size: 200% 200%;
    animation: gradientShift 8s ease-in-out infinite alternate;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

@keyframes gradientShift {
    0% { background-position: 50% 0%; }
    50% { background-position: 50% 100%; }
    100% { background-position: 50% 0%; }
}

* {
    -webkit-tap-highlight-color: transparent;
}

button, a {
    outline: none;
}

/* Welcome Screen */
.welcome-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    padding: 2rem;
    opacity: 1;
    transition: opacity 0.5s ease;
    position: relative;
    overflow: hidden;
}

#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

#floating-chats-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    perspective: 800px;
    overflow: hidden;
}

.floating-phone {
    position: absolute;
    width: 80px;
    pointer-events: auto;
    cursor: pointer;
    transform-style: preserve-3d;
    will-change: transform;
    transition: opacity 0.3s ease;
    opacity: 0.75;
}

.floating-phone.dragging {
    cursor: grabbing;
    opacity: 1;
    z-index: 100;
}

.floating-phone:hover {
    opacity: 1;
}

.floating-phone.fcb-boosted {
    opacity: 1;
}

.phone-frame {
    background: linear-gradient(145deg, #ff69b4, #ff1493, #e91e90);
    border-radius: 14px;
    padding: 4px;
    box-shadow:
        0 8px 30px rgba(255, 20, 147, 0.35),
        0 2px 10px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transform-style: preserve-3d;
    height: 155px;
    overflow: hidden;
}

.floating-phone:hover .phone-frame {
    box-shadow:
        0 12px 40px rgba(255, 20, 147, 0.5),
        0 4px 16px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.floating-phone.fcb-boosted .phone-frame {
    box-shadow:
        0 0 35px rgba(255, 105, 180, 0.8),
        0 0 70px rgba(255, 20, 147, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.phone-notch {
    width: 30px;
    height: 3px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    margin: 3px auto 3px;
}

.phone-screen {
    background: #313338;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 140px;
}

.dc-header {
    background: #2b2d31;
    padding: 2px 4px;
    display: flex;
    align-items: center;
    gap: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dc-hash {
    color: #80848e;
    font-size: 0.45rem;
    font-weight: 700;
}

.dc-channel {
    color: #f2f3f5;
    font-size: 0.38rem;
    font-weight: 600;
}

.dc-messages {
    padding: 3px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
}

.dc-messages::-webkit-scrollbar {
    display: none;
}

.dc-msg {
    display: flex;
    align-items: flex-start;
    gap: 3px;
}

.dc-msg.dc-msg-whoosh {
    animation: dcMsgWhoosh 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes dcMsgWhoosh {
    0% {
        opacity: 0;
        transform: translateX(-20px) scale(0.3);
        max-height: 0;
    }
    50% {
        opacity: 0.7;
        transform: translateX(3px) scale(1.02);
        max-height: 60px;
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        max-height: 80px;
    }
}

.dc-avatar {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.35rem;
    flex-shrink: 0;
}

.dc-avatar-user {
    background: #5865f2;
    color: #fff;
}

.dc-avatar-bot {
    background: #57f287;
    color: #313338;
}

.dc-content {
    min-width: 0;
}

.dc-username {
    font-size: 0.33rem;
    font-weight: 600;
    display: block;
    margin-bottom: 1px;
}

.dc-name-user {
    color: #5865f2;
}

.dc-name-bot {
    color: #57f287;
}

.dc-content p {
    margin: 0;
    font-size: 0.33rem;
    line-height: 1.2;
    color: #dbdee1;
    word-wrap: break-word;
}

.dc-input-bar {
    background: #383a40;
    margin: 2px 3px 3px;
    border-radius: 3px;
    padding: 2px 4px;
}

.dc-input-bar span {
    color: #6d6f78;
    font-size: 0.3rem;
}

.welcome-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.welcome-screen.hidden {
    display: none;
}

.welcome-title {
    font-size: 3.8rem;
    font-weight: 300;
    background: linear-gradient(135deg, #e0b0ff, #c084fc, #a855f7, #ffffff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glowPulse 2.5s ease-in-out infinite alternate, titleGradient 4s ease-in-out infinite alternate;
    margin-bottom: 2rem;
    padding: 0 1rem;
    letter-spacing: 0.15em;
    text-shadow: none;
    filter: drop-shadow(0 0 20px rgba(192, 132, 252, 0.4)) drop-shadow(0 0 50px rgba(168, 85, 247, 0.2));
    opacity: 0;
    transform: translateY(30px);
    z-index: 5;
    position: relative;
}

.welcome-title.title-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

@keyframes titleGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

@keyframes glowPulse {
    0% {
        filter: drop-shadow(0 0 20px rgba(192, 132, 252, 0.4)) drop-shadow(0 0 50px rgba(168, 85, 247, 0.2));
    }
    100% {
        filter: drop-shadow(0 0 30px rgba(192, 132, 252, 0.6)) drop-shadow(0 0 70px rgba(168, 85, 247, 0.35));
    }
}

.welcome-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    opacity: 0;
    transform: translateY(20px);
    z-index: 5;
    position: relative;
}

.welcome-buttons.buttons-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.welcome-btn {
    padding: 14px 36px;
    border-radius: 25px;
    border: none;
    background: #8000ff;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(128, 0, 255, 0.4);
    animation: btnGlowPulse 3s ease-in-out infinite alternate;
}

.welcome-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.7);
    animation: none;
}

@keyframes btnGlowPulse {
    0% { box-shadow: 0 0 15px rgba(128, 0, 255, 0.4); }
    100% { box-shadow: 0 0 25px rgba(128, 0, 255, 0.6), 0 0 45px rgba(168, 85, 247, 0.2); }
}

/* Slash VFX */
.slash-vfx {
    position: relative;
    overflow: hidden;
}

.slash-vfx::after {
    content: '';
    position: absolute;
    top: -10%;
    left: -120%;
    width: 60%;
    height: 120%;
    background: linear-gradient(
        105deg,
        transparent 30%,
        rgba(255, 255, 255, 0.5) 42%,
        rgba(255, 255, 255, 1) 50%,
        rgba(255, 255, 255, 0.5) 58%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 10;
    transform: skewX(-15deg);
}

.slash-vfx.slash-active::after {
    animation: slashSwipe 2s ease-in-out forwards;
}

@keyframes slashSwipe {
    0% {
        left: -120%;
        opacity: 1;
    }
    100% {
        left: 180%;
        opacity: 0;
    }
}

/* Pages */
.page {
    padding-bottom: 3rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.page.hidden {
    display: none;
}

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

/* Back Button */
.back-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 600;
    background: rgba(58, 0, 80, 0.9);
    border: 1px solid rgba(128, 0, 255, 0.4);
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.back-btn:hover {
    background: #8000ff;
    box-shadow: 0 0 15px rgba(128, 0, 255, 0.5);
    transform: scale(1.05);
}

header {
    text-align: center;
    padding: 2rem 1rem;
    padding-top: 3.5rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

/* Nav Bar */
nav {
    position: sticky;
    top: 0;
    z-index: 500;
    background: transparent;
    padding: 10px 0;
    margin-bottom: 1rem;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

nav ul li a {
    display: inline-block;
    padding: 10px 24px;
    background: rgba(128, 0, 255, 0.25);
    border: 1px solid rgba(128, 0, 255, 0.4);
    border-radius: 20px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
}

nav ul li a:hover {
    background: #8000ff;
    box-shadow: 0 0 15px rgba(128, 0, 255, 0.6);
    transform: scale(1.05);
}

nav ul li a:active {
    transform: scale(0.97);
}

@keyframes navBounce {
    0% { transform: translateY(0); }
    20% { transform: translateY(var(--bounce-height, -12px)); }
    45% { transform: translateY(calc(var(--bounce-height, -12px) * -0.2)); }
    65% { transform: translateY(calc(var(--bounce-height, -12px) * 0.12)); }
    80% { transform: translateY(calc(var(--bounce-height, -12px) * -0.05)); }
    100% { transform: translateY(0); }
}

nav ul li a.nav-bounce {
    animation: navBounce var(--bounce-duration, 0.8s) ease-out forwards;
}

main {
    width: 90%;
    max-width: 1000px;
    margin: 2rem auto;
}

/* Sections Fly-Up */
section {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Commands */
.command-category {
    margin-bottom: 2rem;
}

.command-category h3 {
    font-weight: 600;
}

.command {
    background: #3a0050;
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    max-height: none;
    transition: box-shadow 0.4s ease, transform 0.3s ease, max-height 0.5s ease;
}

.command:hover {
    box-shadow: 0 0 20px rgba(128, 0, 255, 0.4);
}

.command.active {
    box-shadow: 0 0 25px rgba(255, 0, 255, 0.6);
    transform: scale(1.01);
}

.command-header {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    cursor: pointer;
}

.command-header .icon {
    margin-right: 10px;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.command-header .command-name {
    flex: 1;
    word-break: break-word;
}

.command-header .preview-btn {
    background: #8000ff;
    border: none;
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.command-header .preview-btn:hover {
    background: #a04fff;
    box-shadow: 0 0 12px rgba(128, 0, 255, 0.5);
    transform: scale(1.05);
}

.command-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
    padding: 0 20px;
}

.command.active .command-content {
    opacity: 1;
    padding: 10px 20px;
}

/* Features, Support, Developers */
.feature {
    background: #3a0050;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.feature:hover {
    box-shadow: 0 0 20px rgba(128, 0, 255, 0.4);
    transform: translateY(-2px);
}

section#helper-support button,
section#assistant-support button {
    margin: 5px;
    background: #8000ff;
    border: none;
    padding: 10px 18px;
    border-radius: 12px;
    cursor: pointer;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

section#helper-support button:hover,
section#assistant-support button:hover {
    background: #a04fff;
    box-shadow: 0 0 15px rgba(128, 0, 255, 0.5);
    transform: scale(1.05);
}

.invite-assistant-btn {
    display: inline-block;
    margin: 5px;
    background: #8000ff;
    border: none;
    padding: 10px 18px;
    border-radius: 12px;
    cursor: pointer;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.invite-assistant-btn:hover {
    background: #a04fff;
    box-shadow: 0 0 15px rgba(128, 0, 255, 0.5);
    transform: scale(1.05);
}

.dev-box {
    background: rgba(255, 0, 255, 0.08);
    border: 1px solid rgba(255, 0, 255, 0.3);
    border-radius: 14px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.15);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.dev-box:hover {
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.3);
    transform: translateY(-2px);
}

/* Floating Support Button */
.floating-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background: #3a0050;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 2rem;
    cursor: grab;
    box-shadow: 0 0 15px rgba(128, 0, 255, 0.5);
    transition: box-shadow 0.4s ease, transform 0.3s ease, opacity 0.4s ease;
    z-index: 1000;
    opacity: 1;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.floating-button:hover {
    box-shadow: 0 0 25px rgba(128, 0, 255, 0.7);
}

.floating-button:active {
    box-shadow: 0 0 35px rgba(128, 0, 255, 0.9);
}

.floating-button.morph-out {
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
}

.floating-button.btn-hidden {
    display: none;
}

/* Chatbox */
.chatbox {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 300px;
    height: 380px;
    background: #2c003e;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 25px rgb(190, 56, 243, 0.5);
    z-index: 999;
    opacity: 1;
    transform: scale(1);
}

.chatbox.hidden {
    display: none;
}

.chatbox.morph-opening {
    display: flex;
    animation: morphBtnToChat 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes morphBtnToChat {
    0% {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        opacity: 0.6;
        transform: scale(0.5);
    }
    40% {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        opacity: 0.8;
        transform: scale(1.1);
    }
    70% {
        width: 200px;
        height: 200px;
        border-radius: 24px;
        opacity: 0.95;
        transform: scale(1);
    }
    100% {
        width: 300px;
        height: 380px;
        border-radius: 12px;
        opacity: 1;
        transform: scale(1);
    }
}

.chatbox.morph-closing {
    animation: morphChatToBtn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes morphChatToBtn {
    0% {
        width: 300px;
        height: 380px;
        border-radius: 12px;
        opacity: 1;
    }
    40% {
        width: 150px;
        height: 150px;
        border-radius: 30px;
        opacity: 0.8;
    }
    80% {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        opacity: 0.5;
    }
    100% {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        opacity: 0;
        transform: scale(0.5);
    }
}

.chatbox .chat-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    opacity: 0;
    transition: opacity 0.3s ease 0.3s;
    min-width: 0;
}

.chatbox.chat-ready .chat-inner {
    opacity: 1;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #3a0050;
    color: #fff;
    font-weight: bold;
    flex-shrink: 0;
}

.chat-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s ease;
    padding: 4px 8px;
}

.chat-close:hover {
    transform: scale(1.2);
}

.chat-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    font-size: 0.9rem;
    min-height: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.chat-msg-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 10px;
}

.chat-msg-row.user-row {
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.chat-msg-row.ai-row .chat-avatar {
    background: #8000ff;
    color: #fff;
}

.chat-msg-row.user-row .chat-avatar {
    background: #3a0050;
    color: #c880ff;
}

.chat-bubble {
    max-width: 75%;
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 0.85rem;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.chat-msg-row.ai-row .chat-bubble {
    background: #3a0050;
    color: #efcaff;
    border-bottom-left-radius: 4px;
}

.chat-msg-row.user-row .chat-bubble {
    background: #8000ff;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-input {
    display: flex;
    border-top: 1px solid rgba(255,255,255,0.2);
    flex-shrink: 0;
}

.chat-input input {
    flex: 1;
    padding: 8px 10px;
    border: none;
    border-radius: 0;
    background: #3a0050;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    min-width: 0;
}

.chat-input input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.chat-input button {
    padding: 8px 14px;
    background: #8000ff;
    border: none;
    color: #fff;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    transition: 0.2s;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.chat-input button:hover {
    background: #a04fff;
}

/* Bounce Animation */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.bounce {
    animation: bounce 0.5s ease;
}

/* ===== TABLET (max-width: 768px) ===== */
@media (max-width: 768px) {
    .welcome-title {
        font-size: 2.8rem;
    }

    .welcome-btn {
        padding: 12px 28px;
        font-size: 1rem;
    }

    header {
        padding-top: 3rem;
    }

    header h1 {
        font-size: 1.8rem;
    }

    header p {
        font-size: 0.9rem;
    }

    nav ul {
        gap: 0.5rem;
        padding: 0 10px;
    }

    nav ul li a {
        padding: 6px 14px;
        font-size: 0.8rem;
    }

    main {
        width: 95%;
    }

    .floating-button {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        bottom: 15px;
        left: 15px;
    }

    .chatbox {
        width: 280px;
        height: 340px;
        bottom: 15px;
        left: 10px;
    }

    @keyframes morphBtnToChat {
        0% { width: 50px; height: 50px; border-radius: 50%; opacity: 0.6; transform: scale(0.5); }
        40% { width: 50px; height: 50px; border-radius: 50%; opacity: 0.8; transform: scale(1.1); }
        70% { width: 180px; height: 180px; border-radius: 24px; opacity: 0.95; transform: scale(1); }
        100% { width: 280px; height: 340px; border-radius: 12px; opacity: 1; transform: scale(1); }
    }

    @keyframes morphChatToBtn {
        0% { width: 280px; height: 340px; border-radius: 12px; opacity: 1; }
        40% { width: 140px; height: 140px; border-radius: 30px; opacity: 0.8; }
        80% { width: 50px; height: 50px; border-radius: 50%; opacity: 0.5; }
        100% { width: 50px; height: 50px; border-radius: 50%; opacity: 0; transform: scale(0.5); }
    }

    .command-header {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .command-header .preview-btn {
        padding: 4px 8px;
        font-size: 0.8rem;
    }

    .back-btn {
        padding: 6px 14px;
        font-size: 0.85rem;
    }

    .dev-box {
        padding: 15px;
    }
}

/* ===== SMALL PHONE (max-width: 480px) ===== */
@media (max-width: 480px) {
    .welcome-title {
        font-size: 2rem;
        padding: 0 0.5rem;
    }

    .welcome-buttons {
        gap: 1rem;
    }

    .welcome-btn {
        padding: 10px 22px;
        font-size: 0.9rem;
    }

    header {
        padding: 1.5rem 0.5rem;
        padding-top: 3rem;
    }

    header h1 {
        font-size: 1.4rem;
    }

    header p {
        font-size: 0.8rem;
    }

    nav {
        padding: 8px 5px;
    }

    nav ul {
        gap: 0.4rem;
        padding: 0 5px;
    }

    nav ul li a {
        padding: 5px 10px;
        font-size: 0.72rem;
    }

    main {
        width: 95%;
        margin: 1rem auto;
    }

    .command-header {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .command-header .icon {
        font-size: 1.1rem;
        margin-right: 6px;
    }

    .command-header .preview-btn {
        padding: 3px 7px;
        font-size: 0.75rem;
    }

    .command.active .command-content {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .floating-button {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        bottom: 12px;
        left: 12px;
    }

    .chatbox {
        width: calc(100vw - 24px);
        height: 320px;
        left: 12px;
        bottom: 12px;
    }

    @keyframes morphBtnToChat {
        0% { width: 45px; height: 45px; border-radius: 50%; opacity: 0.6; transform: scale(0.5); }
        40% { width: 45px; height: 45px; border-radius: 50%; opacity: 0.8; transform: scale(1.1); }
        70% { width: 60vw; height: 200px; border-radius: 24px; opacity: 0.95; transform: scale(1); }
        100% { width: calc(100vw - 24px); height: 320px; border-radius: 12px; opacity: 1; transform: scale(1); }
    }

    @keyframes morphChatToBtn {
        0% { width: calc(100vw - 24px); height: 320px; border-radius: 12px; opacity: 1; }
        40% { width: 50vw; height: 160px; border-radius: 30px; opacity: 0.8; }
        80% { width: 45px; height: 45px; border-radius: 50%; opacity: 0.5; }
        100% { width: 45px; height: 45px; border-radius: 50%; opacity: 0; transform: scale(0.5); }
    }

    .back-btn {
        padding: 5px 12px;
        font-size: 0.8rem;
        top: 10px;
        left: 10px;
    }

    section#helper-support button,
    section#assistant-support button {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .invite-assistant-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .feature {
        padding: 12px 15px;
    }

    .feature h3 {
        font-size: 1rem;
    }

    .feature p {
        font-size: 0.85rem;
    }

    .dev-box {
        padding: 12px;
    }

    .dev-box h3 {
        font-size: 1rem;
    }

    .dev-box p {
        font-size: 0.85rem;
    }

    .chat-input input {
        font-size: 0.8rem;
        padding: 8px;
    }

    .chat-input button {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .chat-messages {
        font-size: 0.8rem;
    }
}

/* ===== VERY SMALL PHONE (max-width: 360px) ===== */
@media (max-width: 360px) {
    .welcome-title {
        font-size: 1.6rem;
    }

    .welcome-btn {
        padding: 8px 18px;
        font-size: 0.82rem;
    }

    header h1 {
        font-size: 1.2rem;
    }

    nav ul li a {
        padding: 4px 8px;
        font-size: 0.68rem;
    }

    .floating-button {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        bottom: 10px;
        left: 10px;
    }

    .chatbox {
        width: calc(100vw - 20px);
        height: 300px;
        left: 10px;
        bottom: 10px;
    }

    @keyframes morphBtnToChat {
        0% { width: 40px; height: 40px; border-radius: 50%; opacity: 0.6; transform: scale(0.5); }
        40% { width: 40px; height: 40px; border-radius: 50%; opacity: 0.8; transform: scale(1.1); }
        70% { width: 55vw; height: 180px; border-radius: 24px; opacity: 0.95; transform: scale(1); }
        100% { width: calc(100vw - 20px); height: 300px; border-radius: 12px; opacity: 1; transform: scale(1); }
    }

    @keyframes morphChatToBtn {
        0% { width: calc(100vw - 20px); height: 300px; border-radius: 12px; opacity: 1; }
        40% { width: 45vw; height: 140px; border-radius: 30px; opacity: 0.8; }
        80% { width: 40px; height: 40px; border-radius: 50%; opacity: 0.5; }
        100% { width: 40px; height: 40px; border-radius: 50%; opacity: 0; transform: scale(0.5); }
    }
}