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

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #1a1a1a;
    color: #fff;
    line-height: 1.6;
    min-height: 100vh;
    max-width: 475px;
    margin: 0;
    position: relative;
}

/* 顶部导航栏 */
.top-nav {
    background-color: #2a2a2a;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 475px;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    height: 45px;
}

.nav-container {
    max-width: 100%;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    height: 45px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-tab {
    padding: 10px 16px;
    text-decoration: none;
    color: #aaa;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-tab:hover {
    color: #fff;
}

.nav-tab.active {
    color: #fff;
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #4caf50, transparent);
    border-radius: 2px;
}

/* 轮播图区域 */
.banner-section {
    position: relative;
    width: 100%;
    margin-top: 45px;
    margin-bottom: 8px;
    overflow: hidden;
}

.banner-slider {
    position: relative;
    width: 100%;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

.banner-slide.active {
    opacity: 1;
    position: relative;
    pointer-events: auto;
}

.banner-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.banner-left {
    flex: 1;
    z-index: 2;
}

.banner-logo {
    color: #fff;
}

.logo-text {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.4);
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 10px;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    font-weight: 500;
    line-height: 1.2;
}

.banner-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 2;
}

.banner-image {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

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

.placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    z-index: 1;
    padding: 2px 0;
}

.overlay-text {
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5), -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
    text-align: center;
}

.overlay-text.large {
    font-size: 12px;
}

.overlay-text.medium {
    font-size: 10px;
}

.overlay-text.white {
    color: #fff;
}

.overlay-text.orange {
    color: #ff9800;
}

.overlay-text.red {
    color: #f44336;
}

.overlay-text.blue {
    color: #2196f3;
}

/* 轮播图指示器 */
.banner-dots {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background-color: #fff;
    width: 12px;
    border-radius: 3px;
}

/* 内容区域 */
.content-section {
    max-width: 100%;
    margin: 0;
    padding: 10px 5px;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
}

/* 内容卡片 */
.content-card {
    position: relative;
    background-color: #2a2a2a;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.05);
}

.content-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    border-color: rgba(255,255,255,0.1);
}

.card-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    color: #fff;
    z-index: 5;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.badge-recommend {
    background-color: #f44336;
}

.badge-official {
    background-color: #ff9800;
}

.badge-service {
    background-color: #2196f3;
}

.badge-gift {
    background-color: #4caf50;
}

.badge-prize {
    background-color: #ffc107;
    color: #333;
}

.badge-give {
    background-color: #9c27b0;
}

.card-image {
    width: 100%;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: auto;
    display: block;
}

.card-image .placeholder-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.9);
    font-size: 11px;
    font-weight: 500;
}

.card-content {
    padding: 3px;
}

.card-title {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* 约会卡片样式 */
.dating-card {
    position: relative;
    background-color: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dating-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    border-color: rgba(255,255,255,0.1);
}

.dating-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dating-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.1);
}

.dating-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dating-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dating-name {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    line-height: 1.2;
}

.dating-distance {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #999;
    background-color: rgba(255,255,255,0.05);
    padding: 3px 8px;
    border-radius: 4px;
    width: fit-content;
}

.distance-icon {
    font-size: 10px;
}

.dating-contact-btn {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff4757 100%);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
}

.dating-contact-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.5);
}

.dating-description {
    font-size: 13px;
    color: #fff;
    line-height: 1.5;
    padding: 8px 0;
}

.dating-main-image {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 5px;
}

.dating-main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.card-subtitle {
    font-size: 10px;
    color: #aaa;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.card-number {
    font-size: 14px;
    font-weight: bold;
    color: #4caf50;
    line-height: 1.2;
}

/* 隐藏滚动条但保持滚动功能 */
.nav-container::-webkit-scrollbar {
    display: none;
}

.nav-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Loading样式 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
    width: 100%;
    text-align: center;
}

.loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #4caf50;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
}

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

.banner-loading {
    min-height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
    font-size: 14px;
}

.banner-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #4caf50;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
}
