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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2c5f8d 0%, #4a7ba7 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: none;
}

header {
    background: linear-gradient(135deg, #2c5f8d 0%, #4a7ba7 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
    border: none;
    margin: 0;
}

.back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    font-size: 0.9em;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-3px);
}

.back-button svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 768px) {
    .back-button {
        top: 10px;
        left: 10px;
        padding: 6px 12px;
        font-size: 0.8em;
    }
    
    .back-button span {
        display: none;
    }
}

header h1 {
    font-size: 2em;
    margin-bottom: 10px;
}

.subtitle {
    opacity: 0.9;
    font-size: 1.1em;
}

.chat-container {
    height: 600px;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    border: none;
    margin: 0;
    padding: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    display: flex;
    max-width: 80%;
    animation: fadeIn 0.3s ease-in;
}

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

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

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

.message-content {
    padding: 12px 18px;
    border-radius: 18px;
    line-height: 1.5;
    word-wrap: break-word;
}

.user-message .message-content {
    background: linear-gradient(135deg, #2c5f8d 0%, #4a7ba7 100%);
    color: white;
    border-bottom-right-radius: 4px;
    border: none;
    margin: 0;
}

.bot-message .message-content {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin: 0;
}

.message-content p {
    margin: 0;
}

/* Markdown-Formatierung */
.message-content strong {
    font-weight: 600;
    color: inherit;
}

.message-content em {
    font-style: italic;
}

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

.message-content pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 8px 0;
}

.message-content pre code {
    background: none;
    padding: 0;
}

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

.message-content li {
    margin: 2px 0;
    line-height: 1.4;
}

.message-content h1,
.message-content h2,
.message-content h3 {
    margin: 12px 0 6px 0;
    font-weight: 600;
}

.message-content h1 {
    font-size: 1.3em;
}

.message-content h2 {
    font-size: 1.2em;
}

.message-content h3 {
    font-size: 1.1em;
}

.message-content a {
    color: #2c5f8d;
    text-decoration: underline;
    transition: color 0.3s;
    font-weight: 500;
}

.message-content a:hover {
    color: #4a7ba7;
    text-decoration: underline;
}

.message-content .phone-link {
    color: #2c5f8d;
    text-decoration: none;
    font-weight: 600;
    padding: 2px 6px;
    background: rgba(44, 95, 141, 0.1);
    border-radius: 4px;
    transition: all 0.3s;
}

.message-content .phone-link:hover {
    background: rgba(44, 95, 141, 0.2);
    color: #1a4a6b;
    text-decoration: none;
}

.message-content .email-link {
    color: #2c5f8d;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dotted #2c5f8d;
    transition: all 0.3s;
}

.message-content .email-link:hover {
    color: #4a7ba7;
    border-bottom-color: #4a7ba7;
}

.message-content .external-link {
    color: #2c5f8d;
    text-decoration: underline;
    font-weight: 500;
    transition: all 0.3s;
    word-break: break-all;
}

.message-content .external-link:hover {
    color: #4a7ba7;
    text-decoration: underline;
    background: rgba(44, 95, 141, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
}

/* Für Bot-Nachrichten: bessere Lesbarkeit */
.bot-message .message-content {
    line-height: 1.6;
}

.chat-input-container {
    display: flex;
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e0e0e0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    gap: 10px;
    margin: 0;
}

#messageInput {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

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

#sendButton {
    width: 50px;
    height: 50px;
    border: none;
    background: linear-gradient(135deg, #2c5f8d 0%, #4a7ba7 100%);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

#sendButton:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(44, 95, 141, 0.4);
}

#sendButton:active {
    transform: scale(0.95);
}

#sendButton:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.privacy-notice {
    padding: 15px 20px;
    background: #fff3cd;
    border-top: 1px solid #ffc107;
    border-left: none;
    border-right: none;
    border-bottom: none;
    font-size: 0.85em;
    line-height: 1.5;
    margin: 0;
}

.privacy-warning {
    margin: 0 0 10px 0;
    color: #856404;
    font-weight: 500;
}

.privacy-warning strong {
    color: #856404;
    font-weight: 600;
}

.privacy-info {
    margin: 0;
    color: #856404;
    font-size: 0.9em;
}

.privacy-info a {
    color: #2c5f8d;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.3s;
}

.privacy-info a:hover {
    color: #4a7ba7;
    text-decoration: underline;
}

.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 12px 18px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2c5f8d;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.contact-info {
    padding: 20px 30px;
    background: white;
    border-top: 2px solid #f0f0f0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    margin: 0;
}

.contact-info h3 {
    margin-bottom: 15px;
    color: #2c5f8d;
    font-size: 1.2em;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.contact-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2c5f8d;
    font-size: 0.9em;
}

.contact-item strong {
    display: block;
    color: #2c5f8d;
    margin-bottom: 6px;
    font-size: 1em;
}

.contact-item p {
    margin: 4px 0;
    color: #666;
    font-size: 0.9em;
}

.contact-item a {
    color: #2c5f8d;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.contact-item a:hover {
    color: #4a7ba7;
    text-decoration: underline;
}

.email {
    text-align: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
    font-size: 0.9em;
}

.email a {
    color: #2c5f8d;
    text-decoration: none;
    font-weight: 500;
}

.email a:hover {
    color: #4a7ba7;
    text-decoration: underline;
}

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

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #2c5f8d;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #4a7ba7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        border-radius: 0;
        margin: 0;
    }

    header {
        padding: 20px;
    }

    header h1 {
        font-size: 1.5em;
    }

    .chat-container {
        height: 500px;
    }
    
    .contact-info {
        padding: 15px 20px;
    }
    
    .contact-info h3 {
        font-size: 1.1em;
        margin-bottom: 12px;
    }
    
    .contact-item {
        padding: 10px;
        font-size: 0.85em;
    }

    .message {
        max-width: 90%;
    }

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

    .privacy-notice {
        padding: 12px 15px;
        font-size: 0.8em;
    }

    .privacy-warning {
        margin-bottom: 8px;
    }
}

