* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background: url('520.jpg') center center / cover no-repeat fixed;
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* iPhone15 优化 */
@media screen and (max-width: 430px) {
    body {
        font-size: 16px;
        line-height: 1.5;
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 430px;
    margin: 0 auto;
    padding: 10px;
    min-height: 100vh;
}

/* 轮播图样式 */
.carousel-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: url('520.jpg') center center / cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 60%;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.slide-content {
    text-align: center;
    color: white;
}

.slide-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.slide-content p {
    font-size: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.carousel-dots {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

.skip-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    color: #ff6b6b;
    border: 2px solid #ff6b6b;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    z-index: 1001;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.skip-btn:hover {
    background: white;
    color: #ff6b6b;
}

/* 主页面样式 */
.main-section {
    padding-top: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.9);
    padding: 25px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 2rem;
    color: #ff6b6b;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.love-counter {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.counter-item {
    text-align: center;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 15px 10px;
    border-radius: 15px;
    min-width: 70px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.counter-item .number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
}

.counter-item .label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.header p {
    font-size: 1rem;
    color: #666;
}

.photo-section {
    margin-bottom: 30px;
}

.photo-upload-area {
    background: rgba(255, 255, 255, 0.9);
    padding: 25px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.photo-upload-area h2 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 20px;
}

.photo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.photo-box {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 4px solid #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.photo-box:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    color: white;
    font-size: 12px;
    text-align: center;
}

.photo-box:hover .upload-overlay {
    opacity: 1;
}

.upload-overlay i {
    font-size: 18px;
    margin-bottom: 5px;
}

.heart-between {
    font-size: 2rem;
    animation: pulse 2s infinite;
}

.games-section {
    margin-bottom: 30px;
}

.games-section h2 {
    text-align: center;
    font-size: 1.8rem;
    color: white;
    margin-bottom: 25px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.game-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 25px 15px;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.game-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.game-card h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 8px;
}

.game-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.game-area, .result-area {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.game-content, .result-content {
    margin-bottom: 25px;
}

.back-btn, .play-again-btn, .test-btn, .dance-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.back-btn:hover, .play-again-btn:hover, .test-btn:hover, .dance-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.love-test-area {
    text-align: center;
}

.couple-photos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.game-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.love-meter {
    width: 100%;
    height: 25px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    margin: 20px 0;
}

.love-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ff8e8e);
    border-radius: 15px;
    transition: width 2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: 300px;
    margin: 20px auto;
}

.memory-card {
    aspect-ratio: 1;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.5rem;
}

.memory-card:hover {
    transform: scale(1.05);
}

.memory-card.flipped {
    background: #ff6b6b;
    color: white;
}

.memory-info {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-weight: bold;
    color: #333;
}

.guess-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    max-width: 300px;
    margin: 20px auto;
}

.guess-option {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-size: 0.9rem;
}

.guess-option:hover {
    background: #e9ecef;
    border-color: #ff6b6b;
}

.guess-option.selected {
    background: #ff6b6b;
    color: white;
}

.dance-area {
    background: #f8f9fa;
    padding: 30px 20px;
    border-radius: 20px;
    margin: 20px 0;
}

.dance-emoji {
    font-size: 3rem;
    animation: dance 1s infinite;
    margin-bottom: 15px;
}

.result-display {
    font-size: 1.5rem;
    margin: 20px 0;
    padding: 20px;
    border-radius: 15px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
}

.final-score {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.photo-upload-area {
    background: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.photo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.photo-box {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 4px solid #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.photo-box:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    color: white;
    font-size: 12px;
    text-align: center;
}

.photo-box:hover .upload-overlay {
    opacity: 1;
}

.upload-overlay i {
    font-size: 20px;
    margin-bottom: 5px;
}

.vs-text {
    font-size: 2rem;
    font-weight: bold;
    color: #ff6b6b;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.games-section {
    margin-bottom: 40px;
}

.games-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: white;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.game-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.game-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.game-card h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
}

.game-card p {
    color: #666;
    font-size: 1rem;
}

.game-area, .result-area {
    background: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.game-content, .result-content {
    margin-bottom: 30px;
}

.back-btn, .play-again-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.back-btn:hover, .play-again-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.love-meter {
    width: 100%;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    margin: 20px 0;
}

.love-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ff8e8e);
    border-radius: 15px;
    transition: width 2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

.memory-card {
    aspect-ratio: 1;
    background: #f0f0f0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 2rem;
}

.memory-card:hover {
    transform: scale(1.05);
}

.memory-card.flipped {
    background: #ff6b6b;
    color: white;
}

.guess-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 500px;
    margin: 0 auto;
}

.guess-option {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.guess-option:hover {
    background: #e9ecef;
    border-color: #ff6b6b;
}

.guess-option.selected {
    background: #ff6b6b;
    color: white;
}

.dance-area {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 20px;
    margin: 20px 0;
}

.dance-emoji {
    font-size: 4rem;
    animation: dance 1s infinite;
}

@keyframes dance {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-10deg) scale(1.1); }
    75% { transform: rotate(10deg) scale(1.1); }
}

.result-display {
    font-size: 2rem;
    margin: 20px 0;
    padding: 20px;
    border-radius: 15px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .photo-container {
        gap: 20px;
    }
    
    .photo-box {
        width: 120px;
        height: 120px;
    }
    
    .vs-text {
        font-size: 1.5rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .game-card {
        padding: 20px;
    }
    
    .memory-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .guess-options {
        grid-template-columns: 1fr;
    }
}
