/* Modern DealsHub AI Chat Interface - Stunning Design */

/* CSS Variables for Consistent Design */
:root {
    /* Primary Colors */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --success-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    
    /* Neutral Colors */
    --bg-primary: #fafbfc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8f9fa;
    --surface: #ffffff;
    --surface-elevated: #ffffff;
    
    /* Text Colors */
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-light: #a0aec0;
    
    /* Border Colors */
    --border-light: #e2e8f0;
    --border-medium: #cbd5e0;
    --border-focus: #667eea;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.4);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1a202c;
        --bg-secondary: #2d3748;
        --bg-tertiary: #4a5568;
        --surface: #2d3748;
        --surface-elevated: #4a5568;
        --text-primary: #f7fafc;
        --text-secondary: #e2e8f0;
        --text-muted: #a0aec0;
        --text-light: #718096;
        --border-light: #4a5568;
        --border-medium: #718096;
    }
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Modern Chat Section - IMPORTANT: Override all conflicting styles */
.modern-chat-section {
    min-height: calc(100vh - 70px) !important; /* Adjusted for navbar height */
    height: calc(100vh - 70px) !important;
    width: 100% !important;
    max-width: 100vw !important;
    /* margin-top: 120px !important; */
    background: var(--bg-primary) !important;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(245, 87, 108, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(79, 172, 254, 0.05) 0%, transparent 50%);
    position: relative !important;
    overflow-x: hidden;
    padding: 0;
}

.chat-container {
    max-width: 101vw !important;
    width: 100vw !important;
    margin: 0 auto !important;
    padding: 0 var(--space-md) !important;
    min-height: calc(100vh - 70px) !important; /* Adjusted for navbar height */
    height: calc(100vh - 70px) !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    z-index: 10 !important;
    box-sizing: border-box;
}

/* Main Header Styles */
.main-header {
    padding: var(--space-sm) 0;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.5s forwards;
    margin-bottom: 0;
    flex-shrink: 0;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.logo-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
}

.logo-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: var(--primary-gradient);
    border-radius: var(--radius-xl);
    opacity: 0.3;
    filter: blur(20px);
    animation: pulse 3s ease-in-out infinite;
}

.brand-text {
    text-align: center;
    margin-bottom: var(--space-xs);
}

.brand-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0;
    line-height: 1;
    text-align: center;
}

.brand-deals {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-hub {
    color: var(--text-primary);
}

.brand-ai {
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.brand-ai::after {
    content: '';
    position: absolute;
    top: -8px;
    right: -16px;
    width: 12px;
    height: 12px;
    background: var(--secondary-gradient);
    border-radius: 50%;
    box-shadow: 0 0 16px rgba(245, 87, 108, 0.6);
    animation: pulse 2s ease-in-out infinite;
}

.brand-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0;
}

/* Mode Selection Section */
.mode-selection-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--space-sm) 0;
    margin-bottom: var(--space-sm);
    animation: fadeInDown 0.8s ease-out 0.3s forwards;
    opacity: 0;
    flex-shrink: 0;
}

/* Hide mode selection during conversation - Critical for mobile */
.mode-selection-section.hidden-during-conversation {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: none !important;
}

.mode-options {
    display: flex;
    gap: var(--space-md);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    padding: var(--space-sm) var(--space-md);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.mode-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.mode-radio {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-light);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: var(--space-sm);
    flex-shrink: 0;
}

.mode-radio:hover {
    border-color: var(--border-focus);
    box-shadow: 0 0 8px rgba(102, 126, 234, 0.3);
}

.mode-radio:checked {
    background: var(--primary-gradient);
    border-color: transparent;
    box-shadow: 0 0 12px rgba(102, 126, 234, 0.5);
}

.mode-radio:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 0.9rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.mode-label {
    display: flex;
    flex-direction: column;
    gap: 1px;
    user-select: none;
}

.mode-label i {
    font-size: 1.2rem;
    color: var(--border-focus);
    transition: color 0.3s ease;
}

