* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #ff6b6b;
    --primary-dark: #ee5a24;
    --bg: #f5f5f5;
    --card-bg: #ffffff;
    --text: #333333;
    --text-secondary: #999999;
    --border: #eeeeee;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

#app {
    height: 100%;
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 0 auto;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

.page-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.tab-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-page.active {
    display: flex;
    opacity: 1;
}

.page-header {
    padding: 12px 16px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
    flex-shrink: 0;
}

.page-header h1 {
    font-size: 20px;
    font-weight: 600;
}

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

.filter-btn, .settings-btn {
    font-size: 14px;
    color: var(--primary);
    cursor: pointer;
    padding: 4px 8px;
}

/* Full Screen Swiper */
.full-swiper {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.full-swiper .swiper-wrapper {
    height: 100%;
}

.full-swiper .swiper-slide {
    height: 100%;
    width: 100%;
}

.gradient-card {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 24px 100px;
    position: relative;
    color: white;
}

.gradient-card.card-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-card.card-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.gradient-card.card-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.gradient-card.card-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.gradient-card.card-5 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.card-top-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    gap: 16px;
}

.card-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    border: 3px solid rgba(255,255,255,0.3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.user-badge {
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    color: white;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-bottom-info {
    padding-bottom: 20px;
}

.card-center-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 12px;
}

.card-center-info .center-icon {
    font-size: 80px;
    line-height: 1;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
}

.card-center-info .center-type {
    font-size: 36px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    letter-spacing: 4px;
}

.card-bottom-info .card-distance {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.card-bottom-info .card-bio {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 16px;
    opacity: 0.95;
}

.card-bottom-info .card-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.card-bottom-info .tag {
    background: rgba(255,255,255,0.25);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.card-actions-overlay {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 24px;
    z-index: 10;
}

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

.card-age {
    font-weight: 400;
    font-size: 20px;
    margin-left: 4px;
}

.card-distance {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.card-bio {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    backdrop-filter: blur(10px);
}

.card-actions {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 12px 16px 20px;
    background: var(--bg);
    flex-shrink: 0;
}

.action-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.action-btn.dislike {
    background: white;
    color: #ff6b6b;
}

.action-btn.superlike {
    background: white;
    color: #ffd32a;
    width: 48px;
    height: 48px;
    font-size: 20px;
    align-self: center;
}

.action-btn.like {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

/* Tab 2: Social Type */
.social-type-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 16px;
    -webkit-overflow-scrolling: touch;
}

.social-type-title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: var(--text);
}

.social-type-subtitle {
    font-size: 14px;
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.social-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.social-type-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px 16px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.social-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    opacity: 0;
    transition: opacity 0.2s;
}

.social-type-card:active {
    transform: scale(0.96);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.social-type-card:active::before {
    opacity: 1;
}



.type-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.type-icon {
    font-size: 32px;
}

.type-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.type-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.type-count {
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
}

.social-quick-match {
    text-align: center;
}

.quick-match-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}

.quick-match-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 14px 32px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.quick-match-btn:active {
    transform: scale(0.96);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

/* Tab 3: Profile */
.profile-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    -webkit-overflow-scrolling: touch;
}

.profile-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.profile-avatar {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.vip-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: linear-gradient(135deg, #ffd32a, #ff9f1a);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    border: 2px solid var(--card-bg);
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-id {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

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

.profile-edit {
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.stats-row {
    display: flex;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stat-item {
    flex: 1;
    text-align: center;
}

.stat-num {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.menu-list {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

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

.menu-item:active {
    background: var(--bg);
}

.menu-icon {
    font-size: 20px;
    margin-right: 12px;
}

.menu-text {
    flex: 1;
    font-size: 15px;
}

.menu-arrow {
    color: var(--text-secondary);
    font-size: 18px;
}

.menu-badge {
    background: var(--primary);
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 8px;
}

.logout-btn {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    color: var(--primary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: opacity 0.2s;
}

.logout-btn:active {
    opacity: 0.7;
}

/* Tab Bar */
.tab-bar {
    display: flex;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 8px 0;
    padding-bottom: calc(8px + var(--safe-bottom));
    flex-shrink: 0;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

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

.tab-icon {
    width: 24px;
    height: 24px;
}

.tab-icon svg {
    width: 100%;
    height: 100%;
}

.tab-text {
    font-size: 11px;
    font-weight: 500;
}

/* Swiper custom styles */
.cards-swiper .swiper-wrapper {
    align-items: stretch;
}

.cards-swiper .swiper-slide {
    height: auto !important;
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.tab-page.active .social-type-card,
.tab-page.active .profile-card,
.tab-page.active .stats-row,
.tab-page.active .menu-list {
    animation: slideUp 0.4s ease forwards;
}

.tab-page.active .social-type-card:nth-child(2) {
    animation-delay: 0.1s;
}

.tab-page.active .social-type-card:nth-child(3) {
    animation-delay: 0.2s;
}

.tab-page.active .social-type-card:nth-child(4) {
    animation-delay: 0.3s;
}

.tab-page.active .menu-list {
    animation-delay: 0.1s;
}

/* Card swipe animation */
.card-swiping-right {
    animation: swipeRight 0.4s ease forwards;
}

.card-swiping-left {
    animation: swipeLeft 0.4s ease forwards;
}

@keyframes swipeRight {
    to {
        transform: translateX(120%) rotate(20deg);
        opacity: 0;
    }
}

@keyframes swipeLeft {
    to {
        transform: translateX(-120%) rotate(-20deg);
        opacity: 0;
    }
}

/* Watch Tab Styles */
.watch-container {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    padding: 20px;
    padding-bottom: calc(20px + var(--safe-bottom));
}

.watch-swiper {
    width: 320px;
    height: 394px;
    border-radius: 40px;
    overflow: hidden;
    background: #1a1a1a;
    box-shadow: 0 0 0 12px #333, 0 0 0 14px #555, 0 20px 60px rgba(0,0,0,0.5);
}

.watch-swiper .swiper-wrapper {
    height: 100%;
}

.watch-swiper .swiper-slide {
    height: 100%;
    width: 100%;
}

.watch-card {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.watch-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.15) 0%, transparent 60%);
    pointer-events: none;
}

.watch-card .type-icon {
    font-size: 80px;
    line-height: 1;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
    position: relative;
    z-index: 1;
}

.watch-card .type-name {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
    letter-spacing: 2px;
}

.watch-card .activity-status {
    font-size: 18px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

.watch-card .watch-ring {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

/* Watch crown indicator */
.watch-crown {
    position: absolute;
    right: -6px;
    top: 80px;
    width: 6px;
    height: 30px;
    background: #666;
    border-radius: 0 3px 3px 0;
}

/* Watch button */
.watch-button {
    position: absolute;
    right: -6px;
    top: 130px;
    width: 6px;
    height: 50px;
    background: #666;
    border-radius: 0 3px 3px 0;
}
