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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 750px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    padding-bottom: 20px;
}

/* 顶部导航栏 */
.top-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 101;
}

.back-btn-header {
    color: #ff6b35;
    text-decoration: none;
    font-size: 16px;
    margin-right: 15px;
    padding: 5px;
    transition: opacity 0.3s;
}

.back-btn-header:active {
    opacity: 0.7;
}

.page-title {
    font-size: 18px;
    color: #333;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

/* 标签切换 */
.tabs {
    display: flex;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 56px;
    z-index: 100;
}

.tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}

.tab.active {
    color: #ff6b35;
    border-bottom-color: #ff6b35;
    font-weight: 500;
}

.tab-content {
    display: none;
    padding: 15px;
}

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

/* 咨询师列表 */
.counselor-list {
    padding: 10px 0;
}

.counselor-card {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.counselor-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.counselor-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 2px solid #ff6b35;
}

.counselor-info {
    flex: 1;
}

.counselor-name {
    font-size: 18px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
}

.counselor-expertise {
    font-size: 14px;
    color: #999;
}

.btn-book {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.3);
}

.btn-book:active {
    transform: scale(0.95);
    box-shadow: 0 1px 3px rgba(255, 107, 53, 0.3);
}

/* 详情页 */
.detail-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.back-btn {
    color: #ff6b35;
    text-decoration: none;
    font-size: 16px;
    margin-right: 15px;
    padding: 5px;
}

.detail-header h2 {
    font-size: 18px;
    color: #333;
}

.counselor-detail {
    padding: 30px 20px;
    text-align: center;
    background: #fff;
}

.detail-avatar {
    margin-bottom: 20px;
}

.detail-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #ff6b35;
    object-fit: cover;
}

.detail-name {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.detail-expertise {
    font-size: 16px;
    color: #ff6b35;
    margin-bottom: 30px;
}

.detail-intro {
    text-align: left;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.detail-intro h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
}

.detail-intro p {
    font-size: 15px;
    color: #666;
    line-height: 1.8;
}

.detail-footer {
    padding: 20px;
    background: #fff;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 750px;
    border-top: 1px solid #e0e0e0;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.3);
}

.btn-large {
    padding: 18px;
    font-size: 18px;
}

/* 预约表单 */
.booking-form {
    padding: 20px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 16px;
    color: #333;
    margin-bottom: 12px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    background: #fff;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.time-slot {
    padding: 15px;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 15px;
}

.time-slot:active {
    transform: scale(0.95);
}

.time-slot.selected {
    border-color: #ff6b35;
    background: #fff5f2;
    color: #ff6b35;
    font-weight: 500;
}

.booking-info {
    background: #fff5f2;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.booking-info h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
}

.booking-info p {
    font-size: 15px;
    color: #666;
    margin-bottom: 10px;
}

.booking-info strong {
    color: #333;
}

/* 预约列表 */
.booking-list {
    padding: 10px 0;
}

.booking-item {
    background: #fff;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

.booking-item-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 15px;
    border: 2px solid #ff6b35;
}

.booking-item-info h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 5px;
}

.booking-item-info p {
    font-size: 14px;
    color: #999;
}

.booking-item-details {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 15px;
}

.booking-item-details p {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.btn-communicate {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 20px;
    font-size: 15px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.3);
}

.btn-communicate:active {
    transform: scale(0.95);
    box-shadow: 0 1px 3px rgba(255, 107, 53, 0.3);
}

/* 聊天界面 */
.chat-container {
    max-width: 750px;
    margin: 0 auto;
    background: #fff;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.chat-header h3 {
    font-size: 18px;
    color: #333;
    margin-left: 10px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #fff;
}

.message {
    margin-bottom: 20px;
    display: flex;
    animation: fadeIn 0.3s;
}

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

.message.user {
    justify-content: flex-end;
}

.message-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 70%;
}

.message.user .message-wrapper {
    align-items: flex-end;
}

.message.counselor .message-wrapper {
    align-items: flex-start;
}

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    position: relative;
    line-height: 1.5;
}

.message.user .message-content {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.message.counselor .message-content {
    background: #fff;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 6px;
    padding: 0 4px;
    line-height: 1;
}

.message.user .message-time {
    text-align: right;
}

.message.counselor .message-time {
    text-align: left;
}

/* 语音消息 */
.voice-message {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 80px;
}

.message.user .voice-message {
    color: #fff;
}

.message.counselor .voice-message {
    color: #333;
}

.voice-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    fill: currentColor;
    flex-shrink: 0;
}

.voice-duration {
    font-size: 15px;
    font-weight: 500;
}

/* 输入框 */
.chat-input-wrapper {
    background: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 10px;
}

.chat-input-container {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 25px;
    padding: 8px 15px;
}

.chat-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    padding: 8px 12px;
    outline: none;
    color: #333;
}

.chat-input::placeholder {
    color: #999;
}

.input-mode-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin: 0 5px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.input-mode-btn:active {
    color: #ff6b35;
}

.send-btn {
    background: #ff6b35;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.send-btn:active {
    transform: scale(0.95);
    background: #ff8c5a;
}

/* 语音输入 */
.voice-input-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.voice-input-btn {
    flex: 1;
    background: #f5f5f5;
    border-radius: 25px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s;
    color: #333;
    font-size: 16px;
    margin-right: 10px;
}

.voice-input-btn:active {
    background: #ff6b35;
    color: #fff;
    transform: scale(0.98);
}

.voice-input-btn.recording {
    background: #ff6b35;
    color: #fff;
    animation: pulse 1.5s infinite;
}

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

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-state-text {
    font-size: 16px;
}

/* 新消息提示条 */
.new-message-notice {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c5a 100%);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    z-index: 100;
    transition: all 0.3s;
    font-size: 14px;
}

.new-message-notice:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.5);
}

.new-message-notice:active {
    transform: translateX(-50%) translateY(0);
}

.notice-text {
    font-weight: 500;
}

.notice-arrow {
    width: 16px;
    height: 16px;
    animation: bounce 1.5s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(3px);
    }
}

.chat-container {
    position: relative;
}