.mode-option input:checked ~ .mode-label i {
    color: var(--border-focus);
    transform: scale(1.1);
}

.mode-name {
    font-weight: 600;
    color: black;
    font-size: 0.9rem;
}

.mode-desc {
    font-size: 0.75rem;
    color: black;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.badge-coming {
    background: var(--secondary-gradient);
    color: white;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

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

/* Floating Action Controls */
.floating-controls {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    animation: slideInRight 0.15s ease-out;
    transform: translateZ(0);
    will-change: transform;
}

.floating-btn {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.15s ease,
                color 0.15s ease;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    min-width: 48px;
    height: 48px;
    padding: 0;
    overflow: hidden;
    position: relative;
    will-change: transform;
    -webkit-tap-highlight-color: transparent;
    transform: translateZ(0);
}

.floating-btn:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

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

.floating-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.floating-btn-fullscreen {
    order: 1;
}

.floating-btn-new-search {
    order: 2;
    min-width: 48px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-btn-new-search .floating-btn-text {
    position: absolute;
    left: 48px;
    margin-left: var(--space-xs);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.15s ease,
                transform 0.15s ease;
    pointer-events: none;
}

.floating-btn-new-search:hover {
    min-width: 140px;
    padding: 0 var(--space-md);
}

.floating-btn-new-search:hover .floating-btn-text {
    opacity: 1;
    transform: translateX(0);
}

@keyframes slideInRight {
    from {
        transform: translate3d(50px, 0, 0);
        opacity: 0;
    }
    to {
        transform: translate3d(0, 0, 0);
        opacity: 1;
    }
}

/* Welcome Section */
.welcome-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: var(--space-sm) 0;
    gap: var(--space-md);
    min-height: auto;
    height: auto;
    max-height: 100%;
    overflow-y: auto;
}

/* Hero Content */
.hero-content {
    text-align: center;
    margin-bottom: var(--space-xl);
    opacity: 0;
    animation: fadeInUp 1s ease-out 1s forwards;
}

.hero-icon {
    position: relative;
    margin-bottom: var(--space-xl);
    display: flex;
    justify-content: center;
}

.floating-icon {
    width: 100px;
    height: 100px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 3;
    animation: float 4s ease-in-out infinite;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border: 2px solid rgba(79, 172, 254, 0.3);
    border-radius: 50%;
    animation: pulseRing 2s ease-out infinite;
}

.pulse-ring-delayed {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border: 2px solid rgba(79, 172, 254, 0.3);
    border-radius: 50%;
    animation: pulseRing 2s ease-out infinite 1s;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    line-height: 1.2;
    letter-spacing: -1px;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Search Section */
.search-section {
    opacity: 0;
    animation: fadeInUp 1s ease-out 1.5s forwards;
    margin-top: 0;
    flex-shrink: 0;
}

.search-form {
    width: 100%;
    padding-left: 10%;
    padding-right: 10%;
}

.search-input-wrapper {
    position: relative;
    background: var(--surface);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    backdrop-filter: blur(20px) saturate(180%);
}

.search-input-wrapper:focus-within {
    border-color: var(--border-focus);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    left: var(--space-lg);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.25rem;
    z-index: 2;
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within .search-icon {
    color: var(--border-focus);
    transform: translateY(-50%) scale(1.1);
}

.search-input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    padding: var(--space-md) 120px var(--space-md) 50px;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
    font-family: var(--font-sans);
    line-height: 1.5;
    margin-left:10px
}

.search-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.input-actions {
    position: absolute;
    right: var(--space-sm);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: var(--space-xs);
}

.action-btn {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.125rem;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.action-btn:hover::before {
    width: 100%;
    height: 100%;
}

.voice-btn {
    background: rgba(102, 126, 234, 0.1);
    color: var(--border-focus);
}

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

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

.send-btn:hover {
    background: var(--secondary-gradient);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    opacity: 0;
    animation: fadeInUp 1s ease-out 2s forwards;
    max-width: 100%;
    flex-shrink: 0;
}

.action-card {
    background: var(--surface);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    max-height: 120px;
    max-width: 85%;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
    transition: left 0.5s ease;
}

.action-card:hover::before {
    left: 100%;
}

.action-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.25);
    border-color: var(--border-focus);
}

.card-icon {
    width: 38px;
    height: 38px;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-xs) auto;
    font-size: 1.1rem;
    color: white;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.action-card:hover .card-icon {
    transform: scale(1.15) rotate(8deg);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.action-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: black;
    margin-bottom: 2px;
    transition: color 0.3s ease;
}

.action-card:hover h3 {
    color: #667eea;
}

.action-card p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
}

.action-card:hover p {
    color: var(--text-primary);
}

/* Trending Section */
.trending-section {
    opacity: 0;
    animation: fadeInUp 1s ease-out 2.5s forwards;
}

.trending-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    justify-content: center;
}

