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;
    /*background: linear-gradient( 135deg, #6f8fbf 0%, #7f9fca 50%, #8fb1d6 100% );*/
}

.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;
}
.main-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


.chat-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* vertical growth instead of horizontal scroll */
    white-space: pre-wrap;
    word-wrap: break-word;
}
/* Chat scrolls */
.chat-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}
.chat-message {
    max-width: 75%;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
    animation: fadeIn 0.25s ease-in;
    white-space: pre-wrap;
}
    .chat-message.user {
        align-self: flex-end;
        background: linear-gradient(135deg, #4f46e5, #6366f1);
        color: white;
        box-shadow: 0 6px 18px rgba(99,102,241,0.45);
    }
    .chat-message.ai {
        align-self: flex-start;
        background: rgba(255,255,255,0.9);
        color: #1f2937;
        box-shadow: 0 6px 18px rgba(0,0,0,0.12);
        white-space: pre-wrap;
    }
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#chat-history {
    border: 1px solid #ccc;
    padding: 10px;
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
}

.message {
    margin-bottom: 12px;
    white-space: pre-wrap; /* wrap text */
    word-wrap: break-word;
}

.user {
    text-align: right;
    color: #1a73e8;
}

.assistant {
    text-align: left;
    color: #222;
}

.input-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

input {
    flex: 1;
    padding: 8px;
}

/* Loader */
/*.spinner {
    border: 4px solid #eee;
    border-top: 4px solid #555;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 10px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
    */
.logo {
    max-width: 350px;
    height: auto;
    margin-bottom: 10px;
}
.header {
    text-align: center;
    margin-bottom: 15px;
}


.chat-input-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    max-width: 900px;
    margin: 20px auto;

    position: sticky;
    bottom: 0;
    padding: 18px;
  
    backdrop-filter: blur(12px);
    box-shadow: 0 -6px 20px;
}

    .chat-input-bar input {
        flex: 1;
        border: none;
        outline: none;
        padding: 14px 18px;
        border-radius: 16px;
        font-size: 16px;
        background: rgba(255,255,255,0.9);
        color: #1f2937;
        transition: box-shadow 0.2s ease;
    }

        .chat-input-bar input:focus {
            box-shadow: 0 0 0 3px rgba(99,102,241,0.4);
        }

        .chat-input-bar input::placeholder {
            color: #6b7280;
        }

    .chat-input-bar button {
        width: 52px;
        height: 52px;
        border-radius: 50%;
        border: none;
        cursor: pointer;
        font-size: 20px;
        font-weight: bold;
        color: white;
        background: linear-gradient(135deg, #4f46e5, #6366f1);
        box-shadow: 0 8px 20px rgba(99,102,241,0.5);
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }

        .chat-input-bar button:hover {
            transform: scale(1.05);
            box-shadow: 0 12px 28px rgba(99,102,241,0.65);
        }

        .chat-input-bar button:active {
            transform: scale(0.95);
        }
        .chat-input-bar button:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            box-shadow: none;
        }

.typing {
    display: inline-block;
    width: 32px;
    height: 8px;
}

    .typing span {
        display: inline-block;
        width: 6px;
        height: 6px;
        margin-top: 4px;
        margin-right: 4px;
        background: #6366f1;
        border-radius: 50%;
        animation: blink 1.4s infinite both;
    }

        .typing span:nth-child(2) {
            animation-delay: .2s;
        }

        .typing span:nth-child(3) {
            animation-delay: .4s;
        }

@keyframes blink {
    0% {
        opacity: .2;
    }

    20% {
        opacity: 1;
    }

    100% {
        opacity: .2;
    }
}



/* ---------------------------
           Input Bar
        --------------------------- */

.input-bar {
    position: sticky;
    bottom: 0;
    padding: 18px;
    background: rgba(15,23,42,0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 -6px 20px rgba(0,0,0,0.35);
}

.input-wrapper {
    max-width: 900px;
    width: 100%;
    display: flex;
    gap: 12px;
}

textarea {
    flex: 1;
    resize: none;
    height: 48px;
    padding: 14px 18px;
    border-radius: 18px;
    border: none;
    outline: none;
    font-size: 15px;
    color: white;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
}

    textarea::placeholder {
        color: rgba(255,255,255,0.7);
    }





