:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-color: #111827;
    --surface: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --border: #374151;
    --user-msg: #6366f1;
    --bot-msg: #374151;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Background Slideshow */
.bg-slideshow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background-color: #000;
}

.bg-slideshow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17, 24, 39, 0.85);
    /* Dark overlay to ensure text readability */
    z-index: 1;
}

.bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: fadeAnim 12s infinite;
}

.bg-slide:nth-child(1) {
    background-image: url('images/construction_site_1_1772362091313.png');
    animation-delay: 0s;
}

.bg-slide:nth-child(2) {
    background-image: url('images/construction_site_2_1772362103000.png');
    animation-delay: 2s;
}

.bg-slide:nth-child(3) {
    background-image: url('images/construction_site_3_1772362114849.png');
    animation-delay: 4s;
}

.bg-slide:nth-child(4) {
    background-image: url('images/construction_site_4_1772508281849.png');
    animation-delay: 6s;
}

.bg-slide:nth-child(5) {
    background-image: url('images/construction_site_5_1772508295197.png');
    animation-delay: 8s;
}

.bg-slide:nth-child(6) {
    background-image: url('images/construction_site_6_1772508307201.png');
    animation-delay: 10s;
}

@keyframes fadeAnim {
    0% {
        opacity: 0;
        transform: scale(1.05);
    }

    8.33% {
        opacity: 1;
        transform: scale(1.04);
    }

    33.33% {
        opacity: 1;
        transform: scale(1.01);
    }

    41.66% {
        opacity: 0;
        transform: scale(0.98);
    }

    100% {
        opacity: 0;
    }
}

.site-header {
    text-align: center;
    margin-bottom: 24px;
    width: 100%;
    max-width: 600px;
}

.site-header h1 {
    font-size: 2rem;
    color: #818cf8;
    margin-bottom: 8px;
}

.site-header p {
    color: var(--text-secondary);
    line-height: 1.5;
}

.chat-container {
    position: fixed;
    top: 2%;
    left: 2%;
    width: 25vw;
    max-height: 80vh;
    background: var(--surface);
    border-radius: 24px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 100;
}

.chat-header {
    padding: 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.status {
    font-size: 12px;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 4px;
}

.status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
}

.icon-button {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.icon-button:hover {
    background-color: var(--bg-color);
    color: var(--text-primary);
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    animation: fadeIn 0.3s ease-out;
}

.message.bot {
    align-self: flex-start;
    background: var(--bot-msg);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.message.user {
    align-self: flex-end;
    background: var(--user-msg);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-input-area {
    padding: 12px 14px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    align-items: center;
}

input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

input[type="text"]:focus {
    border-color: var(--primary);
}

#send-btn {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.1s;
}

#send-btn:hover {
    background: var(--primary-hover);
}

#send-btn:active {
    transform: scale(0.95);
}

#send-btn svg {
    width: 20px;
    height: 20px;
    margin-left: -2px;
    margin-top: 2px;
}

.typing-indicator {
    padding: 12px 16px;
    background: var(--bot-msg);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    display: flex;
    gap: 4px;
    margin: 0 20px 16px;
    width: fit-content;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}