/* DivorceWorks Chatbot Styles - Silicon Valley Edition */
/* Color Scheme: #00263f (background), #ff8948 (accent), white, black */
/* Fonts: Montserrat for headings, Lato for body */

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

:root {
    --primary-bg: #00263f;
    --accent-color: #ff8948;
    --accent-glow: rgba(255, 137, 72, 0.3);
    --text-light: #ffffff;
    --text-dark: #000000;
    --gray-light: #f8f9fa;
    --gray-medium: #e0e0e0;
    --gray-dark: #666666;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    --card-shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.18);
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--primary-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.page {
    display: none;
    min-height: 100vh;
}

.page.active {
    display: block;
}

/* ============================================
   LANDING PAGE STYLES - SILICON VALLEY
   ============================================ */

#landing-page {
    background: var(--primary-bg);
    position: relative;
    overflow: hidden;
    color: var(--text-light);
}

/* Animated gradient orbs */
#landing-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

#landing-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 162, 255, 0.15) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    border-radius: 50%;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    position: relative;
    z-index: 1;
}

/* Logo positioned top right */
.logo-top-right {
    position: absolute;
    top: 30px;
    right: 40px;
    max-width: 250px;
    height: auto;
    z-index: 100;
    filter: brightness(1.1);
}

/* Logo on chatbot page */
#chatbot-page .logo-top-right {
    position: fixed;
    top: 15px;
    right: 30px;
    max-width: 180px;
    z-index: 1000;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

/* North Star - center top */
.north-star {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 120px;
    height: auto;
    z-index: 5;
}

/* Star Clusters */
.star-cluster {
    position: absolute;
    max-width: 150px;
    height: auto;
    z-index: 5;
    opacity: 0.9;
}

.star-cluster-1 {
    top: 20%;
    left: 8%;
}

.star-cluster-2 {
    bottom: 15%;
    right: 12%;
}

.star-cluster-3 {
    top: 25%;
    right: 10%;
}

header {
    text-align: center;
    margin-bottom: 80px;
    padding-top: 180px;
}

header h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-light);
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    letter-spacing: 0.5px;
}

.landing-content {
    max-width: 900px;
    margin: 0 auto;
}

.description-section h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 24px;
    text-align: center;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.description-section > p {
    font-size: 1.25rem;
    text-align: center;
    margin-bottom: 60px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 300;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 80px;
}

.feature {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    padding: 40px 32px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, var(--accent-color), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px var(--accent-glow);
}

.feature:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px var(--accent-glow));
}

.feature h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: var(--text-light);
    font-weight: 600;
    letter-spacing: -0.3px;
}

.feature p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    font-weight: 300;
}

.cta-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(20px);
    padding: 50px 48px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 60px;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: visible;
    z-index: 100;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg, var(--accent-color), rgba(255, 255, 255, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.cta-text {
    text-align: center;
    font-size: 1.15rem;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

.user-form {
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    z-index: 101;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.3px;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    font-size: 1rem;
    font-family: var(--font-body);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-light);
    transition: all 0.3s ease;
    position: relative;
    z-index: 102;
    pointer-events: auto;
}

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

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 4px var(--accent-glow), 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Checkbox styling */
.checkbox-group {
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 12px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-label span {
    flex: 1;
}

.checkbox-label a {
    color: var(--accent-color);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.checkbox-label a:hover {
    color: #ff6f28;
}

.btn-primary {
    width: 100%;
    padding: 18px 36px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #ff6f28 100%);
    color: var(--text-light);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(255, 137, 72, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #ff6f28 0%, var(--accent-color) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(255, 137, 72, 0.4);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary span {
    position: relative;
    z-index: 1;
}

.disclaimer {
    background: rgba(255, 255, 255, 0.04);
    border-left: 3px solid rgba(255, 137, 72, 0.5);
    padding: 24px 28px;
    border-radius: 12px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    backdrop-filter: blur(10px);
}

/* ============================================
   CHATBOT PAGE STYLES - SILICON VALLEY
   ============================================ */

#chatbot-page {
    background-color: var(--primary-bg);
    padding: 0;
    position: relative;
    overflow: hidden;
}

/* Animated gradient orbs for chatbot page */
#chatbot-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    top: -150px;
    left: -100px;
    border-radius: 50%;
    animation: float 18s ease-in-out infinite;
    z-index: 0;
}

#chatbot-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 162, 255, 0.12) 0%, transparent 70%);
    bottom: -150px;
    right: -100px;
    border-radius: 50%;
    animation: float 16s ease-in-out infinite reverse;
    z-index: 0;
}

.chat-container {
    max-width: 1000px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.98) 100%);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, var(--primary-bg) 0%, #003d5c 100%);
    color: var(--text-light);
    padding: 24px 36px 16px 36px;
    border-bottom: none;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 2;
}