.trending-title i {
    color: #ff6b35;
    animation: flicker 2s ease-in-out infinite;
}

.suggestion-pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
}

.suggestion-pill {
    background: var(--surface);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-full);
    padding: var(--space-sm) var(--space-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.suggestion-pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    transition: left 0.3s ease;
}

.suggestion-pill:hover::before {
    left: 0;
}

.suggestion-pill:hover {
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.suggestion-pill i {
    font-size: 0.875rem;
    z-index: 2;
    position: relative;
}

.suggestion-pill span {
    z-index: 2;
    position: relative;
}

/* Conversation Section */
.conversation-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    height: 100%;
    animation: fadeIn 0.5s ease-out;
    overflow: hidden;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--space-md) 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-height: none;
    height: 100%;
    scrollbar-gutter: stable;
}

/* Message Styles */
.chat-message {
    display: flex;
    gap: var(--space-md);
    opacity: 0;
    animation: slideInMessage 0.5s ease-out forwards;
}

.user-message {
    justify-content: flex-end;
}

.user-message .message-bubble {
    background: var(--primary-gradient);
    color: white;
    border-radius: var(--radius-lg) var(--radius-lg) var(--radius-sm) var(--radius-lg);
    max-width: 70%;
    padding: var(--space-md) var(--space-lg);
    box-shadow: var(--shadow-md);
    font-weight: 500;
}

.bot-message {
    justify-content: flex-start;
}

.bot-message .message-bubble {
    background: var(--surface);
    color: var(--text-primary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-sm);
    max-width: 85%;
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
}

/* Bot Response Styles */
.bot-greeting {
    line-height: 1.6;
}

.bot-greeting p {
    margin-bottom: var(--space-md);
    font-size: 1rem;
}

.conversation-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-md);
}

.suggestion-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.suggestion-btn:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Offers Grid */
.bot-offers-response .response-message {
    margin-bottom: var(--space-lg);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Reduced min-width further */
    gap: var(--space-sm); /* Reduced gap from var(--space-md) */
    margin-top: var(--space-sm); /* Reduced margin */
    width: 100%;
}

/* Offer Card Styles */
.offer-card {
    background: var(--surface);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    margin-bottom: var(--space-xs); /* Reduced margin */
}

.offer-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-focus);
}

.offer-image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f8f9fa;
    height: 120px;
    width: 100%;
}

[data-theme="dark"] .offer-image-container,
[data-theme="night"] .offer-image-container {
    background: #2d3748;
}

