@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

html,
body {
    height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
    background: #f5f6fc;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0
}

body:has(#stevebot-app.dark-mode) {
    background: #030510 !important
}

#stevebot-app,
#stevebot-app * {
    box-sizing: border-box;
    font-family: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif
}

#stevebot-app * {
    margin: 0;
    padding: 0
}

#stevebot-app button,
#stevebot-app input,
#stevebot-app textarea {
    font: inherit
}

#stevebot-app {
    --bg: #f5f6fc;
    --bg-gradient: radial-gradient(1400px 800px at -10% 0%, rgba(131, 155, 255, 0.35), transparent 65%), radial-gradient(1400px 900px at 110% 120%, rgba(187, 208, 255, 0.45), #f5f6fc);
    --chat-surface: rgba(255, 255, 255, 0.95);
    --surface-border: rgba(15, 17, 29, 0.08);
    --panel: rgba(255, 255, 255, 0.85);
    --panel-2: rgba(247, 248, 254, 0.94);
    --text: #0f111d;
    --text-primary: #0f111d;
    --text-secondary: rgba(15, 17, 29, 0.72);
    --text-tertiary: rgba(15, 17, 29, 0.55);
    --muted: #686f8f;
    --primary: #4f5de5;
    --accent-primary: linear-gradient(135deg, #5664ff 0%, #8f75ff 100%);
    --message-user-bg: linear-gradient(135deg, #5664ff 0%, #8f75ff 100%);
    --message-user-text: #fff;
    --message-bot-bg: rgba(245, 246, 255, 0.95);
    --message-bot-text: #0f111d;
    --timestamp: rgba(15, 17, 29, 0.5);
    --input-bg: rgba(255, 255, 255, 0.9);
    --input-border: rgba(94, 114, 220, 0.3);
    --nav-chip-bg: rgba(15, 17, 29, 0.05);
    --shadow: 0 22px 70px rgba(12, 15, 35, 0.15);
    --shadow-lg: 0 45px 110px rgba(12, 15, 35, 0.25);
    --glow: rgba(93, 114, 220, 0.35);
    height: 100vh;
    padding: clamp(16px, 3vw, 40px) !important;
    background: var(--bg-gradient) !important;
    color: var(--text) !important;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation
}

#stevebot-app::before,
#stevebot-app::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0
}

#stevebot-app::before {
    background: radial-gradient(900px 600px at 15% 110%, rgba(93, 114, 220, 0.15), transparent 60%)
}

#stevebot-app::after {
    background: radial-gradient(1000px 700px at 85% -10%, rgba(255, 255, 255, 0.4), transparent 55%)
}

#stevebot-app>* {
    position: relative;
    z-index: 1
}

#stevebot-app.dark-mode {
    --bg: #030510;
    --bg-gradient: radial-gradient(1200px 900px at 75% 120%, rgba(23, 69, 255, 0.45), transparent 65%), radial-gradient(1200px 900px at -10% -5%, rgba(4, 9, 24, 0.92), #030510);
    --chat-surface: rgba(5, 6, 14, 0.78);
    --surface-border: rgba(255, 255, 255, 0.08);
    --panel: rgba(13, 15, 26, 0.92);
    --panel-2: rgba(19, 21, 34, 0.9);
    --text: #f5f6ff;
    --text-primary: #f5f6ff;
    --text-secondary: rgba(245, 246, 255, 0.78);
    --text-tertiary: rgba(245, 246, 255, 0.6);
    --muted: #a7acd1;
    --primary: #8ca0ff;
    --accent-primary: linear-gradient(135deg, #9f88ff 0%, #6d8bff 100%);
    --message-user-bg: linear-gradient(135deg, #9f88ff 0%, #6d8bff 100%);
    --message-user-text: #fff;
    --message-bot-bg: rgba(23, 25, 39, 0.9);
    --message-bot-text: #f5f6ff;
    --timestamp: rgba(245, 246, 255, 0.65);
    --input-bg: rgba(5, 6, 12, 0.94);
    --input-border: rgba(255, 255, 255, 0.08);
    --nav-chip-bg: rgba(255, 255, 255, 0.06);
    --shadow: 0 28px 80px rgba(2, 3, 12, 0.75);
    --shadow-lg: 0 55px 120px rgba(2, 3, 12, 0.85);
    --glow: rgba(133, 155, 255, 0.6)
}

#stevebot-app svg {
    color: inherit !important
}

#stevebot-app .app-shell {
    width: min(1400px, 100%);
    margin: 0 auto;
    background: var(--chat-surface) !important;
    border-radius: 44px;
    padding: clamp(22px, 3.5vw, 16px) !important;
    border: 1px solid var(--surface-border) !important;
    box-shadow: var(--shadow-lg) !important;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0
}

