<?php
/**
 * style.css - 全局样式文件
 */
?>
<style>
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1890ff;
    --primary-dark: #096dd9;
    --primary-light: #e6f7ff;
    --success: #52c41a;
    --warning: #faad14;
    --danger: #ff4d4f;
    --info: #13c2c2;
    --text: #333;
    --text-secondary: #666;
    --text-light: #999;
    --border: #e8e8e8;
    --bg: #f5f5f5;
    --white: #fff;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
    --radius: 8px;
    --radius-lg: 12px;
}

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

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 导航栏 */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.navbar-logo {
    height: 40px;
}

.navbar-menu {
    display: flex;
    gap: 30px;
    list-style: none;
}

.navbar-menu a {
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    transition: color 0.3s;
}

.navbar-menu a:hover {
    color: var(--primary);
}

/* 移动端菜单 */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .navbar-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 15px;
        gap: 15px;
        box-shadow: var(--shadow);
    }
    
    .navbar-menu.active {
        display: flex;
    }
    
    .navbar-toggle {
        display: block;
    }
}

/* 轮播图 */
.banner-slider {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.banner-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s;
}

.banner-slide.active {
    opacity: 1;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.banner-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 15px;
}

.banner-subtitle {
    font-size: 24px;
}

.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    border: none;
}

.banner-dot.active {
    background: var(--white);
}

@media (max-width: 768px) {
    .banner-slider {
        height: 250px;
    }
    
    .banner-title {
        font-size: 28px;
    }
    
    .banner-subtitle {
        font-size: 16px;
    }
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-lg {
    padding: 15px 40px;
    font-size: 18px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* 卡片 */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
}

.card-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--text);
}

/* 服务卡片 */
.services-section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 40px;
    color: var(--text);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.service-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.service-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.service-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.service-info {
    color: var(--text-secondary);
    font-size: 14px;
}

.service-price {
    color: var(--danger);
    font-size: 20px;
    font-weight: bold;
    margin-top: 10px;
}

@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* 医生卡片 */
.doctors-section {
    padding: 60px 0;
    background: var(--white);
}

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.doctor-card {
    text-align: center;
    padding: 30px;
    border-radius: var(--radius-lg);
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.doctor-card:hover {
    background: var(--primary-light);
}

.doctor-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.doctor-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--primary);
}

.doctor-name {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
}

.doctor-title {
    color: var(--primary);
    font-size: 14px;
    margin-bottom: 10px;
}

.doctor-specialty {
    color: var(--text-secondary);
    font-size: 14px;
}

@media (max-width: 768px) {
    .doctors-grid {
        grid-template-columns: 1fr;
    }
}

/* 步骤进度条 */
.booking-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.step {
    display: flex;
    align-items: center;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.step.active .step-number {
    background: var(--primary);
    color: var(--white);
}

.step.completed .step-number {
    background: var(--success);
    color: var(--white);
}

.step-label {
    margin-left: 10px;
    color: var(--text-light);
    font-size: 14px;
}

.step.active .step-label,
.step.completed .step-label {
    color: var(--text);
}

.step-line {
    width: 60px;
    height: 2px;
    background: var(--border);
    margin: 0 15px;
}

.step.completed + .step .step-line,
.step.completed .step-line {
    background: var(--success);
}

@media (max-width: 768px) {
    .booking-steps {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .step-line {
        display: none;
    }
}

/* 步骤容器 */
.booking-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 15px;
}

.step-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 30px;
}

/* 日历 */
.calendar {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--bg);
}

.calendar-title {
    font-size: 18px;
    font-weight: bold;
}

.calendar-nav {
    display: flex;
    gap: 10px;
}

.calendar-nav button {
    background: var(--white);
    border: 1px solid var(--border);
    padding: 5px 15px;
    border-radius: var(--radius);
    cursor: pointer;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border);
}

.calendar-weekday {
    background: var(--bg);
    padding: 10px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
}

