/* 全局样式增强 */
:root {
    --primary-color: #FF4E74;
    --primary-light: #FF889E;
    --primary-dark: #D9365B;
    --secondary-color: #764AF1;
    --secondary-light: #9773FF;
    --secondary-dark: #5F35D4;
    --background-color: #F7F8FC;
    --card-color: #FFFFFF;
    --text-dark: #333333;
    --text-medium: #6C6C6C;
    --text-light: #9E9E9E;
    --border-color: #EEEEEE;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-hover: 0 5px 20px rgba(0,0,0,0.15);
    --border-radius: 16px;
    --btn-border-radius: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--background-color);
    color: var(--text-dark);
    height: 100vh;
    overflow: hidden;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
}

/* 底部导航栏增强 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background-color: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 10;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    padding: 10px 0;
    width: 25%;
    height: 100%;
}

.nav-item i {
    font-size: 22px;
    margin-bottom: 4px;
}

.nav-item.active {
    color: var(--primary-color);
}

.nav-item.active i {
    font-size: 24px;
}

/* 主内容区 */
.main-container {
    position: relative;
    height: calc(100vh - 70px);
    overflow-y: auto;
    padding: 20px;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

/* 首页专用主内容区容器样式 */
.match-page .main-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: hidden;
}

/* 用户卡片样式 */
.user-card {
    width: 92%;
    max-width: 420px;
    height: calc(100vh - 120px);
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
    will-change: transform;
    padding: 20px;
    display: flex;
    flex-direction: column;
    margin: 10px auto;
    user-select: none;
    -webkit-user-drag: none;
    touch-action: pan-y pinch-zoom;
}

/* 匹配成功弹窗增强 */
.match-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,117,143,0.95), rgba(255,184,0,0.9));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.match-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.match-header {
    text-align: center;
    margin-bottom: 30px;
}

.match-title {
    font-size: 42px;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
}

.match-subtitle {
    font-size: 18px;
    color: white;
    opacity: 0.9;
}

.match-profiles {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
}

.match-profile {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    object-fit: cover;
    position: relative;
    z-index: 2;
}

.match-profile:first-child {
    transform: translateX(15px);
}

.match-profile:last-child {
    transform: translateX(-15px);
}

.match-heart {
    position: absolute;
    font-size: 60px;
    color: white;
    z-index: 1;
    animation: pulse 1.5s infinite;
}

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

.match-actions {
    display: flex;
    gap: 15px;
    width: 100%;
    max-width: 300px;
}

.match-btn {
    flex: 1;
    background-color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.match-btn i {
    margin-right: 8px;
}

.match-btn.send {
    color: var(--primary-color);
}

.match-btn.close {
    background-color: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.5);
}

.match-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 心动泡泡动画增强 */
.heart-bubble {
    position: absolute;
    width: 30px;
    height: 30px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>') no-repeat center;
    background-size: contain;
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Tinder风格滑动指示器 */
.swipe-indicator {
    position: absolute;
    top: 50px;
    padding: 8px 15px;
    background-color: white;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.2s ease;
    transform: rotate(-15deg);
    z-index: 100;
    pointer-events: none;
}

.swipe-indicator-like {
    right: 20px;
    color: #4CD964;
    border: 2px solid #4CD964;
}

.swipe-indicator-nope {
    left: 20px;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    transform: rotate(15deg);
}

.swipe-indicator i {
    margin-right: 5px;
}

/* 卡片滑动动画相关 */
.user-card {
    will-change: transform;
    transform-origin: center center;
    transition: transform 0.5s ease, box-shadow 0.3s ease;
}

/* 响应式调整 */
@media (max-width: 375px) {
    .action-btn {
        width: 50px;
        height: 50px;
    }
}

/* 在 style.css 中添加以下样式 */
.butler-page {
    padding: 20px;
}

.butler-page h1 {
    font-size: 24px;
    margin-bottom: 20px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    background-color: white;
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.activity-item h2 {
    font-size: 18px;
    margin-bottom: 10px;
}

.activity-item p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.activity-item button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
}

.activity-item button:hover {
    background-color: #ff5c7a;
}

/* Common button styles */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 3px 10px rgba(217, 54, 91, 0.3);
}

.btn-secondary {
    background-color: white;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

/* Common form styles */
.form-input, .form-select, .form-textarea {
    width: 100%;
    height: 44px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 15px;
    color: var(--text-dark);
    background-color: white;
}

.form-label {
    display: block;
    font-size: 14px;
    color: var(--text-medium);
    margin-bottom: 8px;
}

/* Common popup styles */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.popup-container {
    width: 90%;
    max-width: 450px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    overflow: hidden;
}

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
* {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* 底部操作按钮 */
.bottom-action-buttons {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 92%;
    z-index: 1000;
    opacity: 0; /* 默认透明 */
    visibility: hidden; /* 默认隐藏 */
    pointer-events: none; /* 默认不可点击 */
    padding-top: 20px;
    padding-bottom: 5px;
    background: linear-gradient(to top, rgba(255,255,255,0.95) 60%, rgba(255,255,255,0));
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* 这个类用于显示底部按钮 */
.bottom-action-buttons.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.action-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background-color: white;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    pointer-events: auto;
    z-index: 10;
}

.action-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-hover);
}

.action-btn.skip {
    color: var(--primary-color);
    font-size: 26px;
    border: 2px solid var(--primary-color);
}

.action-btn.chat {
    color: #38b0de;
    font-size: 24px;
    border: 2px solid #e0e0e0;
}

.action-btn.like {
    color: #4CD964;
    font-size: 26px;
    border: 2px solid #4CD964;
}

.action-btn.skip i,
.action-btn.like i {
    font-size: 28px;
}

/* 消息页面样式补充 */
.message-page .main-container {
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 80px;
}

.message-list {
    width: 100%;
    flex: 1;
}

.message-page .message-header,
.message-page .message-search,
.message-page .message-filter {
    width: 100%;
}