#stevebot-app .app-shell::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.04);
    pointer-events: none
}

#stevebot-app .top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(10px, 3vw, 3px) clamp(24px, 4vw, 48px);
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(15, 17, 29, 0.08);
    border-radius: 36px 36px 0 0;
    flex-shrink: 0
}

#stevebot-app.dark-mode .top-nav {
    background: rgba(5, 6, 14, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08)
}

#stevebot-app .nav-left,
#stevebot-app .nav-right {
    display: flex;
    align-items: center;
    gap: 12px
}

#stevebot-app .logo {
    display: flex;
    align-items: center;
    gap: 10px
}

#stevebot-app .logo img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 12px 25px rgba(15, 19, 41, 0.2)
}

#stevebot-app .logo-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em
}

#stevebot-app .nav-right {
    gap: 10px
}

#stevebot-app .icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--surface-border) !important;
    background: var(--nav-chip-bg) !important;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(12px);
    min-width: 40px;
    min-height: 40px;
    user-select: none
}

#stevebot-app .icon-btn:hover {
    color: var(--primary);
    border-color: rgba(93, 114, 220, 0.5);
    background: rgba(93, 114, 220, 0.15)
}

#stevebot-app .icon-btn.recording {
    color: var(--primary) !important;
    border-color: rgba(93, 114, 220, 0.6) !important;
    background: rgba(93, 114, 220, 0.2) !important
}

#stevebot-app .icon-btn.voice-enabled {
    color: var(--primary) !important;
    border-color: rgba(93, 114, 220, 0.6) !important;
    background: rgba(93, 114, 220, 0.15) !important
}

#stevebot-app #theme-toggle {
    position: relative
}

#stevebot-app .theme-icon {
    position: absolute;
    inset: 0;
    margin: auto;
    transition: opacity 0.25s ease, transform 0.25s ease
}

#stevebot-app .theme-icon.moon {
    opacity: 0;
    transform: rotate(180deg)
}

#stevebot-app.dark-mode .theme-icon.sun {
    opacity: 0;
    transform: rotate(-180deg)
}

#stevebot-app.dark-mode .theme-icon.moon {
    opacity: 1;
    transform: rotate(0deg)
}

#stevebot-app .user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff
}

#stevebot-app .user-avatar .avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0
}

#stevebot-app .user-avatar .google-signin-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #fff;
    position: absolute;
    inset: 0
}

#stevebot-app .user-avatar.logged-out .avatar-image {
    display: none
}

#stevebot-app .user-avatar.logged-out .google-signin-icon {
    display: flex !important
}

#stevebot-app .main-container {
    position: relative;
    display: flex;
    justify-content: center;
    flex: 1;
    min-height: 0
}

#stevebot-app .chat-area {
    width: 100%;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(0, 0, 0, 0.18)), rgba(11, 12, 20, 0.5) !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0
}

#stevebot-app:not(.dark-mode) .chat-area {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(243, 244, 255, 0.95)) !important
}

#stevebot-app .chat-area::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(800px 500px at 15% 110%, rgba(93, 114, 220, 0.25), transparent 65%), radial-gradient(700px 400px at 85% 0%, rgba(111, 141, 255, 0.2), transparent 70%);
    pointer-events: none
}

#stevebot-app .chat-area>* {
    position: relative;
    z-index: 1
}

#stevebot-app .welcome-screen {
    width: 100%;
    max-width: 720px;
    text-align: center;
    margin: 0 auto;
    padding: clamp(40px, 6vw, 80px) clamp(20px, 6vw, 40px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 0
}

#stevebot-app .welcome-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    border-radius: 50%;
    overflow: hidden;
    border: 6px solid rgba(255, 255, 255, 0.65);
    box-shadow: var(--shadow)
}

#stevebot-app .welcome-title {
    font-size: clamp(32px, 5vw, 44px);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px
}

