@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --input-bg: rgba(15, 23, 42, 0.6);
    --border: rgba(255, 255, 255, 0.1);
    --error: #ef4444;
    --success: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.1), transparent 25%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-main);
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.6s ease-out forwards;
}

.auth-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
}

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

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.input-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.input-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.btn {
    width: 100%;
    padding: 0.9rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #818cf8;
    text-decoration: underline;
}

.alert {
    padding: 0.8rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: none;
}

.alert.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    animation: fadeShake 0.4s ease-out forwards;
}

.alert.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

@keyframes fadeShake {
    0% { transform: translateX(0); opacity: 0; }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); opacity: 1; }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); opacity: 1; }
}

/* Chatbot Widget */
#chat-toggle {
    position: fixed; bottom: 24px; right: 24px;
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--primary); color: #fff;
    font-size: 24px; display: flex; align-items: center;
    justify-content: center; cursor: pointer;
    box-shadow: 0 4px 20px rgba(99,102,241,0.5); z-index: 9999;
}
#chat-window {
    display: none; flex-direction: column;
    position: fixed; bottom: 88px; right: 24px;
    width: 320px; height: 420px;
    background: #1e293b; border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    z-index: 9999; overflow: hidden;
}
#chat-header {
    background: var(--primary); color: #fff;
    padding: 12px 16px; display: flex;
    justify-content: space-between; align-items: center;
    font-weight: 600;
}
#chat-header button {
    background: none; border: none; color: #fff;
    font-size: 16px; cursor: pointer;
}
#chat-messages {
    flex: 1; overflow-y: auto; padding: 12px;
    display: flex; flex-direction: column; gap: 8px;
}
.chat-msg {
    max-width: 85%; padding: 8px 12px;
    border-radius: 10px; font-size: 13px; line-height: 1.5;
}
.chat-msg.user {
    background: var(--primary); color: #fff;
    align-self: flex-end; border-bottom-right-radius: 2px;
}
.chat-msg.bot {
    background: rgba(255,255,255,0.08); color: #e2e8f0;
    align-self: flex-start; border-bottom-left-radius: 2px;
}
#chat-input-area {
    display: flex; padding: 10px; gap: 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
}
#chat-input {
    flex: 1; background: rgba(15,23,42,0.6); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px; padding: 8px 12px; color: #f8fafc; font-size: 13px;
}
#chat-input-area button {
    background: var(--primary); color: #fff; border: none;
    border-radius: 8px; padding: 8px 14px; cursor: pointer; font-size: 13px;
}
