/* ===========================================
   SAVVY CORE OFFER BUILDER PRO™ - MAIN STYLES
   Professional, Spacious Design
   =========================================== */

/* ========== CSS VARIABLES ========== */
:root {
    /* Brand Colors */
    --primary-green: #79b061;
    --primary-green-dark: #629448;
    --primary-green-light: #8ec775;
    --text-black: #000000;
    --text-gray: #666666;
    --bg-white: #FFFFFF;
    --bg-light-gray: #F8F9FA;
    --border-color: #e0e0e0;
    
    /* Semantic Colors */
    --success: #28a745;
    --warning: #ffc107;
    --error: #dc3545;
    --info: #17a2b8;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ========== RESET & BASE STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-light-gray);
    color: var(--text-black);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ========== UTILITY CLASSES ========== */
.hidden {
    display: none !important;
}

/* ========== WELCOME SCREEN ========== */
.welcome-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #FFFFFF 0%, #F8F9FA 100%);
}

.welcome-content {
    max-width: 900px;
    width: 100%;
    text-align: center;
}

.welcome-header {
    margin-bottom: 3rem;
}

.app-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-black);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.app-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

/* Welcome Intro Section */
.welcome-intro {
    background: linear-gradient(135deg, rgba(121, 176, 97, 0.05) 0%, rgba(121, 176, 97, 0.1) 100%);
    border: 2px solid rgba(121, 176, 97, 0.2);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 3rem;
    text-align: left;
}

.intro-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-black);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 500;
}

/* Tool Explainer Sections */
.tool-explainer {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.explainer-section {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-green);
}

.explainer-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-black);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.explainer-section h3 i {
    color: var(--primary-green);
    font-size: 1.5rem;
}

.explainer-section p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-gray);
}

.clarity-explainer {
    border-left-color: #8b5cf6;
}

.clarity-explainer h3 i {
    color: #8b5cf6;
}

/* Welcome Tools Section */
.welcome-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.tool-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    text-align: left;
    border: 2px solid transparent;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.tool-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.tool-icon i {
    font-size: 1.75rem;
    color: white;
}

.tool-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-black);
}

.tool-card p {
    font-size: 1rem;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* CORE Badges */
.core-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.badge {
    background: rgba(121, 176, 97, 0.1);
    color: var(--primary-green);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Clarity Card Styling */
.clarity-card {
    border: 2px solid var(--primary-green);
    background: linear-gradient(135deg, rgba(121, 176, 97, 0.02) 0%, rgba(121, 176, 97, 0.05) 100%);
}

.clarity-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.clarity-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-black);
}

.feature i {
    color: var(--primary-green);
    font-size: 0.9rem;
}

/* Keep old classes for backwards compatibility but hide */
.welcome-info {
    display: none;
}

.info-card {
    display: none;
}

.welcome-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 3rem;
    font-size: 1.125rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: var(--font-family);
    min-height: 60px;
    min-width: 220px;
}

.btn-primary {
    background-color: var(--primary-green);
    color: var(--bg-white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--primary-green-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--bg-white);
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background-color: var(--primary-green);
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border: none;
    background: transparent;
    color: var(--text-gray);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-size: 1.25rem;
}

.icon-btn:hover {
    background-color: var(--bg-light-gray);
    color: var(--primary-green);
}

.icon-btn.primary {
    background-color: var(--primary-green);
    color: var(--bg-white);
}

.icon-btn.primary:hover {
    background-color: var(--primary-green-dark);
}

/* New Chat Button - More Prominent */
.btn-new-chat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-family);
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.btn-new-chat:hover {
    background: var(--primary-green-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-new-chat i {
    font-size: 1rem;
}

.new-chat-text {
    font-weight: 600;
}

/* ========== CHAT INTERFACE ========== */
.chat-interface {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: var(--bg-white);
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 80px;
}

.header-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-black);
    flex: 1;
    text-align: center;
}

/* ========== MODE TABS ========== */
.mode-tabs {
    display: flex;
    gap: 0;
    background-color: var(--bg-white);
    border-bottom: 2px solid var(--border-color);
    padding: 0 2rem;
    position: sticky;
    top: 80px;
    z-index: 99;
}

.mode-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-gray);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    font-family: var(--font-family);
}

.mode-name {
    font-size: 1.125rem;
    font-weight: 600;
}