#stevebot-app .welcome-subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.7;
    max-width: 540px
}

#stevebot-app .messages-container {
    width: 100%;
    padding: 24px 8px 24px 24px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(15, 17, 29, 0.2) transparent
}

#stevebot-app .messages-container::-webkit-scrollbar {
    width: 6px
}

#stevebot-app .messages-container::-webkit-scrollbar-thumb {
    background: rgba(15, 17, 29, 0.2);
    border-radius: 10px
}

#stevebot-app.dark-mode .messages-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15)
}

#stevebot-app .messages-area {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%
}

#stevebot-app .message {
    display: flex;
    gap: 12px;
    max-width: 70%;
    align-items: flex-start
}

#stevebot-app .message.user {
    margin-left: auto;
    flex-direction: row-reverse;
    text-align: right
}

#stevebot-app .message-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    overflow: hidden;
    box-shadow: 0 12px 25px rgba(15, 19, 41, 0.25);
    flex-shrink: 0
}

#stevebot-app .message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

#stevebot-app .message.bot .message-avatar {
    background: rgba(255, 255, 255, 0.8)
}

#stevebot-app .message.user .message-avatar {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    border-color: rgba(255, 255, 255, 0.6)
}

#stevebot-app .message-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%
}

#stevebot-app .message-bubble {
    padding: 16px 20px;
    border-radius: 22px;
    line-height: 1.7;
    font-size: 15px;
    box-shadow: 0 18px 30px rgba(4, 6, 18, 0.35) !important;
    backdrop-filter: blur(4px)
}

#stevebot-app .message.bot .message-bubble {
    background: var(--message-bot-bg) !important;
    color: var(--message-bot-text) !important;
    border-bottom-left-radius: 6px
}

#stevebot-app .message.user .message-bubble {
    background: var(--message-user-bg) !important;
    color: var(--message-user-text) !important;
    border-bottom-right-radius: 6px
}

#stevebot-app .message-bubble p {
    margin-bottom: 10px
}

#stevebot-app .message-bubble p:last-child {
    margin-bottom: 0
}

#stevebot-app .message-bubble ul,
#stevebot-app .message-bubble ol {
    padding-left: 18px;
    margin: 8px 0
}

#stevebot-app .message-timestamp {
    font-size: 11px;
    letter-spacing: 0.2em;
    color: var(--timestamp)
}

#stevebot-app .message.user .message-timestamp {
    text-align: right
}

#stevebot-app .typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--message-bot-bg);
    padding: 14px 18px;
    border-radius: 18px;
    border-bottom-left-radius: 6px;
    box-shadow: 0 12px 24px rgba(4, 6, 18, 0.4)
}

#stevebot-app .typing-dots {
    display: flex;
    gap: 6px
}

#stevebot-app .typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: typing 1.2s infinite ease-in-out;
    box-shadow: 0 0 12px var(--glow)
}

#stevebot-app .typing-dots span:nth-child(2) {
    animation-delay: 0.15s
}

#stevebot-app .typing-dots span:nth-child(3) {
    animation-delay: 0.3s
}

@keyframes typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4
    }

    30% {
        transform: translateY(-6px);
        opacity: 1
    }
}

#stevebot-app .input-container {
    position: sticky;
    bottom: 0;
    padding: 20px clamp(24px, 6vw, 84px) 24px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(15, 17, 29, 0.08);
    z-index: 100;
    flex-shrink: 0
}

#stevebot-app.dark-mode .input-container {
    background: rgba(5, 6, 14, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.08)
}

#stevebot-app .input-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px 18px 92px;
    border-radius: 28px;
    background: var(--input-bg) !important;
    border: 1.5px solid var(--input-border) !important;
    box-shadow: 0 30px 60px rgba(2, 4, 16, 0.55) !important;
    backdrop-filter: blur(22px)
}

#stevebot-app .input-wrapper:focus-within {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(93, 114, 220, 0.2), 0 30px 60px rgba(2, 4, 16, 0.6) !important
}

#stevebot-app .input-icon {
    position: absolute;
    left: 20px;
    width: 48px;
    height: 48px;
    border-radius: 18px;
    background: var(--accent-primary) !important;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 30px rgba(93, 114, 220, 0.5)
}

