.chat-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    min-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(88, 103, 221, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header .robot-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: #5867dd;
    animation: float 3s ease-in-out infinite;
}

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

.chat-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #5867dd 0%, #6a1b9a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.chat-header .subtitle {
    font-size: 1.1rem;
    color: #a8b2d1;
    margin: 0;
}

.chat-interface {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(20, 20, 35, 0.7);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    scroll-behavior: smooth;
}

.message {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border-radius: 0.75rem;
    max-width: 75%;
    word-wrap: break-word;
    animation: messageSlide 0.3s ease-out;
}

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

.message.user {
    margin-left: auto;
    background: linear-gradient(
        45deg,
        rgba(88, 103, 221, 0.3) 0%,
        rgba(106, 27, 154, 0.3) 100%
    );
    border: 1px solid rgba(88, 103, 221, 0.2);
    color: #fff;
}

.message.system {
    margin-right: auto;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.message.system.error {
    background: linear-gradient(
        45deg,
        rgba(221, 88, 88, 0.3) 0%,
        rgba(154, 27, 27, 0.3) 100%
    );
    border: 1px solid rgba(221, 88, 88, 0.2);
}

.message.system.error .message-text {
    color: #ffcdd2;
}

.message.system.error .assistant-icon svg {
    color: #ffcdd2;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.assistant-icon {
    width: 24px;
    height: 24px;
    color: #5867dd;
}

.assistant-label {
    font-size: 0.9rem;
    color: #a8b2d1;
}

.message-content {
    color: #fff;
    line-height: 1.6;
    font-size: 1rem;
}

.message-content p {
    margin: 0 0 0.75rem 0;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-text ul {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
    color: #e0e0e0;
}

.message-text li {
    margin: 0.5rem 0;
}

.chat-form {
    position: relative;
    padding: 1.5rem;
    background: rgba(20, 20, 35, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.input-wrapper {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: #fff;
    font-size: 1rem;
    resize: none;
    min-height: 60px;
    max-height: 200px;
    transition: all 0.3s ease;
}

.chat-input:focus {
    outline: none;
    border-color: rgba(88, 103, 221, 0.5);
    box-shadow: 0 0 20px rgba(88, 103, 221, 0.2);
    background: rgba(255, 255, 255, 0.07);
}

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

.send-button {
    background: linear-gradient(135deg, #5867dd 0%, #6a1b9a 100%);
    border: none;
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 60px;
    font-weight: 600;
}

.send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(88, 103, 221, 0.3);
}

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

.send-button-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.send-button svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.send-button:hover svg {
    transform: translateX(3px);
}

.input-help {
    text-align: right;
    font-size: 0.85rem;
    color: #a8b2d1;
    margin-top: 0.75rem;
    opacity: 0.7;
}

.typing-indicator-container {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    width: fit-content;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.typing-indicator {
    display: flex;
    padding: 0.5rem;
    gap: 0.5rem;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #5867dd;
    border-radius: 50%;
    animation: typing 1s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
    background: #7c4dff;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
    background: #6a1b9a;
}

@keyframes typing {
    0%, 100% {
        transform: scale(0.5);
        opacity: 0.2;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Loading state */
.chat-form.loading .send-button {
    opacity: 0.7;
    cursor: not-allowed;
    background: linear-gradient(135deg, #3f4882 0%, #4a1269 100%);
}

/* Error state */
.chat-form.error .chat-input {
    border-color: rgba(221, 88, 88, 0.5);
    box-shadow: 0 0 20px rgba(221, 88, 88, 0.2);
}

.chat-form.error .input-help {
    color: #ffcdd2;
}

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

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(88, 103, 221, 0.3);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(88, 103, 221, 0.5);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chat-container {
        margin: 1rem auto;
        min-height: calc(100vh - 2rem);
    }

    .chat-header {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

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

    .message {
        max-width: 85%;
        padding: 1rem;
    }

    .send-text {
        display: none;
    }

    .send-button {
        padding: 1rem;
    }

    .input-help {
        display: none;
    }
}

/* Welcome message specific styling */
.welcome-message {
    background: linear-gradient(135deg, rgba(88, 103, 221, 0.15) 0%, rgba(106, 27, 154, 0.15) 100%);
    border: 1px solid rgba(88, 103, 221, 0.3);
    max-width: 90%;
}

.welcome-message ul {
    list-style-type: none;
    padding-left: 0;
}

.welcome-message li {
    position: relative;
    padding-left: 1.5rem;
    margin: 0.75rem 0;
}

.welcome-message li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #5867dd;
}

/* Floating chat styles */
.chat-container.floating {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 400px;
    height: 600px;
    margin: 0;
    padding: 0;
    min-height: unset;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-radius: 1rem;
    background: rgba(20, 20, 35, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(88, 103, 221, 0.2);
    animation: floatIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-container.floating.minimized {
    height: 60px;
    background: rgba(20, 20, 35, 0.8);
    border-radius: 30px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-container.floating .chat-header {
    margin: 0;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(88, 103, 221, 0.2) 0%, rgba(106, 27, 154, 0.2) 100%);
    border-radius: 1rem 1rem 0 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.chat-container.floating.minimized .chat-header {
    padding: 0.75rem 1rem;
    margin: 0;
    border-radius: 30px;
    border: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: transparent;
}

.chat-container.floating .chat-header h1 {
    font-size: 1.25rem;
    margin: 0;
}

.chat-container.floating .robot-icon {
    width: 32px;
    height: 32px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #5867dd 0%, #6a1b9a 100%);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(88, 103, 221, 0.3);
}

.chat-container.floating.minimized .chat-header .subtitle {
    display: none;
}

.minimize-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.minimize-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.minimize-button svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-container.minimized .minimize-button svg {
    transform: rotate(180deg);
}

.expand-chat-link {
    position: absolute;
    top: 1rem;
    right: 3.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.expand-chat-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.expand-chat-link svg {
    width: 16px;
    height: 16px;
}

/* Adjust chat interface for floating mode */
.chat-container.floating .chat-interface {
    height: calc(100% - 60px);
    border-radius: 0 0 1rem 1rem;
    background: transparent;
}

.chat-container.floating .chat-messages {
    height: calc(100% - 80px);
    padding: 1rem;
}

.chat-container.floating .chat-form {
    padding: 1rem;
    background: rgba(20, 20, 35, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 0 0 1rem 1rem;
}

/* Animation for messages in floating mode */
.chat-container.floating .message {
    max-width: 90%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chat-container.floating {
        width: calc(100% - 2rem);
        height: 500px;
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
    
    .chat-container.floating.minimized {
        width: 300px;
        left: auto;
    }
}

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

@keyframes pulseGlow {
    0% { box-shadow: 0 8px 32px rgba(88, 103, 221, 0.2); }
    50% { box-shadow: 0 8px 32px rgba(88, 103, 221, 0.4); }
    100% { box-shadow: 0 8px 32px rgba(88, 103, 221, 0.2); }
}

.chat-container.floating.minimized:hover {
    animation: pulseGlow 2s infinite;
}

.message .product-link {
    color: #5867dd;
    text-decoration: none;
    padding: 0.1em 0.3em;
    border-radius: 4px;
    background: rgba(88, 103, 221, 0.1);
    transition: all 0.2s ease;
}

.message .product-link:hover {
    background: rgba(88, 103, 221, 0.2);
    text-decoration: underline;
}

/* Adjust product link in system messages */
.message.system .product-link {
    color: #7986e7;
    background: rgba(88, 103, 221, 0.15);
}

.message.system .product-link:hover {
    background: rgba(88, 103, 221, 0.25);
}

.message .suggestion-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.suggestion-card {
    flex: 1 1 200px;
    max-width: calc(50% - 0.75rem);
    padding: 1rem;
    background: linear-gradient(135deg, rgba(88, 103, 221, 0.1) 0%, rgba(106, 27, 154, 0.1) 100%);
    border: 1px solid rgba(88, 103, 221, 0.2);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.suggestion-card:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(88, 103, 221, 0.15) 0%, rgba(106, 27, 154, 0.15) 100%);
    border-color: rgba(88, 103, 221, 0.3);
}

.suggestion-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #5867dd, #6a1b9a);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.suggestion-card:hover::before {
    opacity: 1;
}

.suggestion-card .icon {
    width: 32px;
    height: 32px;
    margin-bottom: 0.75rem;
    color: #5867dd;
}

.suggestion-card .title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff;
}

.suggestion-card .description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

/* Product recommendation cards */
.product-recommendation {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(88, 103, 221, 0.1);
    border-radius: 0.75rem;
    margin: 1rem 0;
    border: 1px solid rgba(88, 103, 221, 0.2);
    transition: all 0.2s ease;
}

.product-recommendation:hover {
    background: rgba(88, 103, 221, 0.15);
    border-color: rgba(88, 103, 221, 0.3);
}

.product-recommendation .product-image {
    width: 80px;
    height: 80px;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.product-recommendation .product-image img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 0.5rem;
}

.product-recommendation .product-info {
    flex: 1;
}

.product-recommendation .product-name {
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.25rem;
}

.product-recommendation .product-type {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.product-recommendation .product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.product-recommendation .feature-tag {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Quick action buttons */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.quick-action-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 2rem;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.quick-action-btn .icon {
    width: 16px;
    height: 16px;
}

/* Category icons */
.category-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #5867dd 0%, #6a1b9a 100%);
    border-radius: 50%;
    margin-right: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .suggestion-card {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .product-recommendation {
        flex-direction: column;
    }

    .product-recommendation .product-image {
        width: 100%;
        height: 120px;
    }
} 