.mode-tab:hover {
    color: var(--text-black);
    background-color: var(--bg-light-gray);
}

.mode-tab.active {
    color: var(--primary-green);
    border-bottom-color: var(--primary-green);
    font-weight: 700;
}

.mode-tab.active .mode-name {
    font-weight: 700;
}

/* Mobile responsive tabs */
@media (max-width: 768px) {
    .mode-tabs {
        padding: 0 0.5rem;
    }
    
    .mode-tab {
        padding: 0.875rem 0.5rem;
        font-size: 0.95rem;
    }
    
    .mode-name {
        font-size: 0.95rem;
    }
}

/* ========== HISTORY SIDEBAR ========== */
.history-sidebar {
    position: fixed;
    left: -320px;
    top: 0;
    width: 320px;
    height: 100vh;
    background-color: var(--bg-white);
    border-right: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transition: left var(--transition-base);
    z-index: 200;
    display: flex;
    flex-direction: column;
}

.history-sidebar.open {
    left: 0;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.history-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-black);
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.history-item {
    padding: 1rem;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.history-item:hover {
    background-color: var(--bg-light-gray);
    border-color: var(--primary-green);
}

.history-item.active {
    background-color: rgba(121, 176, 97, 0.1);
    border-color: var(--primary-green);
}

.history-item-title {
    font-weight: 600;
    color: var(--text-black);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.history-item-preview {
    font-size: 0.875rem;
    color: var(--text-gray);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.history-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-gray);
}

.history-item-delete {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--error);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.history-item:hover .history-item-delete {
    opacity: 1;
}

.history-item-view-offer {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.history-item-view-offer:hover {
    background: var(--primary-green-dark);
    transform: translateY(-1px);
}

.history-item-view-offer i {
    font-size: 0.875rem;
}

/* ========== CHAT CONTAINER ========== */
.chat-container {
    flex: 1;
    overflow-y: auto;
    background-color: var(--bg-light-gray);
}

.messages-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ========== MESSAGES ========== */
.message {
    display: flex;
    gap: 1rem;
    animation: messageSlideIn 0.3s ease;
}

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

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background-color: var(--primary-green);
    color: var(--bg-white);
}

.message.assistant .message-avatar {
    background-color: var(--bg-light-gray);
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
}

.message-content {
    flex: 1;
    max-width: 70%;
    position: relative;
}

.message-bubble {
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    word-wrap: break-word;
    line-height: 1.6;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
}

.message.user .message-bubble {
    background-color: var(--bg-white);
    color: var(--text-black);
    border-bottom-right-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.message.assistant .message-bubble {
    background-color: var(--bg-light-gray);
    color: var(--text-black);
    border-bottom-left-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.message-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.message:hover .message-actions {
    opacity: 1;
}

.message-action-btn {
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    font-size: 0.875rem;
}

.message-action-btn:hover {
    background-color: var(--bg-light-gray);
    color: var(--primary-green);
}

/* ========== THINKING INDICATOR ========== */
.thinking-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
    animation: messageSlideIn 0.3s ease;
}

.thinking-indicator .message-avatar {
    background-color: var(--bg-light-gray);
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
}

.thinking-dots {
    display: flex;
    gap: 6px;
    padding: 1rem 1.5rem;
    background-color: var(--bg-light-gray);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.thinking-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary-green);
    animation: thinkingBounce 1.4s infinite ease-in-out;
}

.thinking-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.thinking-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes thinkingBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.thinking-text {
    font-size: 0.875rem;
    color: var(--text-gray);
}

/* ========== INPUT AREA ========== */
.input-area {
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.05);
    position: sticky;
    bottom: 0;
    z-index: 50;
    padding: 1.5rem 2rem;
}

.input-wrapper {
    display: flex !important;
    align-items: flex-end !important;
    gap: 12px !important;
    width: 100% !important;
}

/* Textarea wrapper should flex grow */
.input-container,
.textarea-wrapper {
    flex: 1 !important;
    width: 100% !important;
}

.message-input {
    flex: 1;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    padding: 1rem 1.25rem;
    font-size: 1.125rem;
    font-family: var(--font-family);
    resize: none;
    min-height: 60px !important;
    height: 60px;
    max-height: 200px;
    outline: none;
    color: var(--text-black);
    line-height: 1.5;
    border-radius: var(--radius-lg);
    transition: border-color var(--transition-fast);
    overflow-y: auto;
}