#stevebot-app .message-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary) !important;
    font-size: 15px;
    line-height: 1.6;
    min-width: 0
}

#stevebot-app .message-input::placeholder {
    color: var(--text-tertiary) !important
}

#stevebot-app .input-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-tertiary) !important;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap
}

#stevebot-app:not(.dark-mode) .input-status {
    background: rgba(15, 17, 29, 0.05) !important;
    border-color: rgba(15, 17, 29, 0.08) !important
}

#stevebot-app .input-actions {
    display: flex;
    gap: 10px;
    align-items: center
}

#stevebot-app .action-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 44px;
    min-height: 44px;
    user-select: none
}

#stevebot-app:not(.dark-mode) .action-btn {
    border-color: rgba(15, 17, 29, 0.1) !important;
    background: rgba(15, 17, 29, 0.04) !important
}

#stevebot-app .action-btn:hover {
    color: var(--primary);
    border-color: rgba(93, 114, 220, 0.5)
}

#stevebot-app .send-btn {
    background: var(--accent-primary) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 20px 35px rgba(93, 114, 220, 0.45) !important
}

#stevebot-app:not(.dark-mode) .send-btn svg path {
    stroke: #1f1f1f !important
}

#stevebot-app.dark-mode .send-btn svg path {
    stroke: #fff !important
}

#stevebot-app .powered-by {
    text-align: center;
    font-size: 11px;
    color: var(--text-tertiary) !important;
    padding: 8px 0 0;
    margin-top: -0.4vw;
    flex-shrink: 0;
    position: relative;
    z-index: 101
}

#stevebot-app .powered-by strong {
    color: var(--text-primary) !important
}

#stevebot-app .modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000
}

#stevebot-app .modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px)
}

#stevebot-app .modal-content {
    position: relative;
    background: var(--chat-surface);
    border-radius: 28px;
    padding: 34px;
    width: min(420px, 90%);
    box-shadow: var(--shadow-lg);
    z-index: 1
}

#stevebot-app .modal-header h2 {
    color: var(--text-primary);
    font-size: 30px;
    margin-bottom: 8px
}

#stevebot-app .modal-body p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6
}

#stevebot-app .btn-google {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    background: #fff;
    color: #1f1f1f;
    font-weight: 600
}

#stevebot-app .btn-google:hover {
    border-color: #d2e3fc;
    box-shadow: 0 10px 20px rgba(15, 19, 41, 0.12)
}

#stevebot-app.dark-mode .btn-google {
    background: #fff !important;
    color: #1f1f1f !important
}

#stevebot-app .modal-footer-text {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 16px
}

#stevebot-app .auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: var(--text-tertiary);
    font-size: 13px
}

#stevebot-app .auth-divider::before,
#stevebot-app .auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--surface-border)
}

#stevebot-app .auth-fields {
    display: flex;
    flex-direction: column;
    gap: 10px
}

#stevebot-app .auth-input {
    width: 100%;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1.5px solid var(--surface-border) !important;
    background: var(--panel-2) !important;
    color: var(--text-primary) !important;
    font-size: 15px;
    outline: none;
    transition: border-color 0.15s
}

#stevebot-app .auth-input:focus {
    border-color: var(--primary) !important
}

#stevebot-app .auth-input::placeholder {
    color: var(--text-tertiary) !important
}

#stevebot-app .btn-auth-submit {
    width: 100%;
    margin-top: 14px;
    padding: 13px 18px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    background: var(--accent-primary);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 12px 24px var(--glow);
    transition: opacity 0.15s
}

#stevebot-app .btn-auth-submit:hover {
    opacity: 0.92
}

#stevebot-app .btn-auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed
}

#stevebot-app .auth-error {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.25);
    color: #dc2626;
    font-size: 13px;
    line-height: 1.4
}

#stevebot-app .auth-switch {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary)
}

#stevebot-app .auth-switch a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px
}

#stevebot-app .auth-switch a:hover {
    text-decoration: underline
}

/* Settings Panel */
#stevebot-app .settings-panel {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    justify-content: flex-end
}

#stevebot-app .settings-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px)
}

#stevebot-app .settings-drawer {
    position: relative;
    width: min(420px, 90vw);
    height: 100%;
    background: var(--chat-surface);
    border-left: 1px solid var(--surface-border);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideInDrawer 0.25s ease-out;
    z-index: 1
}