.calendar-day {
    background: var(--white);
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 60px;
}

.calendar-day:hover:not(.disabled):not(.empty) {
    background: var(--primary-light);
}

.calendar-day.selected {
    background: var(--primary);
    color: var(--white);
}

.calendar-day.today {
    border: 2px solid var(--primary);
}

.calendar-day.disabled {
    color: var(--text-light);
    cursor: not-allowed;
    background: var(--bg);
}

.calendar-day.empty {
    background: var(--white);
    cursor: default;
}

/* 时间段 */
.time-slots {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.time-slot {
    padding: 12px;
    text-align: center;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    background: var(--white);
}

.time-slot:hover:not(.disabled) {
    border-color: var(--primary);
    background: var(--primary-light);
}

.time-slot.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--white);
}

.time-slot.disabled {
    color: var(--text-light);
    cursor: not-allowed;
    background: var(--bg);
}

@media (max-width: 576px) {
    .time-slots {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-label .required {
    color: var(--danger);
    margin-left: 3px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.form-control.error {
    border-color: var(--danger);
}

.form-error {
    color: var(--danger);
    font-size: 14px;
    margin-top: 5px;
}

/* 标签 */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-warning {
    background: #fffbe6;
    color: #faad14;
}

.badge-success {
    background: #f6ffed;
    color: #52c41a;
}

.badge-info {
    background: #e6f7ff;
    color: #1890ff;
}

.badge-secondary {
    background: #f5f5f5;
    color: #999;
}

.badge-danger {
    background: #fff2f0;
    color: #ff4d4f;
}

/* 预约成功 */
.success-page {
    text-align: center;
    padding: 60px 20px;
}

.success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: var(--white);
}

.success-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
}

.booking-no-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    margin: 30px 0;
}

.booking-no-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 10px;
}

.booking-no-value {
    font-size: 36px;
    font-weight: bold;
    letter-spacing: 3px;
}

/* 预约摘要 */
.booking-summary {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 20px;
    margin: 20px 0;
}

.booking-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

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

.booking-summary-label {
    color: var(--text-secondary);
}

.booking-summary-value {
    font-weight: 500;
}

/* 页面底部 */
.footer {
    background: var(--text);
    color: var(--white);
    padding: 40px 0;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-section h4 {
    margin-bottom: 20px;
}

.footer-section p {
    color: rgba(255,255,255,0.7);
    line-height: 2;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

/* 管理后台 */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 220px;
    background: var(--text);
    color: var(--white);
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar h2 {
    padding: 0 20px 20px;
    font-size: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.admin-menu {
    list-style: none;
}

.admin-menu a {
    display: block;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s;
}

.admin-menu a:hover,
.admin-menu a.active {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

.admin-menu a i {
    margin-right: 10px;
}

.admin-main {
    flex: 1;
    margin-left: 220px;
    padding: 20px;
    background: var(--bg);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.admin-header h1 {
    font-size: 24px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    color: var(--text-secondary);
    margin-top: 5px;
}

/* 表格 */
.table-wrapper {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: var(--bg);
    font-weight: 600;
}

.table tr:hover {
    background: var(--primary-light);
}

.table-actions {
    display: flex;
    gap: 8px;
}

/* 状态筛选 */
.status-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.status-filter {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s;
}

.status-filter:hover,
.status-filter.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

/* 图片上传 */
.upload-preview {
    max-width: 200px;
    margin-top: 10px;
}

.upload-preview img {
    width: 100%;
    border-radius: var(--radius);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

/* 工具提示 */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background: var(--text);
    color: var(--white);
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 响应式 */
@media (max-width: 992px) {
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-sidebar {
        width: 180px;
    }
    
    .admin-main {
        margin-left: 180px;
    }
}

@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .table {
        font-size: 14px;
    }
    
    .table th,
    .table td {
        padding: 10px 8px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 14px;
    }
}
</style>
