/* Body layout */
body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
}

/* Header */
.site-header {
    width: 100%;
    height: 200px;
    background-image: url('robotics_bg.png');
    background-size: contain; /* fits entire image inside header */
    background-position: center;
    display: flex;
    align-items: center;
}

.header-overlay {
    background-color: rgba(0, 0, 0, 0.5);
    width: 100%;
    text-align: center;
    padding: 20px;
    color: #fff;
    font-family: 'Roboto Slab', serif;
}

.header-overlay h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    font-weight: 700;
}

.header-overlay p {
    font-size: 1.1em;
    color: #eee;
}

/* Chat intro message */
.chat-intro {
    font-size: 1.8em;          /* larger font */
    font-weight: 700;           /* bold */
    color: #ffcc00;             /* golden highlight */
    margin: 40px 20px 30px 20px;   /* space from header and chat container */
    text-align: left;           /* aligned with chat container */
    opacity: 0;                 /* fade-in initial state */
    transition: opacity 1.2s ease-in-out;
}

.chat-intro.visible {
    opacity: 1;
}

/* Chat container */
.chat-container {
    width: calc(100% - 40px); /* full width minus margins */
    max-height: 60vh;         /* scroll if too many messages */
    overflow-y: auto;
    margin: 0 20px 20px 20px; /* spacing from edges */
    background-color: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Chat bubbles */
.chat-message {
    background-color: #f1f1f1;
    padding: 10px 15px;
    border-radius: 12px;
    margin-bottom: 10px;
    word-wrap: break-word;
}

.chat-message.ai {
    background-color: #e0f7fa;
}

/* Chat images (fixed size ~30% of chat box) */
.chat-container img,
.image-container img,
.responsive-image {
    width: 30%;       /* fixed 30% of chat container width */
    height: auto;     /* maintain aspect ratio */
    border-radius: 8px;
    border: 1px solid #ccc;
    display: block;
    margin: 10px 0;   /* spacing between messages */
}

/* Chat input */
.chat-input-container {
    width: calc(100% - 40px); /* match chat container width */
    display: flex;
    margin: 0 20px 20px 20px; /* spacing around */
}

.chat-input-container input {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.chat-input-container button {
    padding: 12px 20px;
    margin-left: 5px;
    font-size: 16px;
    border-radius: 8px;
    border: none;
    background-color: #00bcd4;
    color: white;
    cursor: pointer;
}

.chat-input-container button:hover {
    background-color: #0097a7;
}

/* OpenAI badge */
.openai-badge {
    margin: 0 20px 20px 20px; /* align with chat width */
    font-size: 0.85em;
    color: #ffcc00;
    font-weight: 600;
    font-family: 'Roboto Slab', serif;
    opacity: 0.8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chat-intro {
        font-size: 1.5em;
        margin: 30px 20px 20px 20px;
    }

    .header-overlay h1 {
        font-size: 2em;
    }

    .chat-container, .chat-input-container {
        width: 90%;
        margin: 0 5% 20px 5%;
    }

    /* Ensure images scale nicely on mobile */
    .chat-container img,
    .image-container img,
    .responsive-image {
        width: 50%; /* slightly larger on mobile */
    }
}
