/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
        'Microsoft YaHei', sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-color);
    line-height: 1.6;
}

/* 页面切换 */
.page {
    display: none;
    min-height: 100vh;
}

.page.active {
    display: block;
}

/* ===== 首页样式 ===== */

/* Header */
.minimal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    height: 60px;
}

.logo-small {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.user-info {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.login-btn-minimal, .logout-btn {
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.login-btn-minimal:hover, .logout-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
    padding: 2rem;
}

.brand-identity {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-logo {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* 搜索框 */
.search-box-container {
    width: 100%;
    max-width: 600px;
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 9999px;
    background: white;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.search-icon {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    color: var(--text-secondary);
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--text-primary);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* 快捷入口 */
/* 快捷操作区域 */
.quick-actions-section {
    text-align: center;
    margin-top: 3rem;
    width: 100%;
    max-width: 800px;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* 紧急咨询按钮 */
.btn-emergency {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.3);
    animation: pulse-emergency 2s infinite;
}

.btn-emergency:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.btn-emergency:active {
    transform: translateY(-2px);
}

.emergency-icon {
    font-size: 2rem;
    animation: shake 0.5s infinite;
    flex-shrink: 0;
}

/* 附近医院按钮 */
.btn-nearby-hospital {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

.btn-nearby-hospital:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.btn-nearby-hospital:active {
    transform: translateY(-2px);
}

.hospital-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.button-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.button-title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.2;
}

.button-subtitle {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 400;
    margin-top: 0.25rem;
}

.quick-actions-hint {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

@keyframes pulse-emergency {
    0%, 100% {
        box-shadow: 0 8px 16px rgba(239, 68, 68, 0.3);
    }
    50% {
        box-shadow: 0 8px 20px rgba(239, 68, 68, 0.5);
    }
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

/* 响应式布局 */
@media (max-width: 768px) {
    .quick-actions-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .btn-emergency,
    .btn-nearby-hospital {
        padding: 1.25rem 1.5rem;
    }
}

/* Footer */
.minimal-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.minimal-footer a {
    color: var(--text-secondary);
    text-decoration: none;
}

.minimal-footer a:hover {
    color: var(--primary-color);
}

/* ===== 按钮样式 ===== */
.btn-primary {
    padding: 0.75rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    padding: 0.75rem 2rem;
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--bg-secondary);
}

.btn-block {
    width: 100%;
}

.btn-text {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-text:hover {
    color: var(--primary-color);
}

.btn-icon {
    padding: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.btn-icon:hover {
    color: var(--primary-color);
}

/* ===== 登录/注册页面 ===== */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-secondary);
}

.auth-box {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

.auth-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.auth-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input, .form-group select {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ===== 咨询页面 ===== */
.consultation-container {
    display: flex;
    height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 300px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-section {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.pet-list, .history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.pet-card {
    padding: 0.75rem;
    background: white;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.pet-card:hover {
    background: var(--bg-color);
}

.pet-card.active {
    border-color: var(--primary-color);
    background: var(--bg-color);
}

.pet-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.pet-info {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* 聊天区域 */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

.chat-status {
    font-size: 0.875rem;
    color: var(--success-color);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    background: var(--bg-secondary);
}

.welcome-message {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
}

.ai-avatar {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
}

.message-content h3 {
    margin-bottom: 1rem;
}

.message-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.disclaimer {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--warning-color);
}

.message {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    max-width: 700px;
}

/* AI（我们的）回复在左边 */
.message.ai {
    /* 默认布局：avatar在左，bubble在右 */
}

/* 用户（客户）消息在右边 */
.message.user {
    flex-direction: row-reverse;
    margin-left: auto;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.message-bubble {
    padding: 1rem;
    border-radius: 1rem;
    max-width: 80%;
    white-space: pre-wrap;  /* 保留换行符，自然分段 */
    word-wrap: break-word;  /* 长单词换行 */
}

/* AI（我们的）回复：蓝色背景，左边 */
.message.ai .message-bubble {
    background: var(--primary-color);
    color: white;
}

/* 用户（客户）消息：白色背景，右边 */
.message.user .message-bubble {
    background: white;
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
}

.triage-card {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    border-left: 4px solid;
}

.triage-card.emergency {
    border-left-color: var(--danger-color);
}

.triage-card.urgent {
    border-left-color: var(--warning-color);
}

.triage-card.chronic {
    border-left-color: var(--primary-color);
}

.triage-card.general {
    border-left-color: var(--success-color);
}

.triage-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.triage-action {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* 追问问题卡片样式 */
.followup-questions-card {
    margin-top: 1rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
}

.followup-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.followup-questions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.followup-question-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.2s ease;
    border-left: 3px solid rgba(255, 255, 255, 0.3);
}

.followup-question-item:hover {
    background: rgba(255, 255, 255, 0.18);
    border-left-color: rgba(255, 255, 255, 0.5);
    transform: translateX(4px);
}

.question-number {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    min-width: 1.5rem;
    font-size: 0.9rem;
}

.question-text {
    flex: 1;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
}

.followup-hint {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    font-style: italic;
    border: 1px dashed rgba(255, 255, 255, 0.25);
}

.chat-input-container {
    padding: 1rem 2rem;
    border-top: 1px solid var(--border-color);
    background: white;
}

.chat-input-box {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    font-size: 1rem;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-send {
    padding: 0.75rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-send:hover {
    background: var(--primary-hover);
}

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-close:hover {
    color: var(--text-primary);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--text-primary);
    color: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(-1rem);
    transition: all 0.3s;
    z-index: 2000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: var(--success-color);
}

.toast.error {
    background: var(--danger-color);
}

.toast.warning {
    background: var(--warning-color);
}

/* ===== Loading ===== */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.loading.hidden {
    display: none;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== 工具类 ===== */
.hidden {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .sidebar {
        width: 250px;
    }

    .message-bubble {
        max-width: 90%;
    }
}

/* 医生信息弹窗 */
.doctor-info {
    padding: 1.5rem;
}

.doctor-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.doctor-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.doctor-title {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.doctor-contact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.contact-item:hover {
    background: var(--primary-color);
    color: white;
}

.contact-icon {
    font-size: 1.25rem;
}

.contact-text {
    flex: 1;
}

.contact-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.contact-value {
    font-weight: 500;
}

.nearby-hospitals {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.hospital-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.hospital-card {
    padding: 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s;
}

.hospital-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.hospital-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.hospital-address {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.hospital-distance {
    font-size: 0.75rem;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

/* 附近医院弹窗相关 */
.modal-large {
    max-width: 700px;
}

.hospital-info {
    padding: 1rem;
}

.hospital-map-container {
    width: 100%;
    height: 300px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.hospital-list-section {
    margin-top: 1.5rem;
}

.hospital-list-section h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.125rem;
}

.hospital-item {
    padding: 1.25rem;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 12px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hospital-item:hover {
    background: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.hospital-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.hospital-item-name {
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-primary);
    flex: 1;
}

.hospital-item-distance {
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: 600;
    background: rgba(79, 70, 229, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.hospital-item-address {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.hospital-item-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.875rem;
}

.hospital-item-phone {
    color: var(--text-secondary);
}

.hospital-item-rating {
    color: var(--warning-color);
    font-weight: 500;
}

.hospital-item-services {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.service-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    color: var(--text-secondary);
}

.emergency-tag {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger-color);
    color: var(--danger-color);
    font-weight: 500;
}

.loading-text {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}

.error-text {
    text-align: center;
    color: var(--danger-color);
    padding: 2rem;
}

/* Header Navigation Links */
.header-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
}

.nav-link:hover {
    background: #f5f5f5;
    color: #4CAF50;
}

.minimal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
}

/* ==================== 慢病管理引导卡片样式（优化版） ==================== */

.chronic-guidance {
    animation: slideInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chronic-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    max-width: 640px;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.chronic-guidance-header {
    background: rgba(255, 255, 255, 0.18);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
}

.guidance-icon {
    font-size: 28px;
    line-height: 1;
}

.guidance-title {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.chronic-detection-info {
    background: rgba(255, 255, 255, 0.12);
    padding: 20px 24px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.detection-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
}

.detection-item .label {
    opacity: 0.92;
    min-width: 90px;
    font-weight: 500;
}

.detection-item .value {
    font-weight: 600;
    font-size: 15px;
}

.detection-item .highlight {
    background: rgba(255, 255, 255, 0.3);
    padding: 6px 16px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chronic-guidance-content {
    padding: 24px;
}

.guidance-intro {
    font-size: 15.5px;
    line-height: 1.8;
    margin-bottom: 22px;
    background: rgba(255, 255, 255, 0.12);
    padding: 16px 18px;
    border-radius: 10px;
    border-left: 4px solid rgba(255, 255, 255, 0.6);
}

.guidance-intro strong {
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.guidance-benefits {
    background: rgba(255, 255, 255, 0.1);
    padding: 18px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
}

.benefit-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: 0.3px;
}

.benefit-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefit-list li {
    padding: 10px 0;
    font-size: 14.5px;
    line-height: 1.7;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.benefit-list li:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.guidance-cta {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.25);
}

.cta-text {
    font-size: 15.5px;
    margin-bottom: 18px;
    line-height: 1.7;
    font-weight: 500;
}

.btn-chronic-management {
    background: white;
    color: #667eea;
    border: none;
    padding: 16px 40px;
    border-radius: 28px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.btn-chronic-management:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
}

.btn-chronic-management:active {
    transform: translateY(-1px) scale(1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-chronic-management .btn-icon {
    font-size: 20px;
}

.cta-note {
    margin-top: 14px;
    font-size: 13px;
    opacity: 0.85;
    font-style: italic;
}

/* 移动端响应式优化 */
@media (max-width: 768px) {
    .chronic-bubble {
        max-width: 100%;
        border-radius: 12px;
    }

    .chronic-guidance-header {
        padding: 16px 18px;
    }

    .chronic-detection-info {
        padding: 16px 18px;
    }

    .chronic-guidance-content {
        padding: 18px;
    }

    .btn-chronic-management {
        padding: 14px 32px;
        font-size: 16px;
        width: 100%;
    }
}

/* ==================== 侧边栏快捷功能优化样式 ==================== */

.quick-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quick-link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    cursor: pointer;
}

.quick-link-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

.quick-link-item:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.25);
}

.quick-link-item .link-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.quick-link-item .link-text {
    font-size: 15px;
    font-weight: 500;
    flex-grow: 1;
}

/* 特殊样式 - 产品商城使用绿色渐变 */
.quick-link-item:first-child {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.quick-link-item:first-child:hover {
    background: linear-gradient(135deg, #0e8579 0%, #2dd164 100%);
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.35);
}

/* 特殊样式 - 我的订单使用橙色渐变 */
.quick-link-item:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.quick-link-item:nth-child(2):hover {
    background: linear-gradient(135deg, #e57fea 0%, #e2415a 100%);
    box-shadow: 0 4px 12px rgba(240, 147, 251, 0.35);
}

/* ==================== 慢病激活注册模态框样式 ==================== */

/* 激活内容区域 */
.chronic-activation-content {
    padding: 20px 0;
}

/* 价值展示区 */
.activation-benefits {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.activation-intro {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 15px;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    padding: 8px 0;
    font-size: 15px;
    display: flex;
    align-items: center;
}

.benefit-icon {
    font-size: 18px;
    margin-right: 10px;
    background: rgba(255, 255, 255, 0.2);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 表单区域 */
.chronic-activation-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.form-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 20px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.form-section-title:first-of-type {
    margin-top: 0;
}

/* 验证码输入组 */
.verification-group {
    margin-bottom: 15px;
}

.verification-input-wrapper {
    display: flex;
    gap: 10px;
}

.verification-input-wrapper input {
    flex: 1;
}

.btn-send-code {
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.btn-send-code:hover:not(:disabled) {
    background: linear-gradient(135deg, #5568d3 0%, #6b3f92 100%);
    transform: translateY(-1px);
}

.btn-send-code:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 表单行（两列布局） */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

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

/* 激活按钮特殊样式 */
.btn-activation {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-size: 16px;
    font-weight: 600;
}

.btn-activation:hover:not(:disabled) {
    background: linear-gradient(135deg, #5568d3 0%, #6b3f92 100%);
}

.btn-activation:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.loading-spinner-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

.loading-spinner-small.hidden {
    display: none;
}

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

/* 认证底部链接 */
.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.auth-footer p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-row .form-group {
        margin-bottom: 15px;
    }

    .verification-input-wrapper {
        flex-direction: column;
    }

    .btn-send-code {
        width: 100%;
    }

    .activation-benefits {
        padding: 15px;
    }

    .chronic-activation-form {
        padding: 15px;
    }
}
