* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* Animated road lines background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 100px,
        rgba(255, 107, 53, 0.1) 100px,
        rgba(255, 107, 53, 0.1) 102px
    );
    pointer-events: none;
    z-index: 0;
}

.container {
    width: 100%;
    max-width: 900px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.card {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    text-align: center;
    border: 2px solid rgba(255, 107, 53, 0.3);
}

.logo {
    margin: 0 auto 20px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

h1 {
    color: #2C3E50;
    margin-bottom: 8px;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #FF6B35;
    margin-bottom: 30px;
    font-size: 16px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #2C3E50;
    font-weight: 600;
    font-size: 14px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
    background: white;
}

input:focus {
    outline: none;
    border-color: #FF6B35;
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C42 100%);
    color: white;
    width: 100%;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #FF5722 0%, #FF7635 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: #2C3E50;
    color: white;
}

.btn-secondary:hover {
    background: #34495e;
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 10px;
    display: none;
    padding: 12px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.error-message.show {
    display: block;
}

/* Chat Styles */
#chat-container {
    max-width: 1000px;
}

.chat-header {
    background: linear-gradient(145deg, #2C3E50 0%, #34495e 100%);
    border-radius: 20px 20px 0 0;
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 107, 53, 0.3);
    border-bottom: none;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-small {
    animation: float 3s ease-in-out infinite;
}

.chat-header h1 {
    margin: 0;
    font-size: 28px;
    color: white;
}

.tagline {
    color: #FF6B35;
    font-size: 14px;
    margin: 0;
}

.chat-header .btn-secondary {
    width: auto;
}

.chat-box {
    background: white;
    height: 550px;
    overflow-y: auto;
    padding: 30px;
    border-left: 2px solid rgba(255, 107, 53, 0.3);
    border-right: 2px solid rgba(255, 107, 53, 0.3);
}

.messages {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.welcome-message {
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f4f8 100%);
    padding: 30px;
    border-radius: 16px;
    border-left: 6px solid #FF6B35;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.welcome-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.welcome-message h2 {
    color: #2C3E50;
    margin-bottom: 15px;
    font-size: 24px;
}

.welcome-message p {
    color: #5a6c7d;
    line-height: 1.6;
    margin-bottom: 15px;
}

.welcome-message ul {
    list-style: none;
    margin: 20px 0;
}

.welcome-message li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: #2C3E50;
}

.welcome-message li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #FF6B35;
    font-weight: bold;
    font-size: 18px;
}

.start-prompt {
    font-weight: 600;
    color: #FF6B35;
    font-size: 16px;
    margin-top: 20px;
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 75%;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    align-self: flex-end;
}

.message.assistant {
    align-self: flex-start;
}

.message-label {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.message-content {
    padding: 16px 20px;
    border-radius: 16px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.message.user .message-content {
    background: linear-gradient(135deg, #FF6B35 0%, #FF8C42 100%);
    color: white;
    border-radius: 16px 16px 4px 16px;
}

.message.assistant .message-content {
    background: linear-gradient(145deg, #f8f9fa 0%, #e8f1f8 100%);
    color: #2C3E50;
    border-radius: 16px 16px 16px 4px;
    border-left: 4px solid #FF6B35;
}

.chat-input-form {
    background: linear-gradient(145deg, #2C3E50 0%, #34495e 100%);
    border-radius: 0 0 20px 20px;
    padding: 24px 30px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 107, 53, 0.3);
    border-top: none;
}

.input-group {
    display: flex;
    gap: 12px;
}

.input-group input {
    flex: 1;
    background: white;
}

.input-group .btn {
    width: auto;
    min-width: 56px;
    padding: 14px 20px;
}

.loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(145deg, #f8f9fa 0%, #e8f1f8 100%);
    border-radius: 16px 16px 16px 4px;
    color: #5a6c7d;
    border-left: 4px solid #FF6B35;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.loading-dots {
    display: flex;
    gap: 6px;
}

.loading-dots span {
    width: 10px;
    height: 10px;
    background: #FF6B35;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Scrollbar styling */
.chat-box::-webkit-scrollbar {
    width: 8px;
}

.chat-box::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-box::-webkit-scrollbar-thumb {
    background: #FF6B35;
    border-radius: 4px;
}

.chat-box::-webkit-scrollbar-thumb:hover {
    background: #FF5722;
}
