.message {
    animation: message-in 0.4s cubic-bezier(.4,1.4,.6,1);
}

@keyframes message-in {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.typing-indicator {
    opacity: 0.7;
    font-style: italic;
    background: #ffe066;
    color: #c90000;
    animation: typing-blink 1s infinite alternate, typing-bounce 0.7s infinite cubic-bezier(.4,1.4,.6,1);
}

@keyframes typing-blink {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

@keyframes typing-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.typing-indicator {
    opacity: 0.7;
    font-style: italic;
    background: #ffe066;
    color: #c90000;
    animation: typing-blink 1s infinite alternate;
}

@keyframes typing-blink {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}
/* Dismiss button for sample questions */
.sample-dismiss {
    position: absolute;
    top: 10px;
    right: 16px;
    background: none;
    border: none;
    color: #c90000;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
    transition: color 0.2s;
    z-index: 2;
}
.sample-dismiss:hover {
    color: #fff200;
    background: #c90000;
    border-radius: 50%;
}
/* Sample Questions Ferrari Style */

.sample-questions {
    width: 700px;
    max-width: 98vw;
    margin: 2em auto 0 auto;
    padding: 18px 24px 10px 24px;
    background: #fffbe6;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(200,0,0,0.04);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    position: relative;
}

body {
    background: #f6f6f9;
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
}


/* Modern ScuderiaGPT Title */
.scuderia-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    font-size: 2.6em;
    font-weight: 800;
    color: #c90000;
    margin: 40px 0 24px 0;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px #fffbe6;
}
.scuderia-emoji {
    font-size: 1.3em;
    margin-right: 2px;
    filter: drop-shadow(0 0 2px #ffe066);
    margin-top: -10px;
}
.scuderia-logo {
    height: 1.2em;
    width: auto;
    margin-right: 8px;
    filter: drop-shadow(0 0 2px #ffe066);
}
.scuderia-text {
    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    font-weight: 1000;
    letter-spacing: -4px;
}

.sample-questions {
    width: 700px;
    max-width: 98vw;
    margin: 2em auto 0 auto;
    padding: 18px 24px 10px 24px;
    background: #fffbe6;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(200,0,0,0.04);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    position: relative;
}
.sample-title {
    color: #c90000;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 8px;
}
.sample-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.sample-link {
    display: inline-block;
    color: #fff;
    background: #c90000;
    text-decoration: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 1em;
    font-weight: 500;
    margin-right: 8px;
    margin-bottom: 8px;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 1px 4px rgba(200,0,0,0.06);
}
.sample-link:hover {
    background: #ffe066;
    color: #c90000;
}
.sample-dismiss {
    position: absolute;
    top: 10px;
    right: 16px;
    background: none;
    border: none;
    color: #c90000;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
    transition: color 0.2s, background 0.2s;
    z-index: 2;
}
.sample-dismiss:hover {
    color: #fffbe6;
    background: #c90000;
    border-radius: 50%;
}
#ferrari-theme {
    background: none;
}
.chat-box {
    width: 700px;
    max-width: 98vw;
    min-height: 30%;
    max-height: 60vh;
    margin: 0 auto 2em auto;
    padding: 32px 24px 32px 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: none;
    border-radius: 0;
    box-shadow: none;
    /* transition: 300 0.5s cubic-bezier(.4,1.4,.6,1), padding 0.5s cubic-bezier(.4,1.4,.6,1); */
}
.chat-box.empty {
    min-height: 200px;
    padding-bottom: 120px;
}
.message {
    max-width: 80%;
    padding: 10px 16px;
    border-radius: 16px;
    font-size: 1em;
    line-height: 1.4;
    word-break: break-word;
}
.message.user {
    align-self: flex-end;
    background: #e3e6f3;
    color: #444654;
    font-weight: 500;
}
.message.bot {
    align-self: flex-start;
    background: #ffd6d6;
    color: #c90000;
    font-weight: 500;
}
.chat-input-area {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 700px;
    max-width: 98vw;
    margin: 0 auto 2em auto;
    background: none;
    border: none;
    padding: 0;
    gap: 12px;
    transition: transform 0.5s cubic-bezier(.4,1.4,.6,1);
}
.chat-input-area.empty {
    transform: translateY(-80px);
}
#user-input {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    outline: none;
    background: #f6f6f9;
    color: #444654;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
#send-button {
    padding: 0 32px;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: #ffe066;
    color: #c90000;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 2px 8px rgba(200,0,0,0.04);
}
#send-button:hover {
    background: #fffbe6;
    color: #c90000;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 0 16px;
        overflow-x: hidden;
        position: relative;
        padding-top: 70px;
    }
    
    .scuderia-title {
        font-size: 1.3em;
        margin: 0;
        padding: 12px 16px;
        gap: 8px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: #f6f6f9;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        z-index: 200;
    }

    .scuderia-text {
        font-size: 1.8em;
        letter-spacing: -2px;
    }
    
    .scuderia-logo {
        height: 1em;
        width: auto;
        margin-right: 6px;
    }
    
    .sample-questions {
        width: 100%;
        max-width: 100%;
        margin: 1em 0 0 0;
        padding: 16px;
        border-radius: 12px;
        font-size: 0.95em;
    }
    
    .sample-title {
        font-size: 1em;
        margin-bottom: 6px;
    }
    
    .sample-link {
        font-size: 0.9em;
        padding: 8px 12px;
        margin-right: 6px;
        margin-bottom: 6px;
    }
    
    .chat-box {
        width: 100%;
        max-width: 100%;
        min-height: 300px;
        max-height: calc(100vh - 140px);
        margin: 0;
        padding: 16px;
        gap: 12px;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        position: relative;
        margin-bottom: 80px;
    }
    
    .chat-box.empty {
        min-height: 200px;
        padding-bottom: 20px;
    }
    
    .message {
        max-width: 85%;
        padding: 8px 12px;
        border-radius: 14px;
        font-size: 0.95em;
        line-height: 1.3;
    }
    
    .chat-input-area {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 12px 16px 16px 16px;
        gap: 8px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #f6f6f9;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 100;
        transform: none !important;
        box-sizing: border-box;
        height: 72px;
    }
    
    .chat-input-area.empty {
        transform: none !important;
    }
    
    #user-input {
        padding: 12px;
        font-size: 1em;
        border-radius: 10px;
    }
    
    #send-button {
        padding: 0 20px;
        height: 44px;
        font-size: 1em;
        border-radius: 10px;
    }
}