html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
.chat-container {
    max-width: 700px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    font-family: 'Segoe UI', sans-serif;
}

.chat-header {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
    padding: 15px;
    text-align: center;
}

    .chat-header h2 {
        margin: 0;
        font-size: 22px;
    }

    .chat-header .sub {
        font-size: 13px;
        opacity: 0.8;
    }

.chat-box {
    height: 400px;
    overflow-y: auto;
    padding: 15px;
    background: #f9fafb;
}

.msg {
    max-width: 70%;
    padding: 10px 15px;
    margin: 8px 0;
    border-radius: 20px;
    line-height: 1.4;
    font-size: 15px;
    word-wrap: break-word;
}

.user-msg {
    background: #2563eb;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.bot-msg {
    background: #e5e7eb;
    color: #111827;
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

.chat-input-area {
    display: flex;
    padding: 12px;
    border-top: 1px solid #ddd;
    background: #fff;
}

    .chat-input-area input {
        flex: 1;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 20px;
        outline: none;
        font-size: 14px;
    }

    .chat-input-area button {
        margin-left: 10px;
        padding: 10px 18px;
        border: none;
        background: #2563eb;
        color: white;
        border-radius: 20px;
        cursor: pointer;
        transition: 0.3s;
    }

        .chat-input-area button:hover {
            background: #1e40af;
        }

.upload-form {
    padding: 10px;
    text-align: center;
    border-top: 1px solid #ddd;
    background: #f3f4f6;
}

    .upload-form input {
        margin-right: 10px;
    }

    .upload-form button {
        background: #16a34a;
        color: white;
        border: none;
        padding: 8px 16px;
        border-radius: 8px;
        cursor: pointer;
    }

        .upload-form button:hover {
            background: #15803d;
        }

.typing-indicator {
    display: flex;
    align-items: center;
    margin: 10px;
}

    .typing-indicator span {
        height: 8px;
        width: 8px;
        margin: 0 2px;
        background-color: #9ca3af;
        border-radius: 50%;
        display: inline-block;
        animation: typing 1.4s infinite;
    }

        .typing-indicator span:nth-child(1) {
            animation-delay: 0s;
        }

        .typing-indicator span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .typing-indicator span:nth-child(3) {
            animation-delay: 0.4s;
        }

@keyframes typing {
    0% {
        transform: translateY(0);
        opacity: 0.5;
    }

    50% {
        transform: translateY(-4px);
        opacity: 1;
    }

    100% {
        transform: translateY(0);
        opacity: 0.5;
    }
}
/* Theme Toggle button */
.theme-toggle {
    position: absolute;
    top: 15px;
    right: 20px;
    background: #fbbf24;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 13px;
    transition: 0.3s;
}

    .theme-toggle:hover {
        background: #f59e0b;
        color: white;
    }

/* ===== Dark Mode ===== */
body.dark {
    background: #111827;
    color: #f9fafb;
}

    body.dark .chat-container {
        background: #1f2937;
        color: #f9fafb;
    }

    body.dark .chat-header {
        background: linear-gradient(135deg, #0f172a, #1e293b);
    }

    body.dark .chat-box {
        background: #111827;
    }

    body.dark .msg.user-msg {
        background: #3b82f6;
        color: white;
    }

    body.dark .msg.bot-msg {
        background: #374151;
        color: #f9fafb;
    }

    body.dark .chat-input-area {
        background: #1f2937;
        border-top: 1px solid #374151;
    }

        body.dark .chat-input-area input {
            background: #111827;
            color: white;
            border: 1px solid #374151;
        }

        body.dark .chat-input-area button {
            background: #3b82f6;
        }

            body.dark .chat-input-area button:hover {
                background: #2563eb;
            }

    body.dark .upload-form {
        background: #111827;
        border-top: 1px solid #374151;
    }

        body.dark .upload-form button {
            background: #22c55e;
        }

            body.dark .upload-form button:hover {
                background: #16a34a;
            }