@keyframes slideInDrawer {
    from {
        transform: translateX(100%)
    }

    to {
        transform: translateX(0)
    }
}

#stevebot-app .settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--surface-border);
    flex-shrink: 0
}

#stevebot-app .settings-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary)
}

#stevebot-app .settings-close-btn {
    border: 1px solid var(--surface-border) !important
}

#stevebot-app .settings-user {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--surface-border);
    flex-shrink: 0
}

#stevebot-app .settings-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--surface-border)
}

#stevebot-app .settings-user-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary)
}

#stevebot-app .settings-user-email {
    font-size: 13px;
    color: var(--text-secondary)
}

#stevebot-app .settings-tabs {
    display: flex;
    padding: 0 24px;
    border-bottom: 1px solid var(--surface-border);
    flex-shrink: 0
}

#stevebot-app .settings-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s
}

#stevebot-app .settings-tab:hover {
    color: var(--text-secondary)
}

#stevebot-app .settings-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary)
}

#stevebot-app .settings-tab-content {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px
}

#stevebot-app .settings-tab-content.active {
    display: block
}

#stevebot-app .settings-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 0;
    color: var(--text-tertiary);
    font-size: 14px
}

#stevebot-app .settings-spin {
    animation: spin 1s linear infinite
}

#stevebot-app .settings-empty {
    text-align: center;
    padding: 40px 0;
    color: var(--text-tertiary);
    font-size: 14px
}

#stevebot-app .settings-empty-sub {
    font-size: 13px;
    margin-top: 6px;
    opacity: 0.7
}

#stevebot-app .history-list {
    display: flex;
    flex-direction: column;
    gap: 16px
}

#stevebot-app .history-item {
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--panel-2);
    border: 1px solid var(--surface-border);
    cursor: pointer;
    transition: all 0.15s
}

#stevebot-app .history-item:hover {
    border-color: rgba(93, 114, 220, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08)
}

#stevebot-app .history-q {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.4
}

#stevebot-app .history-a {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

#stevebot-app .history-time {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 8px
}

#stevebot-app .history-load-more {
    text-align: center;
    padding: 16px 0
}

#stevebot-app .settings-btn-secondary {
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid var(--surface-border);
    background: var(--nav-chip-bg);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer
}

#stevebot-app .settings-btn-secondary:hover {
    color: var(--primary);
    border-color: rgba(93, 114, 220, 0.4)
}

#stevebot-app .billing-card {
    border-radius: 14px;
    border: 1px solid var(--surface-border);
    background: var(--panel-2);
    overflow: hidden
}

#stevebot-app .billing-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--surface-border)
}

#stevebot-app .billing-row:last-child {
    border-bottom: none
}

#stevebot-app .billing-label {
    font-size: 14px;
    color: var(--text-secondary)
}

#stevebot-app .billing-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary)
}

#stevebot-app .billing-badge {
    font-size: 12px;
    font-weight: 600;
    color: #1e8e3e;
    background: rgba(30, 142, 62, 0.1);
    padding: 4px 10px;
    border-radius: 6px
}

#stevebot-app .billing-note {
    font-size: 13px;
    color: var(--text-tertiary);
    text-align: center;
    margin-top: 20px;
    line-height: 1.5
}

#stevebot-app .history-paywall {
    text-align: center;
    padding: 48px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px
}

#stevebot-app .paywall-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--panel-2);
    border: 1px solid var(--surface-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary)
}

#stevebot-app .paywall-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary)
}

#stevebot-app .paywall-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 300px
}

#stevebot-app .paywall-btn {
    padding: 12px 28px;
    border-radius: 12px;
    background: var(--accent-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: 0 12px 24px var(--glow);
    transition: opacity 0.15s
}

#stevebot-app .paywall-btn:hover {
    opacity: 0.9
}

#stevebot-app .paywall-btn:disabled {
    opacity: 0.6;
    cursor: default
}

#stevebot-app .billing-checkout {
    padding: 20px 24px
}

#stevebot-app .billing-checkout-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary)
}

#stevebot-app .pricing-card {
    border-radius: 16px;
    border: 1px solid var(--surface-border);
    background: var(--panel-2);
    padding: 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px
}

#stevebot-app .pricing-card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px
}

