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

:root {
    --primary: #FF4B6E;
    --primary-light: #FF7A92;
    --secondary: #6C5CE7;
    --pass: #A0A0A0;
    --super-like: #6DD5ED;
    --success: #00D26A;
    --bg: #0F0F1E;
    --card-bg: #1A1A2E;
    --text: #FFFFFF;
    --text-secondary: #8888A0;
    --gradient: linear-gradient(135deg, #FF4B6E 0%, #FF8E53 100%);
    --gradient-purple: linear-gradient(135deg, #6C5CE7 0%, #A259FF 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow: hidden;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.app-container {
    max-width: 480px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* 顶部导航 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: transparent;
    z-index: 10;
}

.header-logo {
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.header-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.header-btn:active {
    transform: scale(0.95);
}

/* 卡片容器 */
.cards-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    perspective: 1000px;
}

/* 卡片样式 */
.card {
    position: absolute;
    width: 100%;
    max-width: 340px;
    aspect-ratio: 3/4;
    border-radius: 24px;
    overflow: hidden;
    background: var(--card-bg);
    cursor: grab;
    transition: transform 0.1s ease-out;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform-style: preserve-3d;
}

.card:active {
    cursor: grabbing;
}

.card-image {
    width: 100%;
    height: 75%;
    object-fit: cover;
    pointer-events: none;
}

.card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    pointer-events: none;
}

.card-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.card-age {
    font-size: 18px;
    color: var(--text);
    font-weight: 400;
}

.card-bio {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-info-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 5;
}

.card-info-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* 卡片状态指示器 */
.card-status {
    position: absolute;
    top: 60px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 32px;
    font-weight: 800;
    text-transform: uppercase;
    border: 4px solid;
    opacity: 0;
    transform: rotate(-15deg);
    z-index: 10;
}

.card-status.like {
    left: 20px;
    color: var(--primary);
    border-color: var(--primary);
}

.card-status.pass {
    right: 20px;
    color: var(--pass);
    border-color: var(--pass);
    transform: rotate(15deg);
}

.card-status.super-like {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--super-like);
    border-color: var(--super-like);
    transform: translate(-50%, -50%) rotate(0deg);
    font-size: 28px;
}

/* 底部操作栏 */
.action-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 30px 20px;
    background: transparent;
}

.action-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.action-btn:active {
    transform: scale(0.9);
}

.action-btn.pass {
    background: var(--card-bg);
    color: var(--pass);
    border: 2px solid rgba(160, 160, 160, 0.3);
}

.action-btn.pass:hover {
    border-color: var(--pass);
    transform: scale(1.1);
}

.action-btn.super-like {
    width: 50px;
    height: 50px;
    background: var(--card-bg);
    color: var(--super-like);
    border: 2px solid rgba(109, 213, 237, 0.3);
}

.action-btn.super-like:hover {
    border-color: var(--super-like);
    transform: scale(1.1);
}

.action-btn.like {
    background: var(--gradient);
    color: white;
}

.action-btn.like:hover {
    transform: scale(1.15);
    box-shadow: 0 12px 32px rgba(255, 75, 110, 0.4);
}

/* 弹窗通用样式 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 个人资料弹窗 */
.modal-content {
    background: var(--card-bg);
    border-radius: 24px;
    max-width: 360px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.profile-header {
    position: relative;
    height: 300px;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    padding: 24px;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-age {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.profile-bio {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.profile-interests {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.interest-tag {
    padding: 8px 16px;
    background: rgba(108, 92, 231, 0.2);
    border-radius: 20px;
    font-size: 12px;
    color: #A259FF;
}

/* 匹配成功弹窗 */
.match-modal {
    background: var(--card-bg);
    border-radius: 32px;
    padding: 40px 30px;
    text-align: center;
    max-width: 320px;
    position: relative;
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .match-modal {
    transform: scale(1);
}

.match-title {
    font-size: 32px;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
}

.match-avatars {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: -20px;
    margin-bottom: 24px;
}

.my-avatar,
.match-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--bg);
    overflow: hidden;
    background: var(--card-bg);
    margin: 0 -10px;
}

.my-avatar img,
.match-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.match-text {
    font-size: 18px;
    color: var(--text);
    margin-bottom: 30px;
}

.match-text span {
    color: var(--primary);
    font-weight: 700;
}

.match-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.match-btn {
    padding: 16px 32px;
    border-radius: 16px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.match-btn.primary:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(255, 75, 110, 0.4);
}

.match-btn.secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.match-btn.secondary:hover {
    border-color: var(--text-secondary);
    color: var(--text);
}

/* 纸屑动画 */
.match-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary);
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(500px) rotate(720deg);
        opacity: 0;
    }
}

/* 空状态 */
.empty-state {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 响应式 */
@media (max-height: 700px) {
    .cards-container {
        padding: 10px;
    }

    .card {
        max-width: 300px;
    }

    .action-bar {
        padding: 20px;
    }

    .action-btn {
        width: 56px;
        height: 56px;
    }
}

/* 滑动动画类 */
.card.swiping-left {
    animation: swipe-left 0.4s ease-out forwards;
}

.card.swiping-right {
    animation: swipe-right 0.4s ease-out forwards;
}

.card.swiping-up {
    animation: swipe-up 0.4s ease-out forwards;
}

@keyframes swipe-left {
    to {
        transform: translateX(-150%) rotate(-30deg);
        opacity: 0;
    }
}

@keyframes swipe-right {
    to {
        transform: translateX(150%) rotate(30deg);
        opacity: 0;
    }
}

@keyframes swipe-up {
    to {
        transform: translateY(-150%) scale(0.8);
        opacity: 0;
    }
}

/* 卡片回弹动画 */
.card.rebound {
    animation: rebound 0.3s ease-out;
}

@keyframes rebound {
    0% { transform: translateX(var(--rebound-x)) rotate(var(--rebound-r)); }
    50% { transform: translateX(calc(var(--rebound-x) * 0.3)) rotate(calc(var(--rebound-r) * 0.3)); }
    100% { transform: translateX(0) rotate(0); }
}
