/* 三角洲陪玩网站样式 */

:root {
    --primary-color: #2c5530;
    --primary-dark: #1e3a21;
    --success-color: #4a7c59;
    --info-color: #546e7a;
    --warning-color: #bf9000;
    --danger-color: #8b4513;
    --light-color: #f5f5dc;
    --dark-color: #2f4f4f;
    --gradient-primary: linear-gradient(135deg, #2c5530 0%, #4a7c59 100%);
    --gradient-secondary: linear-gradient(135deg, #546e7a 0%, #37474f 100%);
    --box-shadow: 0 0.15rem 1.75rem 0 rgba(47, 79, 79, 0.25);
    --border-radius: 0.35rem;
    
    /* 三角洲行动主题色彩 */
    --delta-green: #2c5530;
    --delta-tan: #8b7355;
    --delta-dark: #1a1a1a;
    --delta-accent: #ff6b35;
}

/* 全局样式 */
body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background-color: #f8f9fc;
    color: #5a5c69;
    line-height: 1.6;
}

.main-content {
    padding-top: 76px; /* 为固定导航栏留出空间 */
    min-height: calc(100vh - 76px);
}

/* 导航栏样式 - 军事主题 */
.navbar {
    background: linear-gradient(135deg, var(--delta-dark) 0%, var(--delta-green) 100%) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid var(--delta-accent);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--delta-accent) !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.navbar-brand:hover {
    color: #ff8c5a !important;
}

.navbar-nav .nav-link {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9) !important;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.3);
}

.navbar-nav .nav-link:hover {
    color: var(--delta-accent) !important;
    transform: translateY(-1px);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.2);
}

.card-header {
    border-bottom: 1px solid #e3e6f0;
    background-color: #f8f9fc;
}

/* 按钮样式 - 军事主题 */
.btn {
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    box-shadow: 0 4px 15px rgba(44, 85, 48, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 85, 48, 0.4);
}

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

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

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

/* 轮播图区域样式 */
.hero-carousel {
    position: relative;
    overflow: hidden;
}

.hero-slide {
    min-height: 75vh;
    background: var(--gradient-primary);
    position: relative;
}