.header-text {
    flex: 1;
}

.back-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    padding: 11px 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.2px;
}

.back-btn:hover {
    background: rgba(255, 137, 72, 0.2);
    border-color: var(--accent-color);
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(255, 137, 72, 0.3);
}

.back-btn:active {
    transform: translateX(-2px);
}


.chat-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    z-index: 1;
}

.chat-header h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.user-info {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
}

.header-disclaimer {
    padding: 12px 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    line-height: 1.5;
    margin-top: 12px;
}

.header-disclaimer strong {
    color: var(--accent-color);
    font-weight: 600;
}

.disclaimer-banner {
    background: linear-gradient(135deg, #003d5c 0%, var(--primary-bg) 100%);
    border-bottom: 1px solid rgba(255, 137, 72, 0.2);
    padding: 14px 36px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    line-height: 1.5;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.disclaimer-banner strong {
    color: var(--accent-color);
    font-weight: 600;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0 32px 16px 32px;
    background: transparent;
    min-height: 0;
}

.message {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.message:first-child {
    margin-top: 16px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.bot {
    align-items: flex-start;
}

.message.user {
    align-items: flex-end;
}

.message-content {
    max-width: 75%;
    padding: 18px 24px;
    border-radius: 16px;
    font-size: 1rem;
    line-height: 1.6;
    position: relative;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: auto;
    word-wrap: break-word;
}

.message-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.message.bot .message-content {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    color: var(--text-dark);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px 16px 16px 4px;
}

.message.bot .message-content strong {
    color: var(--accent-color);
    font-weight: 600;
}

/* Markdown formatting within messages */
.message-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 16px;
    margin-bottom: 12px;
    color: var(--accent-color);
}

.message-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 12px;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.message-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 0.9rem;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
}

.message-content table th,
.message-content table td {
    border: 1px solid var(--gray-medium);
    padding: 10px 12px;
    text-align: left;
}

.message-content table th {
    background-color: var(--gray-light);
    font-weight: 600;
    color: var(--text-dark);
}

.message-content table tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

.message-content ul,
.message-content ol {
    margin: 8px 0;
    padding-left: 24px;
}

.message-content li {
    margin: 4px 0;
}

.message-content p {
    margin: 8px 0;
}

.message-content code {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.message.bot .message-content::before {
    content: '';
    position: absolute;
    left: -8px;
    bottom: 4px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 12px 12px 0;
    border-color: transparent #ffffff transparent transparent;
}

.message.user .message-content {
    background: linear-gradient(135deg, var(--accent-color) 0%, #ff6f28 100%);
    color: var(--text-light);
    border-radius: 16px 16px 4px 16px;
    box-shadow: 0 4px 16px rgba(255, 137, 72, 0.3);
}

.message.user .message-content::before {
    content: '';
    position: absolute;
    right: -8px;
    bottom: 4px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 0 0 12px;
    border-color: transparent transparent transparent #ff6f28;
}

.message-label {
    font-size: 0.75rem;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--gray-dark);
}

/* Copy button styles */
.copy-btn {
    margin-top: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #ff6f28 100%);
    color: var(--text-light);
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(255, 137, 72, 0.25);
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 137, 72, 0.35);
    background: linear-gradient(135deg, #ff6f28 0%, var(--accent-color) 100%);
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn.copied {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.25);
}

.copy-btn.copied:hover {
    background: linear-gradient(135deg, #45a049 0%, #4caf50 100%);
}

.chat-input-area {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 20px 28px;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.quick-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.quick-option-btn {
    padding: 10px 18px;
    background: linear-gradient(135deg, rgba(0, 38, 63, 0.08) 0%, rgba(0, 38, 63, 0.06) 100%);
    color: var(--primary-bg);
    border: 1px solid rgba(0, 38, 63, 0.15);
    border-radius: 24px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-body);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}


.quick-option-btn:hover {
    background: linear-gradient(135deg, var(--accent-color) 0%, #ff6f28 100%);
    border-color: var(--accent-color);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 137, 72, 0.3);
}

.quick-option-btn:active {
    transform: translateY(0) scale(0.98);
}

.input-container {
    display: flex;
    gap: 12px;
    align-items: center;
}

#user-input {
    flex: 1;
    padding: 16px 20px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 24px;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    background: white;
}

#user-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px var(--accent-glow), 0 4px 16px rgba(0, 0, 0, 0.1);
}

.send-btn {
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #ff6f28 100%);
    color: var(--text-light);
    border: none;
    border-radius: 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-heading);
    box-shadow: 0 4px 12px rgba(255, 137, 72, 0.3);
    position: relative;
    overflow: hidden;
}


.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 137, 72, 0.4);
}

