:root {
    --primary-color: #102439;         /* dunkles Navy-Blau */
    --secondary-color: #071e38;       /* sehr dunkles Blau */
    --accent-color: #d4af37;          /* elegantes Gold */
    --light-color: #f5f5f5;           /* fast weiss */
    --dark-color: #000000;            /* tiefes Schwarz */
    --success-color: #3c4241;         /* grauer Ton aus dem Logo */
    --danger-color: #8b0000;          /* dunkles Rot */
}

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

body {
    font-family: 'Playfair Display', serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    background: var(--primary-color);
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    border-radius: 10px;
    font-family: 'Playfair Display', serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

header h1 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.chat-container {
    flex: 1;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 60vh;
}

/* Custom scrollbar styles */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--light-color);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
    border: 2px solid var(--light-color);
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* For Firefox */
.chat-messages {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) var(--light-color);
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
    font-family: 'Playfair Display', serif;
}

.bot-message {
    background-color: var(--primary-color);
    color: var(--accent-color);
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    animation: fadeIn 0.3s ease-in-out;
}

.user-message {
    background-color: var(--accent-color);
    color: var(--dark-color);
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    animation: fadeIn 0.3s ease-in-out;
}

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

.user-input {
    padding: 15px;
    border-top: 1px solid #eee;
    background-color: white;
}

.input-container {
    display: flex;
    gap: 10px;
}

input[type="text"] {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--accent-color);
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
    background-color: var(--light-color);
}

input[type="text"]:focus {
    border-color: var(--accent-color);
}

button {
    background-color: var(--accent-color);
    color: var(--dark-color);
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

button:hover {
    background-color: var(--secondary-color);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#send-button {
    width: 45px;
    height: 45px;
    padding: 0;
}

.options-container {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.option-button {
    background-color: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    animation: pulseIn 0.3s ease-out;
}

.option-button:hover {
    background-color: var(--primary-color);
    color: var(--accent-color);
}

.controls {
    text-align: center;
    margin-top: auto;
    margin-bottom: 20px;
}

#reset-button {
    background-color: var(--accent-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#reset-button:hover {
    background-color: var(--secondary-color);
    color: var(--accent-color);
}

footer {
    text-align: center;
    padding: 15px;
    background-color: var(--dark-color);
    color: var(--accent-color);
    font-size: 0.8rem;
    margin-top: auto;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
}

/* Style for Markdown in messages */
.message strong,
.message b {
    font-weight: 600;
}

.message em,
.message i {
    font-style: italic;
}

.message code {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
}

.bot-message code {
    background-color: rgba(212, 175, 55, 0.2);
    color: var(--accent-color);
}

/* Loading animation */
.loading {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background-color: var(--light-color);
    border-radius: 15px;
    align-self: flex-start;
    margin: 5px 0;
}

.loading-dot {
    width: 8px;
    height: 8px;
    background-color: #888;
    border-radius: 50%;
    animation: loadingBounce 0.6s infinite alternate;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loadingBounce {
    from { transform: translateY(0); }
    to { transform: translateY(-5px); }
}

@keyframes pulseIn {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Responsive styles */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header {
        padding: 15px;
    }

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

@media (max-width: 600px) {
    .option-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    .options-container {
        flex-direction: column;
    }
}