.offer-image {
    width: auto;
    height: 90px;
    max-width: 85%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.offer-card:hover .offer-image {
    transform: scale(1.05);
}

.offer-campaign {
    position: absolute;
    top: var(--space-xs); /* Reduced spacing */
    left: var(--space-xs); /* Reduced spacing */
    background: var(--secondary-gradient);
    color: white;
    padding: 2px var(--space-xs); /* Reduced padding */
    border-radius: var(--radius-sm); /* Smaller radius */
    font-size: 0.7rem; /* Smaller font */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: var(--shadow-sm);
}

.similarity-score {
    position: absolute;
    top: var(--space-xs);
    right: var(--space-xs);
    background: var(--primary-gradient);
    color: white;
    padding: 2px var(--space-xs);
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    opacity: 0.9;
}

.offer-details {
    padding: var(--space-sm); /* Reduced padding from var(--space-md) */
    padding-bottom: var(--space-xs); /* Minimize gap before actions */
}

.offer-title {
    font-size: 0.9rem; /* Reduced font size further */
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs); /* Reduced margin */
    line-height: 1.3; /* Tighter line height */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.offer-coupon {
    background: var(--success-gradient);
    color: white;
    padding: 2px var(--space-xs); /* Reduced padding */
    border-radius: var(--radius-sm);
    font-size: 0.7rem; /* Reduced font size */
    font-weight: 700;
    display: inline-block;
    margin-bottom: var(--space-xs); /* Reduced margin */
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: var(--shadow-sm);
}

.offer-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 4px; /* Reduced gap */
    margin-bottom: var(--space-xs); /* Reduced margin */
}

.offer-category {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 2px 6px; /* Reduced padding */
    border-radius: var(--radius-sm);
    font-size: 0.65rem; /* Smaller font */
    font-weight: 500;
    text-transform: capitalize;
}

.offer-actions {
    border-top: 1px solid var(--border-light);
    margin-top: var(--space-xs); /* Reduced from 50px to minimal spacing */
    padding: var(--space-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-tertiary);
}

.feedback-buttons {
    display: flex;
    gap: var(--space-xs);
}

.feedback-like,
.feedback-dislike {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    width: 32px; /* Reduced size */
    height: 32px; /* Reduced size */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.3s ease;
    font-size: 0.8rem; /* Reduced font size */
}