#stevebot-app .pricing-plan-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary)
}

#stevebot-app .pricing-price {
    display: flex;
    align-items: baseline;
    gap: 2px
}

#stevebot-app .pricing-amount {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary)
}

#stevebot-app .pricing-period {
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 600
}

#stevebot-app .pricing-tagline {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0
}

#stevebot-app .pricing-features {
    list-style: none;
    margin: 4px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px
}

#stevebot-app .pricing-features li {
    position: relative;
    padding-left: 26px;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.4
}

#stevebot-app .pricing-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(30, 142, 62, 0.12)
}

#stevebot-app .pricing-features li::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 6px;
    width: 6px;
    height: 9px;
    border-right: 2px solid #1e8e3e;
    border-bottom: 2px solid #1e8e3e;
    transform: rotate(45deg)
}

#stevebot-app .pricing-subscribe {
    width: 100%;
    margin-top: 6px
}

#stevebot-app .pricing-secure {
    font-size: 12px;
    color: var(--text-tertiary);
    text-align: center;
    margin: 0
}

.logout-notification {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: rgba(15, 17, 29, 0.95);
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideInRight 0.3s ease-out
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0
    }

    to {
        transform: translateX(0);
        opacity: 1
    }
}

@keyframes spin {
    from {
        transform: rotate(0)
    }

    to {
        transform: rotate(360deg)
    }
}

/* Mobile */
@media(max-width:768px) {

    html,
    body {
        height: 100dvh;
        position: fixed;
        width: 100%;
        touch-action: pan-y;
        overflow: hidden
    }

    #stevebot-app#stevebot-app {
        padding: 8px !important;
        height: 100dvh !important;
        position: fixed;
        inset: 0;
        overflow: hidden
    }

    #stevebot-app#stevebot-app .app-shell {
        border-radius: 20px !important;
        padding: 0 !important
    }

    #stevebot-app#stevebot-app .top-nav {
        padding: 16px 20px !important;
        border-radius: 20px 20px 0 0 !important
    }

    #stevebot-app#stevebot-app .logo img {
        width: 32px !important;
        height: 32px !important
    }

    #stevebot-app#stevebot-app .logo-text {
        font-size: 18px !important
    }

    #stevebot-app#stevebot-app .icon-btn {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important
    }

    #stevebot-app#stevebot-app .user-avatar {
        width: 36px !important;
        height: 36px !important
    }

    #stevebot-app#stevebot-app .chat-area {
        border-radius: 20px !important;
        flex: 1 !important;
        min-height: 0 !important
    }

    #stevebot-app#stevebot-app .welcome-screen {
        padding: clamp(30px, 8vw, 60px) clamp(16px, 4vw, 40px) !important
    }

    #stevebot-app#stevebot-app .welcome-avatar {
        width: 90px !important;
        height: 90px !important;
        border-width: 4px !important
    }

    #stevebot-app#stevebot-app .welcome-title {
        font-size: clamp(26px, 6.5vw, 36px) !important
    }

    #stevebot-app#stevebot-app .welcome-subtitle {
        font-size: 14px !important
    }

    #stevebot-app#stevebot-app .messages-container {
        padding: 20px 16px !important
    }

    #stevebot-app#stevebot-app .message {
        max-width: 85% !important
    }

    #stevebot-app#stevebot-app .message-avatar {
        width: 32px !important;
        height: 32px !important
    }

    #stevebot-app#stevebot-app .message-bubble {
        padding: 12px 16px !important;
        border-radius: 18px !important;
        font-size: 14px !important
    }

    #stevebot-app#stevebot-app .input-container {
        padding: 16px 16px 20px !important
    }

    #stevebot-app#stevebot-app .input-wrapper {
        padding: 12px 12px 12px 60px !important;
        border-radius: 28px !important
    }

    #stevebot-app#stevebot-app .input-icon {
        left: 10px !important;
        width: 42px !important;
        height: 42px !important
    }

    #stevebot-app#stevebot-app .message-input {
        font-size: 16px !important
    }

    #stevebot-app#stevebot-app .input-status {
        display: none !important
    }

    #stevebot-app#stevebot-app .action-btn {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important
    }

    #stevebot-app#stevebot-app .powered-by {
        font-size: 10px !important
    }

    #stevebot-app#stevebot-app .modal-content {
        width: calc(100% - 32px) !important;
        padding: 28px 24px !important;
        border-radius: 24px !important
    }

    #stevebot-app .settings-drawer {
        width: 100vw
    }

    body.keyboard-open #stevebot-app {
        height: 100dvh !important;
        overflow: hidden !important
    }

    body.keyboard-open #stevebot-app .messages-container {
        flex: 1 !important;
        min-height: 0 !important;
        overflow-y: auto !important
    }
}

