/* Classic Healthcare Chatbot Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c5aa0;
    --secondary-color: #4a90e2;
    --accent-color: #1e3a8a;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --background-light: #f8fafc;
    --background-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 10px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Container Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Auth Box Styles */
.auth-box {
    background: var(--background-white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-heavy);
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: block;
    box-shadow: var(--shadow-medium);
    transition: var(--transition);
}

.logo:hover {
    transform: scale(1.05);
}

h1 {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 600;
}

/* Button Styles */
.btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.google-login-btn {
    background: var(--background-white);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.google-login-btn:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.guest-login-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.guest-login-btn:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.or-separator {
    margin: 20px 0;
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
}

.or-separator::before,
.or-separator::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: var(--border-color);
}

.or-separator::before {
    left: 0;
}

.or-separator::after {
    right: 0;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
    background: var(--background-white);
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

/* Patient Form Styles */
.patient-form-container {
    background: var(--background-white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-heavy);
    width: 100%;
    max-width: 500px;
    position: relative;
    overflow: hidden;
}

.patient-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--success-color), var(--secondary-color));
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Chat Interface Styles */
.chat-container {
    display: flex;
    height: 100vh;
    background: var(--background-light);
}

.sidebar {
    width: 300px;
    background: var(--background-white);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.sidebar-header h2 {
    font-size: 18px;
    margin-bottom: 10px;
}

.sidebar-nav {
    padding: 20px 0;
    flex: 1;
}

.nav-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--background-light);
    border-left-color: var(--primary-color);
}

.nav-item.active {
    background: var(--background-light);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background: var(--background-white);
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: between;
    box-shadow: var(--shadow-light);
}

.chat-header h1 {
    color: var(--primary-color);
    font-size: 24px;
    margin: 0;
    flex: 1;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary-color);
    margin-right: 15px;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--background-light);
}

.chat-message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    animation: fadeInUp 0.3s ease;
}

.chat-message img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    box-shadow: var(--shadow-light);
}

.chat-message div {
    background: var(--background-white);
    padding: 15px 20px;
    border-radius: 18px;
    max-width: 70%;
    box-shadow: var(--shadow-light);
    position: relative;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-message.user img {
    margin-right: 0;
    margin-left: 15px;
}

.chat-message.user div {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.input-container {
    padding: 20px;
    background: var(--background-white);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
    align-items: center;
}

#user-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 16px;
    transition: var(--transition);
}

#user-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

#send-button {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

#send-button:hover {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* Chat History Styles */
.chat-history {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.chat-history h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 16px;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    margin-bottom: 8px;
    background: var(--background-light);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.history-item:hover {
    background: var(--border-color);
}

.history-title {
    flex: 1;
    font-size: 14px;
    color: var(--text-secondary);
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--error-color);
    padding: 5px;
    border-radius: 4px;
    transition: var(--transition);
}

.delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Profile Styles */
.profile-container {
    background: var(--background-white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-heavy);
    width: 100%;
    max-width: 600px;
    position: relative;
    overflow: hidden;
}

.profile-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.profile-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.info-item {
    padding: 20px;
    background: var(--background-light);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.info-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.info-value {
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 500;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .auth-box,
    .patient-form-container,
    .profile-container {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .chat-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        top: 0;
        left: -100%;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .chat-message div {
        max-width: 85%;
    }
    
    .input-container {
        flex-direction: column;
        gap: 10px;
    }
    
    #user-input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .auth-box,
    .patient-form-container,
    .profile-container {
        padding: 20px 15px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .btn {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .chat-header h1 {
        font-size: 20px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success/Error States */
.success {
    color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success-color);
}

.error {
    color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error-color);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.w-full {
    width: 100%;
}