.hero-slide-1 {
    background: linear-gradient(rgba(102, 126, 234, 0.6), rgba(118, 75, 162, 0.6)), url('https://images.unsplash.com/photo-1542751371-adc38448a05e?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
}

.hero-slide-2 {
    background: linear-gradient(rgba(240, 147, 251, 0.6), rgba(245, 87, 108, 0.6)), url('https://images.unsplash.com/photo-1511512578047-dfb367046420?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
}

.hero-slide-3 {
    background: linear-gradient(rgba(168, 237, 234, 0.6), rgba(254, 214, 227, 0.6)), url('https://images.unsplash.com/photo-1551698618-1dfe5d97d256?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    color: #333 !important;
}

.hero-slide-3 .hero-content {
    color: #333 !important;
}

.hero-slide-3 .hero-content h1,
.hero-slide-3 .hero-content p {
    color: #333 !important;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-slide .container {
    position: relative;
    z-index: 2;
}

.min-vh-75 {
    min-height: 75vh;
}

.carousel-indicators {
    bottom: 30px;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    background-color: transparent;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.carousel-indicators button.active {
    background-color: white;
    opacity: 1;
    transform: scale(1.2);
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.feature-highlights .feature-item {
    font-size: 1.1rem;
}

.steps .step-item {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.step-number {
    font-size: 1rem;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* 英雄区域样式 - 保留用于其他页面 */
.hero-section {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.hero-bg {
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.4);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/hero-bg.jpg') center/cover no-repeat;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.search-box {
    max-width: 600px;
    margin: 2rem 0;
}

.search-box .form-control {
    border-radius: 50px 0 0 50px;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
}

.search-box .btn {
    border-radius: 0 50px 50px 0;
    padding: 1rem 2rem;
}

/* 陪玩卡片样式 - 战士风格 */
.companion-card {
    transition: all 0.3s ease;
    position: relative;
}

.companion-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--delta-green), var(--delta-accent));
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.companion-card:hover::before {
    opacity: 1;
}

.companion-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(44, 85, 48, 0.3);
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.companion-card:hover .card-img-top {
    transform: scale(1.05);
}

.online-status {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    background-color: #28a745;
    border-radius: 50%;
    border: 2px solid white;
}

.online-status-large {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background-color: #28a745;
    border-radius: 50%;
    border: 3px solid white;
}

.rating .fa-star {
    font-size: 0.9rem;
}

.price-tag {
    text-align: center;
    margin-top: 1rem;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.unit {
    color: #6c757d;
    font-size: 0.9rem;
}

/* 游戏分类标签 */
.game-categories .btn {
    margin: 0.25rem;
    border-radius: 20px;
}

.game-categories .btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 特色功能区域 */
.features-section {
    background-color: #f8f9fc;
}

.feature-item {
    padding: 2rem;
    transition: transform 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    margin-bottom: 1.5rem;
}

/* 统计数据样式 */
.stats-section {
    background: var(--gradient-primary);
    color: white;
}

.stat-item {
    text-align: center;
    padding: 2rem 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* 认证页面样式 */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-primary);
}

.auth-card {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.auth-card .card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #e3e6f0;
}

.divider-text {
    background-color: white;
    padding: 0 1rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.user-type-selection .btn-check:checked + .btn {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 陪玩列表页面 */
.companions-page {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(rgba(20, 30, 40, 0.8), rgba(40, 60, 80, 0.8)), url('https://images.unsplash.com/photo-1574375927938-d5a98e8ffe85?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat fixed;
}

.search-section {
    background-color: rgba(248, 249, 252, 0.95);
    border-bottom: 1px solid rgba(227, 230, 240, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.companions-page .container {
    position: relative;
    z-index: 2;
}

.companions-page .section-header {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.companions-page .section-header h2 {
    color: white;
}

.companions-page .section-header p {
    color: rgba(255, 255, 255, 0.9);
}

.companion-avatar {
    position: relative;
}

.online-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background-color: #28a745;
    border-radius: 50%;
    border: 2px solid white;
}

.game-tags .badge {
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

/* 陪玩详情页面 */
.companion-detail-page .companion-profile {
    position: sticky;
    top: 100px;
}

.companion-avatar {
    position: relative;
    display: inline-block;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    text-align: center;
}

.stat-item {
    padding: 1rem;
    background-color: #f8f9fc;
    border-radius: var(--border-radius);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0;
}

.review-item {
    padding: 1rem 0;
}

.review-item:not(:last-child) {
    border-bottom: 1px solid #e3e6f0;
}

/* 预约页面 */
.booking-page {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(rgba(25, 35, 45, 0.8), rgba(45, 65, 85, 0.8)), url('https://images.unsplash.com/photo-1578836537282-3171d77f8632?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat fixed;
}

.booking-card {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.booking-card .card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.companion-info {
    background: linear-gradient(135deg, rgba(248, 249, 252, 0.9) 0%, rgba(227, 230, 240, 0.9) 100%);
    border-radius: var(--border-radius);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.cost-calculation {
    background-color: rgba(248, 249, 252, 0.9);
    border-radius: var(--border-radius);
    border: 2px solid rgba(227, 230, 240, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* 个人中心样式 - 战士档案 */
.profile-page {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(rgba(20, 30, 40, 0.8), rgba(40, 60, 80, 0.8)), url('https://images.unsplash.com/photo-1566837945700-30057527ade0?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat fixed;
}

.profile-sidebar {
    position: sticky;
    top: 100px;
}

.profile-sidebar .card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.profile-avatar img {
    border: 4px solid var(--delta-accent);
    box-shadow: 0 0.5rem 1rem rgba(44, 85, 48, 0.3);
}

.profile-nav .list-group-item {
    border: none;
    border-radius: 0;
    font-weight: 600;
    transition: all 0.3s ease;
}

.profile-nav .list-group-item:hover {
    background-color: #f8f9fc;
    color: var(--primary-color);
}

.profile-nav .list-group-item.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.tab-content {
    display: none;
}

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

.order-item {
    background-color: white;
    border: 1px solid #e3e6f0;
    transition: border-color 0.3s ease;
}

.order-item:hover {
    border-color: var(--primary-color);
}

/* 充值页面 */
.recharge-page {
    background-color: #f8f9fc;
    min-height: 100vh;
}

.recharge-card {
    max-width: 800px;
    margin: 0 auto;
}

.current-balance {
    background: linear-gradient(135deg, #f8f9fc 0%, #e3e6f0 100%);
    border-radius: var(--border-radius);
}

.amount-selection .btn-check:checked + .btn {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.payment-option .btn-check:checked + .btn {
    background-color: #f8f9fc;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.recharge-notice {
    background-color: #e7f3ff;
    border: 1px solid #b8daff;
}

/* 聊天页面 */
.chat-page {
    background-color: #f8f9fc;
    height: 100vh;
    overflow: hidden;
}

.contacts-panel,
.chat-panel {
    height: calc(100vh - 2rem);
}

.contacts-list {
    height: calc(100% - 120px);
    overflow-y: auto;
}

.contact-item {
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact-item:hover {
    background-color: #f8f9fc;
}

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

.contact-item.active .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.contact-avatar {
    position: relative;
}

.online-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background-color: #28a745;
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

.offline-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background-color: #6c757d;
    border-radius: 50%;
    border: 2px solid white;
}

.unread-count {
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-content {
    height: calc(100% - 140px);
    overflow: hidden;
    position: relative;
}

.messages-container {
    height: 100%;
    overflow-y: auto;
    padding: 1rem;
}

.message {
    display: flex;
    margin-bottom: 1rem;
    animation: fadeInUp 0.3s ease;
}

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

.message.sent .message-content {
    order: 1;
}

.message-avatar {
    width: 40px;
    height: 40px;
    margin-right: 0.5rem;
}

.message.sent .message-avatar {
    margin-right: 0;
    margin-left: 0.5rem;
    order: 2;
}

.message-bubble {
    background-color: white;
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    max-width: 300px;
    word-wrap: break-word;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.message.sent .message-bubble {
    background-color: var(--primary-color);
    color: white;
}

.message-time {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.25rem;
    text-align: center;
}

.message-image img {
    max-width: 200px;
    max-height: 200px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.message-image img:hover {
    transform: scale(1.05);
}

.message-file {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 0.5rem;
    padding: 0.5rem;
    margin: 0.25rem 0;
}

.file-link {
    text-decoration: none;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-link:hover {
    color: var(--primary-dark);
}

.typing-indicator {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 1rem;
    margin: 0.5rem 1rem;
    position: absolute;
    bottom: 0;
    left: 0;
}

.typing-dots {
    display: flex;
    gap: 0.25rem;
    margin-right: 0.5rem;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: typingDot 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    30% {
        transform: scale(1);
        opacity: 1;
    }
}

.quick-replies {
    border-top: 1px solid #e3e6f0;
    padding-top: 0.5rem;
}

.quick-reply-buttons .btn {
    border-radius: 20px;
    font-size: 0.8rem;
}

.upload-progress {
    background-color: #f8f9fc;
    border-radius: 0.5rem;
    padding: 0.5rem;
}

.upload-progress .progress {
    height: 4px;
    margin-bottom: 0.25rem;
}

/* 通知页面样式 */
.notifications-page {
    background-color: #f8f9fc;
    min-height: 100vh;
}

.notification-item {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.notification-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.notification-item.unread {
    border-left-color: var(--primary-color);
    background-color: #f8f9ff;
}

.notification-item.unread .notification-title {
    font-weight: 700;
}

.notification-icon {
    width: 40px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 0.25rem;
}

.notification-content {
    cursor: pointer;
}

.notification-title {
    color: #2d3748;
    line-height: 1.4;
}

.notification-text {
    line-height: 1.5;
    font-size: 0.9rem;
}

.notification-actions {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notification-item:hover .notification-actions {
    opacity: 1;
}

.notification-tabs .nav-link {
    color: #6c757d;
    border-radius: 25px;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
}

.notification-tabs .nav-link.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.notification-tabs .nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(78, 115, 223, 0.1);
}

/* 管理后台样式 */
.admin-dashboard {
    background-color: #f8f9fc;
    min-height: 100vh;
}

.stats-card {
    border-left: 4px solid;
}

.border-left-primary {
    border-left-color: var(--primary-color) !important;
}

.border-left-success {
    border-left-color: var(--success-color) !important;
}

.border-left-info {
    border-left-color: var(--info-color) !important;
}

.border-left-warning {
    border-left-color: var(--warning-color) !important;
}

.chart-area {
    position: relative;
    height: 320px;
}

.chart-pie {
    position: relative;
    height: 245px;
}

.popular-companions .companion-item {
    padding: 0.75rem;
    background-color: #f8f9fc;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    transition: background-color 0.3s ease;
}

.popular-companions .companion-item:hover {
    background-color: #e3e6f0;
}

.system-stat {
    text-align: center;
    padding: 1rem;
}

.stat-title {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .search-box .form-control {
        border-radius: var(--border-radius);
        margin-bottom: 0.5rem;
    }
    
    .search-box .btn {
        border-radius: var(--border-radius);
        width: 100%;
    }
    
    .companion-detail-page .companion-profile {
        position: static;
        margin-bottom: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .chat-page .container-fluid {
        padding: 0;
    }
    
    .contacts-panel,
    .chat-panel {
        height: 50vh;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding-top: 70px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .auth-card {
        margin: 1rem;
    }
}

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

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

.online-status,
.online-indicator {
    animation: pulse 2s infinite;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* 工具提示 */
.tooltip-inner {
    background-color: #333;
    border-radius: var(--border-radius);
}

/* 表单验证样式 */
.is-invalid {
    border-color: var(--danger-color);
}

.invalid-feedback {
    color: var(--danger-color);
    font-size: 0.875rem;
}

.is-valid {
    border-color: var(--success-color);
}

.valid-feedback {
    color: var(--success-color);
    font-size: 0.875rem;
}

/* 增强聊天界面样式 */
.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.contact-category h6 {
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}

.contacts-panel, .chat-panel {
    height: calc(100vh - 120px);
}

.contacts-list {
    max-height: calc(100vh - 280px);
    overflow-y: auto;
}

.contact-item {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.contact-item:hover {
    background-color: #f8f9fa;
}

.contact-item.active {
    background-color: #e3f2fd;
    border-left: 4px solid #007bff;
}

.message {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
}

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

.message.received {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    word-wrap: break-word;
}

.message.sent .message-bubble {
    background-color: #007bff;
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.message.received .message-bubble {
    background-color: #f1f3f4;
    color: #333;
    border-bottom-left-radius: 0.25rem;
}

.message-time {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
    text-align: center;
}

.online-indicator, .offline-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
}

.online-indicator {
    background-color: #28a745;
}

.offline-indicator {
    background-color: #6c757d;
}

.contact-avatar {
    position: relative;
    display: inline-block;
}

/* 消息删除功能样式 */
.message-actions {
    opacity: 0;
    transition: opacity 0.3s ease;
    margin-top: 0.5rem;
}

.message:hover .message-actions {
    opacity: 1;
}

.message-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
}

/* 删除按钮悬停效果 */
.message-actions .btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* 聊天头部状态样式 */
.chat-header .chat-status.text-success {
    color: #28a745 !important;
}

.chat-header .chat-status.text-muted {
    color: #6c757d !important;
}

.chat-status {
    transition: color 0.3s ease;
}

/* 客服头像样式 */
.chat-avatar-container {
    position: relative;
    display: inline-block;
}

.chat-avatar-container img[src*="customer-service-avatar.svg"] {
    border: 2px solid #28a745;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.3);
    background-color: white;
}

.service-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background-color: #28a745;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* 修复消息文本显示问题 */
.message-bubble p {
    margin: 0;
    line-height: 1.4;
    word-break: break-word;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

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

.message.sent .message-content {
    align-items: flex-end;
}

.message.received .message-content {
    align-items: flex-start;
}

/* 陪玩师卡片美化 */
.companion-card {
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
}

.companion-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.companion-card .card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.companion-card .actions .btn {
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.companion-card .actions .btn-outline-primary {
    border: 2px solid #007bff;
    color: #007bff;
}

.companion-card .actions .btn-outline-primary:hover {
    background-color: #007bff;
    color: white;
    transform: scale(1.05);
}

.companion-card .actions .btn-primary:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

/* 移动端优化 */
@media (max-width: 768px) {
    /* 移动端消息操作按钮始终显示 */
    .message-actions {
        opacity: 1;
    }
    
    .companion-card {
        margin-bottom: 1rem;
    }
    
    .companion-card:hover {
        transform: none;
    }
}