@media(max-width:480px) {
    #stevebot-app#stevebot-app {
        padding: 4px !important
    }

    #stevebot-app#stevebot-app .app-shell {
        border-radius: 16px !important
    }

    #stevebot-app#stevebot-app .top-nav {
        padding: 12px 16px !important;
        gap: 8px !important
    }

    #stevebot-app#stevebot-app .logo img {
        width: 28px !important;
        height: 28px !important
    }

    #stevebot-app#stevebot-app .logo-text {
        font-size: 16px !important
    }

    #stevebot-app#stevebot-app .icon-btn {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important
    }

    #stevebot-app#stevebot-app .nav-right {
        gap: 6px !important
    }

    #stevebot-app#stevebot-app .message {
        max-width: 90% !important
    }

    #stevebot-app#stevebot-app .message-bubble {
        padding: 10px 14px !important;
        font-size: 13px !important
    }

    #stevebot-app#stevebot-app .input-container {
        padding: 14px 14px 18px !important
    }

    #stevebot-app#stevebot-app .input-wrapper {
        padding: 10px 10px 10px 54px !important
    }

    #stevebot-app#stevebot-app .input-icon {
        left: 8px !important;
        width: 38px !important;
        height: 38px !important
    }

    #stevebot-app#stevebot-app .action-btn {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important
    }
}

@media(max-width:375px) {
    #stevebot-app#stevebot-app .message {
        max-width: 95% !important
    }

    #stevebot-app#stevebot-app .logo-text {
        display: none !important
    }
}

@media(hover:none)and(pointer:coarse) {

    #stevebot-app#stevebot-app .icon-btn:hover,
    #stevebot-app#stevebot-app .action-btn:hover {
        transform: none !important
    }

    #stevebot-app#stevebot-app .icon-btn:active,
    #stevebot-app#stevebot-app .action-btn:active {
        transform: scale(0.95) !important;
        opacity: 0.8 !important
    }
}

@supports(padding:max(0px)) {
    #stevebot-app#stevebot-app {
        padding-left: max(env(safe-area-inset-left), 8px) !important;
        padding-right: max(env(safe-area-inset-right), 8px) !important;
        padding-top: max(env(safe-area-inset-top), 8px) !important;
        padding-bottom: max(env(safe-area-inset-bottom), 8px) !important
    }
}

#stevebot-app#stevebot-app button.icon-btn,
#stevebot-app#stevebot-app button.action-btn,
#stevebot-app#stevebot-app button.send-btn {
    border-style: solid !important;
    text-decoration: none !important;
    outline: none !important;
    box-sizing: border-box !important;
    line-height: normal !important;
    text-transform: none !important
}

#stevebot-app#stevebot-app input.message-input {
    outline: none !important;
    box-shadow: none !important;
    height: auto !important;
    width: 100% !important;
    margin: 0 !important
}

#stevebot-app#stevebot-app .message-bubble p,
#stevebot-app#stevebot-app .message-bubble ul,
#stevebot-app#stevebot-app .message-bubble ol,
#stevebot-app#stevebot-app .message-bubble li {
    margin: 0 !important;
    padding: 0 !important;
    line-height: inherit !important;
    font-size: inherit !important;
    color: inherit !important
}

#stevebot-app#stevebot-app .message-bubble ul,
#stevebot-app#stevebot-app .message-bubble ol {
    padding-left: 18px !important;
    margin: 8px 0 !important
}

#stevebot-app#stevebot-app .message-bubble p {
    margin-bottom: 10px !important
}

#stevebot-app#stevebot-app .message-bubble p:last-child {
    margin-bottom: 0 !important
}

#stevebot-app#stevebot-app svg {
    display: inline-block !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important
}

#stevebot-app#stevebot-app img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important
}

#stevebot-app#stevebot-app .hidden {
    display: none !important
}