.send-btn:active {
    transform: translateY(0);
}

.send-btn:disabled {
    background: var(--gray-medium);
    cursor: not-allowed;
    box-shadow: none;
}

/* Document Link Styling */
.document-link {
    display: inline-block;
    margin: 8px 0;
    padding: 8px 15px;
    background-color: var(--primary-bg);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.document-link:hover {
    background-color: var(--accent-color);
}

/* Consultation CTA */
.consultation-cta {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 24px 28px;
    text-align: center;
    flex-shrink: 0;
}

.consultation-btn {
    display: inline-block;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #ff6f28 100%);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 24px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-heading);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(255, 137, 72, 0.3);
    position: relative;
    overflow: hidden;
}

.consultation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 137, 72, 0.4);
    background: linear-gradient(135deg, #ff6f28 0%, var(--accent-color) 100%);
}

.consultation-btn:active {
    transform: translateY(0);
}

.consultation-subtext {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--gray-dark);
    line-height: 1.5;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 6px;
    padding: 18px 24px;
    align-items: center;
}

.typing-dot {
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #ff6f28 100%);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
    box-shadow: 0 2px 8px rgba(255, 137, 72, 0.3);
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.5;
        box-shadow: 0 2px 8px rgba(255, 137, 72, 0.2);
    }
    30% {
        transform: translateY(-14px) scale(1.2);
        opacity: 1;
        box-shadow: 0 4px 12px rgba(255, 137, 72, 0.5);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    #landing-page::before,
    #landing-page::after {
        width: 300px;
        height: 300px;
    }

    .logo-top-right {
        max-width: 180px;
        top: 20px;
        right: 20px;
    }

    /* Keep chatbot page logo fixed at top right on mobile */
    #chatbot-page .logo-top-right {
        position: fixed;
        max-width: 120px;
        top: 10px;
        right: 12px;
        z-index: 1000;
    }

    /* Hide star cluster on chatbot page to prevent overlap */
    #chatbot-page .star-cluster-3 {
        display: none;
    }

    .north-star {
        max-width: 80px;
        top: 30px;
    }

    /* Hide star clusters on mobile to prevent text overlap */
    .star-cluster-1,
    .star-cluster-2 {
        display: none;
    }

    header {
        padding-top: 120px;
    }

    header h1 {
        font-size: 2.2rem;
    }

    .tagline {
        font-size: 1rem;
    }

    .description-section h2 {
        font-size: 1.6rem;
        margin-bottom: 16px;
    }

    .description-section > p {
        font-size: 1rem;
        margin-bottom: 40px;
        line-height: 1.6;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feature {
        padding: 32px 24px;
    }

    .cta-section {
        padding: 32px 24px;
    }

    .message-content {
        max-width: 85%;
        padding: 14px 18px;
    }

    .chat-messages {
        padding: 0 20px 16px 20px;
    }

    /* Pull first message right to top on mobile */
    .message:first-child {
        margin-top: 8px;
    }

    .chat-header {
        padding: 48px 20px 12px 20px;
    }

    .chat-header h1 {
        font-size: 1.3rem;
    }

    /* Hide user greeting on mobile */
    .user-info {
        display: none;
    }

    /* Compact disclaimer on mobile */
    .header-disclaimer {
        padding: 6px 0;
        font-size: 0.65rem;
        line-height: 1.2;
        margin-top: 4px;
    }

    .header-content {
        gap: 12px;
    }

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

    .disclaimer-banner {
        padding: 10px 20px;
        font-size: 0.75rem;
        line-height: 1.4;
    }

    .quick-options {
        justify-content: flex-start;
    }

    .chat-input-area {
        padding: 16px 12px;
    }

    .input-container {
        gap: 8px;
    }

    #user-input {
        font-size: 0.95rem;
        padding: 14px 16px;
    }

    .send-btn {
        padding: 14px 20px;
        font-size: 0.95rem;
        flex-shrink: 0;
    }

    /* Better table formatting on mobile */
    .message-content table {
        font-size: 0.85rem;
        white-space: normal;  /* Allow text wrapping */
        display: table;  /* Use normal table display */
        width: 100%;
        min-width: 100%;
    }

    .message-content table th,
    .message-content table td {
        padding: 8px 10px;
        word-wrap: break-word;
        white-space: normal;
    }

    /* Slightly wider messages for tables on mobile */
    .message.bot .message-content {
        max-width: 92%;
    }
}

/* Smooth scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--accent-color) 0%, #ff6f28 100%);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff6f28 0%, var(--accent-color) 100%);
}