/* Make textarea fill width - additional selectors */
#userInput,
textarea[placeholder*="Type your message"] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    font-size: 1.125rem !important;
}

.message-input:focus {
    border-color: var(--primary-green);
}

.message-input::placeholder {
    color: var(--text-gray);
}

.btn-send {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border: none;
    background-color: var(--primary-green);
    color: var(--bg-white);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    font-size: 1.25rem;
    box-shadow: var(--shadow-md);
}

.btn-send:hover {
    background-color: var(--primary-green-dark);
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.btn-send:active {
    transform: scale(0.95);
}

.btn-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Stop Button */
.btn-stop {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border: none;
    background-color: #e74c3c; /* Red for stop */
    color: var(--bg-white);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    font-size: 1.25rem;
    box-shadow: var(--shadow-md);
    margin-right: 0.5rem;
}

.btn-stop:hover {
    background-color: #c0392b; /* Darker red on hover */
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.btn-stop:active {
    transform: scale(0.95);
}

.btn-stop.hidden {
    display: none;
}

/* ========== FILE PREVIEW ========== */
.file-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background-color: var(--bg-light-gray);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-gray);
    font-size: 0.875rem;
}

.file-info i {
    color: var(--primary-green);
    font-size: 1.25rem;
}

.icon-btn-small {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-gray);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-btn-small:hover {
    background-color: var(--error);
    color: var(--bg-white);
}

/* ========== OFFER VIEW ========== */
.offer-view {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-white);
}

.offer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
    gap: 1rem;
}

.offer-actions {
    display: flex;
    gap: 0.75rem;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: 2px solid var(--primary-green);
    background-color: var(--bg-white);
    color: var(--primary-green);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: var(--font-family);
    min-height: 44px;
}

.action-btn:hover {
    background-color: var(--primary-green);
    color: var(--bg-white);
}

.action-btn.primary {
    background-color: var(--primary-green);
    color: var(--bg-white);
}

.action-btn.primary:hover {
    background-color: var(--primary-green-dark);
}

.offer-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.offer-title-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid var(--primary-green);
}

.offer-title-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-black);
    margin: 0;
}

.offer-section {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.offer-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-green);
}

.offer-section-header i {
    font-size: 1.75rem;
    color: var(--primary-green);
}

.offer-section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-black);
}

.offer-section-content {
    color: var(--text-black);
    line-height: 1.8;
    font-size: 1rem;
}

.offer-section-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-black);
}

.offer-section-content p {
    margin-bottom: 1rem;
}

.offer-section-content ul,
.offer-section-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.offer-section-content li {
    margin-bottom: 0.5rem;
}

.offer-section-content strong {
    color: var(--primary-green);
    font-weight: 600;
}

/* ========== TOAST NOTIFICATIONS ========== */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    min-width: 300px;
    padding: 1rem 1.25rem;
    background-color: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: toastSlideIn 0.3s ease;
    border-left: 4px solid;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--error);
}

.toast.info {
    border-left-color: var(--info);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast-icon {
    font-size: 1.25rem;
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--error);
}

.toast.info .toast-icon {
    color: var(--info);
}

.toast.warning .toast-icon {
    color: var(--warning);
}

.toast-message {
    flex: 1;
    color: var(--text-black);
    font-size: 0.9375rem;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0.25rem;
    transition: color var(--transition-fast);
    font-size: 1.125rem;
}

.toast-close:hover {
    color: var(--text-black);
}

/* ========== ERROR MESSAGE BOX ========== */
.error-message-box {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    border: 2px solid #ff4444;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: var(--shadow-md);
}

