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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    position: relative;
    overflow-x: hidden;
}

body::after {
    content: '';
    position: fixed;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-image: url('/assets/img/backgroundimg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
    will-change: transform;
    transform: translate3d(0, calc(var(--scroll, 0px) * -0.3), 0);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(128, 90, 213, 0.75);
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Symptom Input Styles */
.symptom-input-container {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    background: white;
    min-height: 120px;
    transition: border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.symptom-input-container:focus-within {
    border-color: #805ad5;
    box-shadow: 0 0 0 3px rgba(128, 90, 213, 0.1);
}

.symptom-input-container.insufficient-symptoms {
    border-color: #dc3545;
}

.symptom-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    min-height: 32px;
}

.symptom-tag {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #805ad5, #9f7aea);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(128, 90, 213, 0.2);
    transition: all 0.2s ease;
    animation: tagSlideIn 0.3s ease;
}

.symptom-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(128, 90, 213, 0.3);
}

@keyframes tagSlideIn {
    from {
        opacity: 0;
        transform: translateX(-10px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.symptom-text {
    margin-right: 8px;
}

.remove-symptom {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: white;
    font-size: 12px;
}

.remove-symptom:hover {
    background: rgba(255, 255, 255, 0.3);
}

.symptom-input-wrapper {
    position: relative;
    margin-top: auto;
}

#symptomInput {
    width: 100%;
    border: none;
    outline: none;
    padding: 8px 12px;
    font-size: 16px;
    border-radius: 6px;
    background: #f8f9fa;
    transition: background-color 0.2s ease;
}

#symptomInput:focus {
    background: white;
    box-shadow: 0 0 0 2px rgba(128, 90, 213, 0.1);
}

.symptom-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: #f8f9fa;
    color: #805ad5;
}

.suggestion-item:active {
    background: #e9ecef;
}

/* Required field indicators */
.required-asterisk {
    color: #dc3545;
    font-weight: bold;
    margin-left: 4px;
    font-size: 1.1em;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group label i {
    color: #805ad5;
    width: 16px;
}

.required-note {
    color: #dc3545;
    font-weight: 500;
    font-size: 0.9em;
}

.optional-note {
    color: #6c757d;
    font-weight: 400;
    font-size: 0.9em;
}

/* Form validation states */
.form-group input:invalid,
.form-group select:invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-group input:valid,
.form-group select:valid {
    border-color: #28a745;
}

.form-group input:focus:invalid,
.form-group select:focus:invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-group input:focus:valid,
.form-group select:focus:valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Validation messages */
.validation-message {
    display: block;
    margin-top: 5px;
    font-size: 0.875em;
    color: #dc3545;
}

.validation-message.success {
    color: #28a745;
}

.validation-message i {
    margin-right: 5px;
}

/* Form group error state */
.form-group.has-error label {
    color: #dc3545;
}

.form-group.has-error .required-asterisk {
    animation: pulse 1s infinite;
}

.form-group.field-required {
    position: relative;
}

.validation-summary {
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    background: #f8d7da;
    margin-bottom: 20px;
    padding: 15px;
    animation: slideDown 0.3s ease;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsive styles for symptom tags */
@media (max-width: 768px) {
    .symptom-input-container {
        min-height: 100px;
        padding: 8px;
    }
    
    .symptom-tag {
        font-size: 13px;
        padding: 5px 10px;
        margin: 2px;
    }
    
    .remove-symptom {
        width: 18px;
        height: 18px;
        font-size: 10px;
    }
    
    #symptomInput {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 10px 12px;
    }
    
    .symptom-suggestions {
        max-height: 150px;
    }
    
    .suggestion-item {
        padding: 10px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .symptom-tags {
        gap: 6px;
    }
    
    .symptom-tag {
        font-size: 12px;
        padding: 4px 8px;
    }
    
    .symptom-input-container {
        min-height: 80px;
        padding: 6px;
    }
}

/* Responsive Container Styles */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .form-container,
    .results-container,
    .loading,
    .user-summary-card,
    .analysis-card {
        padding: 20px;
    }
    
    .doctor-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    .form-container,
    .results-container,
    .loading,
    .user-summary-card,
    .analysis-card {
        padding: 15px;
        margin: 0 5px;
    }
    
    .doctor-card {
        padding: 15px;
        margin: 0 5px 15px 5px;
    }
}

.header {
    background: white;
    color: #333;
    padding: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 20px;
    margin-bottom: 2rem;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: space-between;
}

.logo-container {
    flex-shrink: 0;
}

.logo-link {
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

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

.logo-circle {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    border-radius: 50%;
}

.title-container {
    flex: 1;
}

.main-title {
    font-family: 'Inter', 'Arial Black', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #333;
    text-shadow: none;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.subtitle {
    font-size: 1.8rem;
    font-weight: 400;
    margin: 0;
    color: #666;
    opacity: 0.9;
}

/* Responsive title scaling */
@media (max-width: 768px) {
    .main-title {
        font-size: 0.7rem;
        white-space: nowrap;
        letter-spacing: 0.01em;
    }
    
    .subtitle {
        font-size: 1.3rem;
    }
    
    .header {
        padding: 3rem 0;
    }
    
    .header-content {
        flex-direction: row;
        text-align: left;
        gap: 1rem;
        align-items: center;
        padding: 0 0.2rem;
    }
    
    .header-button-container {
        display: none;
    }
    
    .title-container {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .logo-circle {
        width: 100px;
        height: 100px;
    }
    
    .logo {
        width: 98px;
        height: 98px;
    }
    
    .back-to-website-btn {
        display: none;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 0.6rem;
        white-space: nowrap;
        letter-spacing: 0.01em;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .header {
        padding: 2.5rem 0;
    }
    
    .header-content {
        gap: 0.8rem;
        padding: 0 0.1rem;
    }
    
    .header-button-container {
        display: none;
    }
    
    .logo-circle {
        width: 80px;
        height: 80px;
    }
    
    .logo {
        width: 78px;
        height: 78px;
    }
    
    .back-to-website-btn {
        display: none;
    }
}

.header-button-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Language Toggle Styles */
.language-toggle {
    position: relative;
    display: inline-block;
}

.language-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.language-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: background-color 0.2s ease;
    border-radius: 8px;
    margin: 0.25rem;
}

.language-option:hover {
    background-color: #f8f9ff;
}

.language-option.active {
    background-color: #667eea;
    color: white;
}

.language-option .flag {
    font-size: 1.2rem;
}

.language-option span:last-child {
    font-weight: 500;
}

.back-to-website-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #f7fafc;
    color: #333;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
}

.back-to-website-btn:hover {
    background: #edf2f7;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.back-to-website-btn i {
    font-size: 1rem;
}

/* Footer Styles */
.footer {
    background: linear-gradient(135deg, #6B46C1 0%, #8B5CF6 50%, #A78BFA 100%);
    color: white;
    padding: 3rem 0 1rem 0;
    margin-top: 4rem;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    color: #7BB3F0;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: #A8D0F7;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.footer-logo {
    display: inline-block;
    font-weight: 700;
    font-size: 1.1rem;
    color: #7BB3F0 !important;
    text-decoration: none !important;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 2rem;
    padding-top: 1rem;
    text-align: center;
}

.legal-links {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.legal-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.legal-links a:hover {
    color: #A8D0F7;
}

.legal-links .separator {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    margin: 0;
}

/* Remove duplicate header styles - now using .main-title and .subtitle */

.header p {
    font-size: 1.2rem;
    color: #666;
    font-weight: 300;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

/* Tablet and Mobile Styles */
@media (max-width: 1024px) {
    .main-content {
        gap: 20px;
    }
    
    .form-container,
    .results-container,
    .loading,
    .user-summary-card,
    .analysis-card {
        margin: 0 10px;
    }
}

@media (max-width: 768px) {
    .main-content {
        gap: 15px;
    }
    
    .form-container h2 {
        font-size: 1.5rem;
    }
    
    .results-container h2 {
        font-size: 1.5rem;
    }
    
    .doctor-card {
        margin: 0 10px 15px 10px;
    }
    
    .analysis-card {
        margin: 0 10px 20px 10px;
    }
    
    .user-summary-card {
        margin: 0 10px 20px 10px;
    }
}

@media (max-width: 480px) {
    .main-content {
        gap: 10px;
    }
    
    .form-container h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .results-container h2 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .doctor-card {
        margin: 0 5px 10px 5px;
    }
    
    .analysis-card {
        margin: 0 5px 15px 5px;
    }
    
    .user-summary-card {
        margin: 0 5px 15px 5px;
    }
}

.form-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-container h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-container h2 i {
    color: #667eea;
}
.form-group label i {
    color: #667eea;
    width: 20px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Form Responsiveness */
@media (max-width: 768px) {
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .submit-btn {
        padding: 15px;
        font-size: 1.1rem;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px;
        font-size: 16px;
    }
    
    .submit-btn {
        padding: 12px;
        font-size: 1rem;
    }
    
    .checkbox-item {
        padding: 6px 10px;
        font-size: 0.9rem;
    }
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.loading {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.results-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.results-container h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-container h2 i {
    color: #667eea;
}

.doctor-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin: 15px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.emergency-alert {
    background: linear-gradient(135deg, #ff4757, #ff3838);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: emergencyPulse 2s infinite;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
}

.emergency-alert i {
    font-size: 16px;
    animation: emergencyShake 0.5s infinite;
}

@keyframes emergencyPulse {
    0%, 100% { 
        box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
    }
    50% { 
        box-shadow: 0 4px 16px rgba(255, 71, 87, 0.5);
    }
}

@keyframes emergencyShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

.doctor-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #3498db;
}

.doctor-card:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.doctor-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.doctor-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-right: 15px;
}

.doctor-info h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 5px;
}

.doctor-specialty {
    color: #667eea;
    font-weight: 600;
    font-size: 1rem;
}

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

/* Doctor Card Mobile Responsiveness */
@media (max-width: 768px) {
    .doctor-details {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .doctor-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .doctor-avatar {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .match-score {
        position: static;
        display: inline-block;
        margin-bottom: 10px;
    }
    
    .doctor-info h3 {
        font-size: 1.2rem;
    }
    
    .doctor-specialty {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .doctor-details {
        margin-top: 15px;
    }
    
    .detail-item {
        gap: 8px;
    }
    
    .doctor-info h3 {
        font-size: 1.1rem;
    }
}

/* Card Actions */
.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.more-info-btn, .contact-btn {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.more-info-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.more-info-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.contact-btn {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: none;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 25px;
}

.doctor-detail-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.doctor-detail-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.doctor-detail-section h3 {
    color: #333;
    font-size: 18px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.doctor-detail-section h3 i {
    color: #667eea;
    width: 20px;
}

.doctor-detail-section p {
    color: #666;
    line-height: 1.6;
    margin: 5px 0;
}

.doctor-detail-section a {
    color: #667eea;
    text-decoration: none;
}

.doctor-detail-section a:hover {
    text-decoration: underline;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.contact-btn-modal {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.contact-btn-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* Prevent zoom on input focus for mobile */
@media screen and (max-width: 768px) {
    input[type="text"],
    input[type="number"],
    input[type="email"],
    textarea,
    select {
        font-size: 16px !important;
        transform: scale(1);
    }
}

/* Mobile responsiveness for modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    /* Ensure buttons are large enough for touch */
    .modal-actions button,
    .contact-btn-modal,
    .btn-primary,
    .btn-secondary,
    .btn-warning,
    .btn-emergency {
        min-height: 48px;
        min-width: 120px;
        padding: 12px 20px;
        font-size: 16px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
    
    /* Fix close button touch target */
    .close {
        font-size: 28px;
        padding: 8px;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
    }
    
    .card-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .more-info-btn, .contact-btn {
        padding: 12px 15px;
        font-size: 15px;
    }
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.detail-item i {
    color: #667eea;
    margin-top: 3px;
    width: 16px;
}

.detail-item strong {
    color: #333;
    margin-right: 5px;
}

.match-score {
    position: absolute;
    top: -10px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}


.ai-analysis {
    background: #f8f9ff;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    border-left: 4px solid #667eea;
}

.ai-analysis h4 {
    color: #667eea;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-analysis p {
    color: #666;
    line-height: 1.6;
}

.user-summary-card {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    color: white;
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.3);
    transition: all 0.3s ease;
}

.user-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(79, 172, 254, 0.4);
}

.summary-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.location-cascade {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.location-cascade select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    background-color: white;
    transition: all 0.3s ease;
}

.location-cascade select:focus {
    border-color: #805ad5;
    outline: none;
    box-shadow: 0 0 0 3px rgba(128, 90, 213, 0.1);
}

.location-cascade select:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.show-more-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.show-more-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.show-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.show-more-btn:active {
    transform: translateY(0);
}

.summary-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.5rem;
}

.summary-title h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.summary-content {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.summary-text {
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 400;
}

.analysis-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    color: white;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: visible;
}

.analysis-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.analysis-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    backdrop-filter: blur(10px);
}

.analysis-icon i {
    font-size: 2rem;
    color: white;
}

.analysis-title h3 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.recommended-specialty {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    display: inline-block;
    backdrop-filter: blur(10px);
}

.analysis-content {
    position: relative;
    z-index: 1;
    margin-bottom: 25px;
}

.analysis-text {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    line-height: 1.8;
    font-size: 1.1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.analysis-disclaimer {
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

.analysis-disclaimer i {
    color: #ffc107;
    margin-top: 2px;
    flex-shrink: 0;
}

.analysis-disclaimer strong {
    color: #ffc107;
}

.required-note {
    color: #e74c3c;
    font-size: 0.9rem;
    font-weight: 500;
}

.optional-note {
    color: #95a5a6;
    font-size: 0.9rem;
    font-weight: 400;
}

.input-hint {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 5px;
    font-style: italic;
}

.chronic-conditions-container {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    margin-top: 8px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: white;
    border: 1px solid #dee2e6;
    position: relative;
}

.checkbox-item:hover {
    background: #e3f2fd;
    border-color: #2196f3;
    transform: translateY(-1px);
}

.checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-item:hover .checkmark {
    border-color: #2196f3;
}

.checkbox-item input:checked ~ .checkmark {
    background-color: #2196f3;
    border-color: #2196f3;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-item input:checked ~ .checkmark:after {
    display: block;
}

.other-condition-input {
    margin-top: 10px;
}

.other-condition-input input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.other-condition-input input:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

/* 更多資料按鈕和表單樣式 */
.more-info-toggle {
    margin-top: 15px;
    text-align: center;
}

.more-info-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.more-info-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.more-info-button:active {
    transform: translateY(0);
}

.more-info-button i {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.more-info-button.expanded i {
    transform: rotate(45deg);
}

.more-info-section {
    margin-top: 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 25px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
    to {
        opacity: 1;
        max-height: 1000px;
        padding-top: 25px;
        padding-bottom: 25px;
    }
}

.more-info-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.more-info-header h4 {
    color: #495057;
    margin: 0 0 10px 0;
    font-size: 1.3rem;
}

.more-info-header p {
    color: #6c757d;
    margin: 0;
    font-size: 0.95rem;
}

.detailed-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.detailed-info-grid .form-group.full-width {
    grid-column: span 2;
}

.detailed-info-grid .form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    display: block;
}

.detailed-info-grid .form-group input,
.detailed-info-grid .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.detailed-info-grid .form-group input:focus,
.detailed-info-grid .form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.detailed-info-grid .form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.checkbox-group-detailed {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}

.checkbox-item-detailed {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: white;
    border: 2px solid #dee2e6;
    position: relative;
}

.checkbox-item-detailed:hover {
    background: #e3f2fd;
    border-color: #2196f3;
    transform: translateY(-1px);
}

.checkbox-item-detailed input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark-detailed {
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-item-detailed:hover .checkmark-detailed {
    border-color: #2196f3;
}

.checkbox-item-detailed input:checked ~ .checkmark-detailed {
    background-color: #667eea;
    border-color: #667eea;
}

.checkmark-detailed:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-item-detailed input:checked ~ .checkmark-detailed:after {
    display: block;
}

@media (max-width: 768px) {
    .detailed-info-grid {
        grid-template-columns: 1fr;
    }
    
    .detailed-info-grid .form-group.full-width {
        grid-column: span 1;
    }
    
    .checkbox-group-detailed {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }
}

/* 隱藏醫生卡片中的聯絡詳情 */
.doctor-details .detail-item .fa-phone,
.doctor-details .detail-item .fa-envelope,
.doctor-details .detail-item .fa-map-marker-alt {
    display: none;
}

/* 隱藏包含這些圖標的整個detail-item */
.doctor-details .detail-item:nth-child(2),  /* 電話 */
.doctor-details .detail-item:nth-child(3),  /* 電郵 */
.doctor-details .detail-item:nth-child(4) { /* 地址 */
    display: none;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 30px 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .form-container,
    .results-container {
        padding: 25px;
    }
    
    .doctor-details {
        grid-template-columns: 1fr;
    }
}

.title-container {
    flex: 1;
}

.title-text {
    flex: 1;
}

.subtitle-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Desktop: Hide mobile language toggle, show subtitle normally */
@media (min-width: 769px) {
    .mobile-language-toggle {
        display: none;
    }
    
    .subtitle-container {
        display: block;
    }
}

.mobile-language-toggle {
    display: none;
}

/* Mobile/Tablet Header Styles */
@media (max-width: 768px) {
    .header-button-container {
        display: none !important;
    }
    
    .mobile-language-toggle {
        display: block;
    }
    
    .title-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .subtitle-container {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 15px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .subtitle-container {
        gap: 10px;
    }
    
    .mobile-language-toggle .language-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Footer Responsiveness */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .legal-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .footer-content {
        padding: 0 1rem;
    }
    
    .footer-section h3 {
        font-size: 1rem;
    }
    
    .footer-logo {
        font-size: 1rem;
    }
}

/* Bug Report Modal Styles */
.bug-report-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bug-report-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.bug-report-btn i {
    font-size: 18px;
}

/* File Input Styles */
.file-input {
    width: 100%;
    padding: 12px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.file-input:hover {
    border-color: #007bff;
    background: #e7f3ff;
}

.file-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.file-input-hint {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

/* Image Preview Styles */
.image-preview {
    position: relative;
    display: inline-block;
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    display: block;
}

.remove-image-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
}

.remove-image-btn:hover {
    background: #dc3545;
    transform: scale(1.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin: 5% auto;
    padding: 0;
    border: none;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(128, 90, 213, 0.2);
}

.modal-header h3 {
    margin: 0;
    color: #805ad5;
    font-size: 1.4em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #ff6b6b;
}

.modal-body {
    padding: 25px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

.btn-primary, .btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #805ad5, #553c9a);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #553c9a, #44337a);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(128, 90, 213, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #e9ecef;
    color: #333;
}

/* Mobile responsiveness for bug report */
@media (max-width: 768px) {
    .bug-report-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
        bottom: 15px;
        right: 15px;
    }
    
    .close {
        top: 15px;
        right: 15px;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 12px;
        padding: 20px;
    }
    
    /* Ensure all modal buttons are touch-friendly */
    .modal-actions button {
        min-height: 48px;
        padding: 14px 20px;
        font-size: 16px;
        border-radius: 8px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        width: 100%;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Severe Warning Modal Styles */
.severe-warning {
    border: 3px solid #ff4757;
    box-shadow: 0 10px 30px rgba(255, 71, 87, 0.3);
}

.severe-header {
    background: linear-gradient(135deg, #ff4757 0%, #ff3838 100%);
    color: white;
    border-bottom: none;
}

.severe-header h3 {
    color: white;
    font-size: 1.6em;
    font-weight: bold;
}

.warning-content {
    text-align: center;
}

.warning-message {
    font-size: 1.2em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.6;
}

.recommendations-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.recommendations-list li {
    background: rgba(255, 71, 87, 0.1);
    border-left: 4px solid #ff4757;
    padding: 12px 15px;
    margin: 10px 0;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: 500;
    color: #2c3e50;
}

.severe-items {
    background: rgba(255, 193, 7, 0.1);
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    text-align: left;
}

.severe-items h4 {
    color: #e67e22;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.severe-list {
    margin: 10px 0;
}

.severe-list h5 {
    color: #c0392b;
    margin-bottom: 5px;
    font-size: 1em;
}

.severe-list ul {
    list-style: none;
    padding-left: 0;
}

.severe-list li {
    background: rgba(231, 76, 60, 0.1);
    border-left: 3px solid #e74c3c;
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 3px;
    font-size: 0.95em;
    color: #2c3e50;
}

.disclaimer {
    background: rgba(52, 73, 94, 0.1);
    border: 1px solid #34495e;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

.disclaimer p {
    color: #34495e;
    font-size: 0.95em;
    line-height: 1.5;
    margin: 0;
    font-style: italic;
}

.severe-actions {
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.btn-emergency {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-emergency:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

/* Mobile responsiveness for severe warning modal */
@media (max-width: 768px) {
    .severe-warning {
        width: 95% !important;
        margin: 5% auto !important;
        max-height: 90vh !important;
    }
    
    .severe-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-emergency, .btn-warning, .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .recommendations-list li {
        font-size: 1em;
        padding: 10px 12px;
    }
    
    .warning-message {
        font-size: 1.1em;
    }
}

/* AI Disclaimer Modal Styles */
.disclaimer-modal {
    z-index: 3000; /* Higher than other modals */
}

.disclaimer-content {
    max-width: 600px;
    width: 95%;
    max-height: 90vh;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border: 2px solid #805ad5;
    box-shadow: 0 20px 60px rgba(128, 90, 213, 0.3);
}

.disclaimer-header {
    background: linear-gradient(135deg, #805ad5 0%, #667eea 100%);
    color: white !important;
    padding: 25px 120px 25px 25px; /* Increase right padding to 120px */
    text-align: center;
    border-radius: 15px 15px 0 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px; /* Ensure minimum height */
}

.disclaimer-header h3 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: white !important;
    flex: 1;
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden; /* Hide overflow if needed */
    text-overflow: ellipsis; /* Add ellipsis if text is too long */
}

.disclaimer-header h3 span {
    color: white !important;
}

.disclaimer-header i {
    font-size: 1.3em;
    animation: pulse 2s infinite;
}

/* Modal Language Selector */
.disclaimer-language-selector {
    position: absolute;
    top: 50%;
    right: 30px; /* Position within the padding area */
    transform: translateY(-50%);
    z-index: 10; /* Ensure it appears above other content */
}

.modal-language-toggle {
    position: relative;
}

.modal-language-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white !important;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.modal-language-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.modal-language-btn i {
    animation: none;
    font-size: 1em;
}

.modal-language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    min-width: 160px;
    z-index: 1000;
    display: none;
    overflow: hidden;
    border: 1px solid rgba(128, 90, 213, 0.2);
    margin-top: 8px;
}

.modal-language-dropdown.show {
    display: block;
    animation: modalDropdownSlideIn 0.3s ease-out;
}

@keyframes modalDropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-language-dropdown .language-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    font-size: 0.9em;
}

.modal-language-dropdown .language-option:hover {
    background-color: rgba(128, 90, 213, 0.1);
}

.modal-language-dropdown .language-option.active {
    background-color: rgba(128, 90, 213, 0.2);
    color: #805ad5;
    font-weight: 600;
}

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

.disclaimer-body {
    padding: 0;
}

.disclaimer-content-wrapper {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.disclaimer-section {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    border-left: 4px solid #805ad5;
    transition: all 0.3s ease;
}

.disclaimer-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(128, 90, 213, 0.15);
}

.disclaimer-section.emergency-notice {
    border-left-color: #e53e3e;
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
}

.disclaimer-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #805ad5 0%, #9f7aea 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2em;
    box-shadow: 0 4px 15px rgba(128, 90, 213, 0.3);
}

.emergency-icon {
    background: linear-gradient(135deg, #e53e3e 0%, #fc8181 100%);
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
    animation: emergencyPulse 2s infinite;
}

@keyframes emergencyPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(229, 62, 62, 0.5);
    }
}

.disclaimer-text {
    flex: 1;
}

.disclaimer-text h4 {
    margin: 0 0 10px 0;
    color: #2d3748;
    font-size: 1.1em;
    font-weight: 600;
}

.disclaimer-text p {
    margin: 0;
    color: #4a5568;
    line-height: 1.6;
    font-size: 0.95em;
}

.disclaimer-text strong {
    color: #e53e3e;
    font-weight: 700;
}

.disclaimer-footer {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
    border-radius: 12px;
    text-align: center;
    border: 2px dashed #805ad5;
}

.disclaimer-footer p {
    margin: 0;
    color: #2d3748;
    font-weight: 600;
    font-size: 1em;
}

.disclaimer-actions {
    padding: 25px 30px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 0 0 15px 15px;
    justify-content: center;
    border-top: 1px solid rgba(128, 90, 213, 0.2);
}

.disclaimer-accept {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.disclaimer-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
}

.disclaimer-accept:active {
    transform: translateY(0);
}

/* Mobile responsiveness for disclaimer modal - IMPROVED LAYOUT FOR BUTTON VISIBILITY */
@media (max-width: 768px) {
    .disclaimer-modal {
        display: flex !important; /* Override base modal display */
        align-items: center; /* Center vertically */
        justify-content: center; /* Center horizontally */
        padding: 20px; /* Increase padding for better centering */
        min-height: 100vh; /* Ensure full viewport coverage */
        transform: translateY(-5%); /* Nudge modal upward */
    }
    
    .disclaimer-content {
        width: 92%; /* Increased from 85% */
        margin: 0;
        max-height: calc(100vh - 60px); /* Adjust for new padding */
        border-radius: 12px;
        display: flex;
        flex-direction: column;
    }
    
    .disclaimer-header {
        padding: 15px 60px 15px 15px; /* Adjust padding for mobile - more right padding for language selector */
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        flex-shrink: 0;
        min-height: 60px; /* Minimum height for mobile */
        text-align: left; /* Left align on mobile */
    }
    
    .disclaimer-header h3 {
        justify-content: flex-start; /* Left align title on mobile */
        text-align: left;
        white-space: nowrap; /* Prevent text wrapping on mobile too */
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 1.2em; /* Smaller font size for mobile */
    }
    
    .disclaimer-body {
        padding: 0;
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    
    .disclaimer-content-wrapper {
        padding: 15px 12px; /* Reduced padding */
        flex: 1;
        overflow-y: auto;
        min-height: 0;
        max-height: 350px; /* Increased from 250px for better readability */
    }
    
    .disclaimer-actions {
        padding: 20px 15px;
        background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
        border-radius: 0 0 12px 12px;
        border-top: 1px solid rgba(128, 90, 213, 0.2);
        justify-content: center;
        flex-shrink: 0; /* Prevent shrinking */
        min-height: 80px; /* Ensure minimum space for button */
    }
    
    .disclaimer-accept {
        min-height: 50px;
        padding: 14px 24px;
        font-size: 16px;
        width: 100%;
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        border-radius: 8px;
        justify-content: center;
    }
    
    .modal-language-btn {
        font-size: 0.85em;
        padding: 8px 12px;
        min-height: 36px;
        touch-action: manipulation;
    }
    
    .disclaimer-language-selector {
        position: absolute;
        top: 15px; /* Position at top instead of center for mobile */
        right: 20px; /* Move slightly away from edge */
        transform: none; /* Remove vertical centering */
    }
    
    /* Adjust language selector for very small screens */
    @media (max-width: 480px) {
        .disclaimer-language-selector {
            top: 10px;
            right: 10px;
        }
        
        .modal-language-btn {
            font-size: 0.75em;
            padding: 6px 8px;
            min-height: 30px;
        }
        
        .disclaimer-header {
            padding: 15px 50px 15px 15px; /* Adjust padding for smaller selector */
        }
        
        .disclaimer-header h3 {
            font-size: 1.1em; /* Even smaller font for very small screens */
        }
    }
    
    .disclaimer-section {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .disclaimer-icon {
        align-self: center;
        width: 45px;
        height: 45px;
        font-size: 1.1em;
    }
    
    .disclaimer-text h4 {
        font-size: 1em;
        margin-bottom: 8px;
    }
    
    .disclaimer-text p {
        font-size: 0.9em;
    }
    
    .disclaimer-footer {
        padding: 15px;
        margin-top: 15px;
    }
    
    .disclaimer-footer p {
        font-size: 0.9em;
    }
}

/* Medical Evidence Section */
.medical-evidence-container {
    margin-top: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    overflow: hidden;
    transition: all 0.3s ease;
}

.medical-evidence-container.expanded {
    border-color: #805ad5;
    box-shadow: 0 4px 15px rgba(128, 90, 213, 0.1);
}

.evidence-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    user-select: none;
}

.evidence-header:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.evidence-header-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.evidence-header h4 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
}

.evidence-toggle-icon {
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.evidence-toggle-icon.expanded {
    transform: rotate(180deg);
}

.evidence-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: transparent;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.evidence-content.expanded {
    max-height: 600px;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #805ad5 #f1f5f9;
}

/* Custom scrollbar for webkit browsers */
.evidence-content.expanded::-webkit-scrollbar {
    width: 8px;
}

.evidence-content.expanded::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.evidence-content.expanded::-webkit-scrollbar-thumb {
    background: #805ad5;
    border-radius: 4px;
}

.evidence-content.expanded::-webkit-scrollbar-thumb:hover {
    background: #6b46c1;
}

.evidence-introduction {
    color: #4a5568;
    font-size: 0.95em;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
    border-radius: 8px;
    border-left: 4px solid #805ad5;
}

.journal-entry {
    margin-bottom: 20px;
    padding: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.journal-entry:hover {
    border-color: #805ad5;
    box-shadow: 0 4px 12px rgba(128, 90, 213, 0.1);
    transform: translateY(-2px);
}

.journal-entry:last-child {
    margin-bottom: 0;
}

.journal-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 1em;
}

.journal-source {
    color: #805ad5;
    font-size: 0.85em;
    font-weight: 500;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.journal-source i {
    font-size: 0.9em;
}

.journal-excerpt {
    color: #4a5568;
    line-height: 1.6;
    font-size: 0.9em;
    font-style: italic;
    padding: 12px;
    background: rgba(128, 90, 213, 0.05);
    border-radius: 6px;
    border-left: 3px solid #805ad5;
    margin-bottom: 10px;
}

.clinical-relevance {
    color: #2d3748;
    font-size: 0.9em;
    line-height: 1.5;
}

.clinical-relevance strong {
    color: #805ad5;
}

/* Loading state for medical evidence */
.evidence-loading {
    text-align: center;
    padding: 30px 20px;
    color: #666;
}

.evidence-loading i {
    font-size: 1.5em;
    margin-right: 10px;
    color: #805ad5;
}

/* PubMed links */
.pubmed-link {
    margin-left: 10px;
    color: #805ad5;
    text-decoration: none;
    font-size: 0.8em;
    font-weight: 500;
    transition: color 0.3s ease;
}

.pubmed-link:hover {
    color: #6b46c1;
    text-decoration: underline;
}

.pubmed-link i {
    margin-right: 4px;
    font-size: 0.9em;
}

/* Evidence disclaimer */
.evidence-disclaimer {
    margin-top: 20px;
    padding: 12px;
    background: rgba(128, 90, 213, 0.05);
    border-radius: 6px;
    border-left: 3px solid #805ad5;
    color: #666;
    font-size: 0.85em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    max-width: 100%;
    box-sizing: border-box;
}

.evidence-disclaimer i {
    margin-right: 6px;
    color: #805ad5;
}

/* PubMed entry styling */
.journal-entry.pubmed {
    border-left: 4px solid #28a745;
}

.journal-entry.pubmed .journal-source {
    color: #28a745;
}

/* Evidence Tabs */
.evidence-tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 20px;
    background: #f8fafc;
}

.evidence-tab {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    color: #64748b;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-bottom: 3px solid transparent;
}

.evidence-tab:hover {
    background: #e2e8f0;
    color: #475569;
}

.evidence-tab.active {
    background: white;
    color: #805ad5;
    border-bottom-color: #805ad5;
    font-weight: 600;
}

.evidence-tab i {
    font-size: 1em;
}

/* Tab Content */
.evidence-tab-content {
    display: none;
}

.evidence-tab-content.active {
    display: block;
}

/* CHP Specific Styles */
.chp-entry {
    margin-bottom: 20px;
    padding: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    border-radius: 10px;
    border: 1px solid #bae6fd;
    border-left: 4px solid #0ea5e9;
    transition: all 0.3s ease;
}

.chp-entry:hover {
    border-color: #0ea5e9;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.1);
    transform: translateY(-2px);
}

.chp-title {
    font-weight: 600;
    color: #0c4a6e;
    margin-bottom: 12px;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chp-title i {
    color: #0ea5e9;
    font-size: 1.2em;
}

.chp-content {
    color: #374151;
    line-height: 1.6;
    font-size: 0.95em;
    margin-bottom: 12px;
    padding: 12px;
    background: rgba(14, 165, 233, 0.05);
    border-radius: 6px;
}

.chp-advice {
    color: #1e40af;
    font-size: 0.9em;
    line-height: 1.5;
    margin-bottom: 12px;
    padding: 10px;
    background: rgba(30, 64, 175, 0.05);
    border-radius: 6px;
    border-left: 3px solid #3b82f6;
}

.chp-advice strong {
    color: #1e40af;
    font-weight: 600;
}

.chp-source {
    text-align: right;
}

.chp-link {
    color: #0ea5e9;
    text-decoration: none;
    font-size: 0.85em;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.chp-link:hover {
    color: #0284c7;
    text-decoration: underline;
}

.chp-link i {
    font-size: 0.9em;
}

/* CHP Loading State */
.chp-loading {
    text-align: center;
    padding: 30px 20px;
    color: #64748b;
}

.chp-loading i {
    font-size: 1.5em;
    margin-right: 10px;
    color: #0ea5e9;
}

/* CHP Error State */
.chp-error {
    text-align: center;
    padding: 20px;
    color: #dc2626;
    background: rgba(220, 38, 38, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.chp-error i {
    font-size: 1.2em;
    margin-right: 8px;
}

/* Mobile responsiveness for medical evidence */
@media (max-width: 768px) {
    .evidence-header {
        padding: 12px 15px;
    }
    
    .evidence-header h4 {
        font-size: 1em;
    }
    
    .evidence-content.expanded {
        padding: 15px;
        max-height: 600px;
    }
    
    .journal-entry, .chp-entry {
        padding: 15px;
    }
    
    .journal-excerpt, .chp-content {
        padding: 10px;
        font-size: 0.85em;
    }
    
    .evidence-introduction {
        padding: 12px;
        font-size: 0.9em;
    }
    
    .evidence-tabs {
        flex-direction: column;
    }
    
    .evidence-tab {
        padding: 10px 12px;
        font-size: 0.85em;
    }
    
    .chp-title {
        font-size: 1em;
    }
    
    .chp-advice {
        padding: 8px;
        font-size: 0.85em;
    }
}

/* ==================== Time Slot Selection Modal ==================== */

.time-slot-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.time-slot-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.time-slot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.time-slot-header h3 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 600;
}

.time-slot-header .close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.time-slot-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.time-slot-body {
    padding: 25px;
}

.doctor-info-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
}

.doctor-info-section h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.doctor-info-section p {
    margin: 0;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-message {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 20px;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95em;
}

.info-message i {
    font-size: 1.2em;
}

.date-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.date-section label {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05em;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 25px;
}

.time-slot-btn {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 1em;
    font-weight: 500;
    color: #333;
}

.time-slot-btn i {
    font-size: 1.2em;
    color: #667eea;
}

.time-slot-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.time-slot-btn:hover i {
    color: white;
}

.slot-available {
    font-size: 0.75em;
    color: #28a745;
    font-weight: 400;
}

.time-slot-btn:hover .slot-available {
    color: rgba(255, 255, 255, 0.9);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.modal-actions .btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modal-actions .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .time-slot-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .time-slot-header {
        padding: 15px 20px;
    }
    
    .time-slot-header h3 {
        font-size: 1.2em;
    }
    
    .time-slot-body {
        padding: 20px;
    }
    
    .time-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .time-slot-btn {
        padding: 12px 10px;
        font-size: 0.95em;
    }
    
    .doctor-info-section {
        padding: 15px;
    }
    
    .doctor-info-section h4 {
        font-size: 1.1em;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn-secondary {
        width: 100%;
        padding: 14px;
    }
}

@media (max-width: 480px) {
    .time-slots-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .time-slot-btn {
        padding: 10px 8px;
        font-size: 0.9em;
    }
}
