/* Full-page showcase layout */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8f9fa;
}

.showcase-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Left Panel - Avatar */
.showcase-avatar-panel {
    width: 40%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 20px;
    position: relative;
}

.avatar-wrapper {
    width: 100%;
    max-width: 700px;
    aspect-ratio: 3/4;
    background: url('/img/Hintergrund.jpg') center bottom / cover no-repeat;
    border-radius: 16px;
    overflow: hidden;
}

.avatar-wrapper canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.avatar-status {
    position: absolute;
    top: 20px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    color: white;
    font-weight: 500;
}

.avatar-status.speaking {
    animation: pulse 1s infinite;
}

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

/* Right Panel - Chat */
.showcase-chat-panel {
    width: 60%;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    padding: 20px 30px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chat-header h1 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 24px;
}

.chat-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.welcome-message {
    background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%);
    border-radius: 12px;
    padding: 20px;
    border-left: 4px solid #667eea;
}

.welcome-message p {
    margin: 0 0 10px 0;
    color: #333;
}

.welcome-message ul {
    margin: 0;
    padding-left: 20px;
    color: #666;
}

.welcome-message li {
    margin: 5px 0;
}

/* Chat Message Bubbles */
.chat-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.5;
}

.chat-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.assistant {
    align-self: flex-start;
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chat-message.thinking {
    align-self: flex-start;
    background: #f0f0f0;
    color: #666;
    font-style: italic;
}

.chat-message.thinking::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Product Cards in Chat */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    padding: 10px 0;
    width: 100%;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: #f0f0f0;
}

.product-card-content {
    padding: 12px;
}

.product-card h3 {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card p {
    margin: 0 0 10px 0;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: #667eea;
}

.product-link {
    padding: 6px 12px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: background 0.2s;
}

.product-link:hover {
    background: #764ba2;
}

.product-meta {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
    font-size: 11px;
    color: #999;
}

/* Chat Input */
.chat-input-container {
    display: flex;
    gap: 10px;
    padding: 20px;
    padding-bottom: 60px;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

#chatInput {
    flex: 1;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    outline: none;
    transition: border-color 0.2s;
}

#chatInput:focus {
    border-color: #667eea;
}

.voice-button, .send-button {
    padding: 15px 20px;
    font-size: 16px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s;
}

.voice-button {
    background: #f0f0f0;
    width: 54px;
}

.voice-button:hover {
    background: #e0e0e0;
}

.voice-button.recording {
    background: #ff4444;
    color: white;
    animation: recording-pulse 1s infinite;
}

@keyframes recording-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.send-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    min-width: 100px;
}

.send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.send-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Results Info */
.results-info {
    background: #e8eaf6;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 10px;
    color: #5c6bc0;
    font-weight: 500;
    font-size: 14px;
}

/* Footer */
.showcase-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid #e0e0e0;
    z-index: 100;
}

.showcase-footer a {
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.showcase-footer a:hover {
    color: #667eea;
}

/* Responsive */
@media (max-width: 1024px) {
    .showcase-container {
        flex-direction: column;
    }

    .showcase-avatar-panel,
    .showcase-chat-panel {
        width: 100%;
    }

    .showcase-avatar-panel {
        height: 35vh;
        min-height: 250px;
    }

    .showcase-chat-panel {
        height: 65vh;
    }

    .avatar-wrapper {
        max-width: 300px;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 600px) {
    .chat-input-container {
        flex-wrap: wrap;
    }

    #chatInput {
        width: 100%;
        flex: none;
        margin-bottom: 10px;
    }

    .voice-button, .send-button {
        flex: 1;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .chat-message {
        max-width: 90%;
    }
}