.feedback-like:hover {
    background: var(--success-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.feedback-dislike:hover {
    background: var(--secondary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.feedback-like.liked {
    background: var(--success-gradient);
    color: white;
    border-color: transparent;
}

.feedback-dislike.disliked {
    background: var(--secondary-gradient);
    color: white;
    border-color: transparent;
}

.get-deal-btn {
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.get-deal-btn:hover {
    background: var(--secondary-gradient);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Conversation Input */
.conversation-input-section {
    background: var(--surface);
    border-top: 1px solid var(--border-light);
    padding: 4px;
    position: sticky;
    bottom: 0;
    backdrop-filter: blur(20px) saturate(180%);
    flex-shrink: 0;
    z-index: 100;
}

.conversation-form {
    width: 100%;
}

.conversation-input-wrapper {
    position: relative;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
}

.conversation-input-wrapper:focus-within {
    border-color: var(--border-focus);
    box-shadow: var(--shadow-glow);
}

.conversation-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: var(--space-sm) var(--space-md);
    font-size: 1rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-weight: 500;
}

.conversation-input::placeholder {
    color: var(--text-muted);
}

.conversation-send-btn {
    width: 44px;
    height: 44px;
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
}

.conversation-send-btn:hover {
    background: var(--secondary-gradient);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.loading-content {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    text-align: center;
    box-shadow: var(--shadow-xl);
    max-width: 300px;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.spinner-ring {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-light);
    border-top: 4px solid var(--border-focus);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(2) {
    animation-delay: 0.1s;
    margin-left: -10px;
}

.spinner-ring:nth-child(3) {
    animation-delay: 0.2s;
    margin-left: -10px;
}

.loading-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Feedback Alert */
.feedback-alert {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    background: var(--success-gradient);
    color: white;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
}

/* Background Elements */
.bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.floating-shape {
    position: absolute;
    background: var(--primary-gradient);
    border-radius: 50%;
    opacity: 0.1;
    animation: floatShape 20s ease-in-out infinite;
}

.shape-1 {
    width: 100px;
    height: 100px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 10%;
    animation-delay: 5s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    bottom: 20%;
    left: 15%;
    animation-delay: 10s;
}

.shape-4 {
    width: 120px;
    height: 120px;
    top: 30%;
    right: 20%;
    animation-delay: 15s;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes slideInMessage {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

@keyframes pulseRing {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.4);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes floatShape {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(120deg);
    }
    66% {
        transform: translateY(10px) rotate(240deg);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .chat-container {
        max-width: 85vw;
        width: 85vw;
        padding: 0 var(--space-sm);
    }
    
    .brand-title {
        font-size: 1.9rem; /* Reduced to prevent overlap */
    }
    
    .quick-actions {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .chat-container {
        padding: 0 var(--space-md);
        max-width: 95vw;
        width: 95vw;
    }
    
    .brand-title {
        font-size: 1.8rem; /* Reduced for mobile */
    }
    
    .brand-subtitle {
        font-size: 1rem; /* Smaller on mobile */
        margin-bottom: var(--space-lg); /* Maintain spacing on mobile */
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    /* Ensure mode selection is properly handled on mobile */
    .mode-selection-section {
        display: flex !important;
    }
    
    /* Hide mode selection during conversation on mobile */
    .conversation-section .mode-selection-section,
    .conversation-section ~ .mode-selection-section {
        display: none !important;
    }
    
    /* Mobile: Transform cards into clean buttons */
    .quick-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: var(--space-lg);
    }
    
    .action-card {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        padding: 14px 18px;
        background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.06));
        border: 2px solid rgba(102, 126, 234, 0.15);
        border-radius: 14px;
        min-height: auto;
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.08);
    }
    
    .action-card:active {
        transform: scale(0.97);
        box-shadow: 0 2px 4px rgba(102, 126, 234, 0.12);
    }
    
    .card-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
        margin-bottom: 0;
        margin-right: 14px;
        border-radius: 12px;
        flex-shrink: 0;
    }
    
    .action-card h3 {
        font-size: 1rem;
        margin-bottom: 0;
        font-weight: 600;
        color: var(--text-primary);
        flex: 1;
        color: black;
        text-align: left;
    }
    
    .action-card p {
        display: none; /* Hide subtitle on mobile for cleaner button look */
    }
    
    .action-card:hover {
        transform: none; /* Disable hover on mobile */
    }
    
    .action-card:hover .card-icon {
        transform: none; /* Disable icon animation on mobile */
    }
    
    .search-input {
        padding: var(--space-sm) 100px var(--space-sm) 60px;
        font-size: 0.95rem;
    }
    
    .input-actions {
        gap: 4px;
    }
    
    .action-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .offers-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }
    
    .offer-actions {
        flex-direction: column;
        gap: var(--space-sm);
        align-items: stretch;
    }
    
    .feedback-buttons {
        justify-content: center;
    }
    
    .floating-controls {
        top: 80px;
        right: 15px;
        gap: var(--space-xs);
    }
    
    .floating-btn {
        min-width: 44px;
        height: 44px;
        font-size: 0.8rem;
    }
    
    /* Hide fullscreen toggle on mobile devices */
    .floating-btn-fullscreen {
        display: none;
    }
    
    .floating-btn-new-search:hover {
        min-width: 120px;
    }
    
    .main-header {
        padding: var(--space-md) 0;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: var(--space-xl) 0;
    }
    
    .logo-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .brand-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-icon .floating-icon {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
    
    /* Ensure mode selection is properly hidden during conversation on small mobile */
    .mode-selection-section {
        display: flex !important;
    }
    
    .conversation-section .mode-selection-section,
    .conversation-section ~ .mode-selection-section {
        display: none !important;
    }
    
    /* Extra small mobile - Keep button style, slightly more compact */
    .quick-actions {
        gap: 8px;
    }
    
    .action-card {
        padding: 12px 16px;
        border-radius: 12px;
    }
    
    .card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        margin-right: 12px;
        border-radius: 10px;
    }
    .welcome-section{
        justify-content: flex-start;
        padding:0px;
        color:black;
    }

    .brand-hub{
        color: black;
    }

    .brand-subtitle{
        color:black;
    }

    .action-card h3 {
        font-size: 0.95rem;
        color: black;
    }
    
    /* .conversation-input-section {
        padding: var(--space-md) 0;
    } */
    
    .suggestion-pills {
        gap: var(--space-xs);
    }
    
    .suggestion-pill {
        font-size: 0.75rem;
        padding: var(--space-xs) var(--space-sm);
    }
}

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

/* High contrast mode */
@media (prefers-contrast: high) {
    .search-input-wrapper,
    .action-card,
    .suggestion-pill,
    .offer-card {
        border-width: 3px;
    }
}

/* Focus styles for accessibility */
.search-input:focus,
.conversation-input:focus,
.action-btn:focus,
.suggestion-pill:focus,
.action-card:focus,
.floating-btn:focus {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Mobile touch feedback */
    .action-card:active {
        transform: scale(0.97) !important;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15) !important;
    }
    
    .suggestion-pill:active {
        transform: scale(0.95);
    }
    
    .action-btn:active,
    .floating-btn:active {
        transform: scale(0.92);
    }
    
    .get-deal-btn:active {
        transform: scale(0.96);
    }
}

/* Coming Soon Message */
.coming-soon-message {
    display: none;
    flex: 1;
    align-items: center;
    justify-content: center;
    /* padding: var(--space-2xl); */
    animation: fadeIn 0.5s ease-out;
    width: 100%;
}

.coming-soon-content {
    text-align: center;
    max-width: 600px;
    animation: slideInUp 0.6s ease-out;
}

.coming-soon-icon {
    font-size: 4rem;
    color: var(--border-focus);
    animation: float 3s ease-in-out infinite;
}

.coming-soon-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.coming-soon-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    line-height: 1.7;
}

.feature-benefits {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin: var(--space-2xl) 0;
    align-items: center;
}

.benefit {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: rgba(102, 126, 234, 0.1);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--border-focus);
    animation: slideInUp 0.6s ease-out backwards;
}

.benefit:nth-child(1) { animation-delay: 0.1s; }
.benefit:nth-child(2) { animation-delay: 0.2s; }
.benefit:nth-child(3) { animation-delay: 0.3s; }

.benefit i {
    font-size: 1.5rem;
    color: var(--border-focus);
    flex-shrink: 0;
}

.benefit span {
    text-align: left;
    color: var(--text-primary);
    font-weight: 500;
}

.coming-soon-message-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: var(--space-lg);
}

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

/* Mode selection responsive */
@media (max-width: 768px) {
    .mode-options {
        flex-direction: column;
        gap: var(--space-md);
        width: 100%;
        max-width: 300px;
    }

    .coming-soon-content h2 {
        font-size: 1.5rem;
    }

    .coming-soon-content p {
        font-size: 1rem;
    }

    .feature-benefits {
        gap: var(--space-sm);
    }

    .benefit {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .mode-options {
        padding: var(--space-sm);
        gap: var(--space-sm);
    }

    .mode-label i {
        font-size: 1.2rem;
    }

    .mode-name {
        font-size: 0.9rem;
    }

    .mode-desc {
        font-size: 0.75rem;
    }

    .coming-soon-icon {
        font-size: 3rem;
    }

    .coming-soon-content h2 {
        font-size: 1.3rem;
    }

    .coming-soon-content p {
        font-size: 0.95rem;
    }
}

/* Conversation Limit Notice Styles */
.conversation-limit-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
    border-radius: var(--radius-lg);
    border: 2px solid #feb2b2;
    text-align: center;
}

.limit-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(245, 101, 101, 0.3);
}

.limit-icon i {
    font-size: 1.8rem;
    color: white;
}

.limit-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0;
    max-width: 500px;
}

.new-session-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.new-session-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.new-session-btn i {
    font-size: 1.1rem;
}

/* Limit message specific styling */
.limit-message {
    animation: slideIn 0.5s ease-out;
}

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

@media (max-width: 768px) {
    .conversation-limit-notice {
        padding: var(--space-md);
        gap: var(--space-sm);
    }

    .limit-icon {
        width: 50px;
        height: 50px;
    }

    .limit-icon i {
        font-size: 1.5rem;
    }

    .limit-text {
        font-size: 0.9rem;
    }

    .new-session-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}