.error-content {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.error-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.error-text h3 {
    color: #dc3545;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.error-text p {
    color: #721c24;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.error-text ul {
    margin: 0.5rem 0 0.5rem 1.5rem;
    color: #721c24;
}

.error-text li {
    margin-bottom: 0.25rem;
}

.error-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.error-actions button {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-retry {
    background: #28a745;
    color: white;
}

.btn-retry:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.btn-refresh {
    background: #17a2b8;
    color: white;
}

.btn-refresh:hover {
    background: #138496;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.3);
}

.btn-dismiss {
    background: #6c757d;
    color: white;
}

.btn-dismiss:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
    .app-title {
        font-size: 2rem;
    }
    
    .app-subtitle {
        font-size: 1rem;
    }
    
    .welcome-info {
        grid-template-columns: 1fr;
    }
    
    .welcome-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        min-width: auto;
    }
    
    .header-title {
        font-size: 1.125rem;
    }
    
    .history-sidebar {
        width: 280px;
        left: -280px;
    }
    
    .messages-container {
        padding: 1rem;
    }
    
    .message-content {
        max-width: 80%;
    }
    
    .offer-content {
        padding: 1rem;
    }
    
    .offer-header {
        padding: 1rem;
    }
    
    .action-btn span {
        display: none;
    }
    
    /* New Chat button on mobile - hide text, show icon only */
    .btn-new-chat {
        padding: 0.75rem;
        width: 44px;
        height: 44px;
        min-width: 44px;
    }
    
    .new-chat-text {
        display: none;
    }
    
    .btn-new-chat i {
        font-size: 1.1rem;
    }
    
    .toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }
    
    .toast {
        min-width: auto;
    }
    
    .input-area {
        padding: 0.75rem 0.75rem 1rem 0.75rem;
    }
    
    .input-wrapper {
        gap: 8px !important;
    }
    
    /* Hide less important buttons on mobile */
    #attachFileBtn,
    #voiceInputBtn {
        display: none !important;
    }
    
    /* Make message input MUCH bigger */
    #messageInput,
    .message-input {
        flex: 1 !important;
        min-height: 50px !important;
        font-size: 16px !important;
        padding: 0.875rem 1rem !important;
    }
    
    /* Icon buttons smaller on mobile */
    .icon-btn {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        padding: 0 !important;
    }
    
    /* Send button optimized for mobile */
    .btn-send {
        width: 50px !important;
        height: 50px !important;
        min-width: 50px !important;
        min-height: 50px !important;
        flex-shrink: 0 !important;
    }
    
    /* Voice realtime button */
    #voiceRealtimeBtn {
        width: 44px !important;
        height: 44px !important;
    }
    
    /* Voice toggle button */
    #voiceToggleBtn {
        width: 44px !important;
        height: 44px !important;
    }
}

@media (max-width: 480px) {
    .app-title {
        font-size: 1.75rem;
    }
    
    .info-card {
        padding: 1.5rem;
    }
    
    .info-card i {
        font-size: 2rem;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .message-bubble {
        padding: 1rem;
        font-size: 0.9375rem;
    }
    
    /* Input takes up maximum space */
    .input-area {
        padding: 0.5rem 0.5rem 0.75rem 0.5rem;
    }
    
    .input-wrapper {
        gap: 6px !important;
    }
    
    #messageInput,
    .message-input {
        font-size: 16px !important;
        min-height: 48px !important;
        padding: 0.75rem 0.875rem !important;
    }
    
    /* Smaller buttons on very small screens */
    .icon-btn {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        font-size: 1rem !important;
    }
    
    .btn-send {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
    }
    
    #voiceRealtimeBtn,
    #voiceToggleBtn {
        width: 40px !important;
        height: 40px !important;
    }
}

/* ========== SCROLLBAR STYLING ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-green-dark);
}

/* ========== ACCESSIBILITY ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

button:focus-visible,
textarea:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* ========== VOICE SETTINGS MODAL ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-black);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-header i {
    color: var(--primary-green);
}

.modal-body {
    padding: 1.5rem;
}

.setting-group {
    margin-bottom: 1.5rem;
}

.setting-group label {
    display: block;
    font-weight: 600;
    color: var(--text-black);
    margin-bottom: 0.5rem;
}

.voice-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: var(--font-family);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    color: var(--text-black);
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.voice-select:focus {
    outline: none;
    border-color: var(--primary-green);
}

.setting-description {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-gray);
    font-style: italic;
}

.setting-info {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-light-gray);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.setting-info i {
    color: var(--primary-green);
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.setting-info p {
    font-size: 0.875rem;
    color: var(--text-gray);
    line-height: 1.5;
    margin: 0;
}

.setting-info strong {
    color: var(--text-black);
}

/* ========== PRINT STYLES ========== */
@media print {
    .chat-header,
    .input-area,
    .history-sidebar,
    .toast-container,
    .offer-header,
    .modal {
        display: none;
    }
    
    .offer-content {
        padding: 0;
    }
    
    body {
        background: white;
    }
}
