/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #FFE4E1 0%, #FFF5EE 50%, #FFE4E1 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* 页面容器 */
.page {
    display: none;
    width: 100%;
    max-width: 600px;
    animation: fadeIn 0.5s ease-in-out;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 40px 30px;
    box-shadow: 0 10px 40px rgba(255, 105, 180, 0.2);
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 182, 193, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

/* ========== 首页样式 ========== */
#home-page .container {
    text-align: center;
}

.header {
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.title {
    font-size: 48px;
    color: #FF69B4;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(255, 105, 180, 0.3);
    animation: bounce 2s ease-in-out infinite;
}

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

.subtitle {
    font-size: 28px;
    color: #FFB6C1;
    font-weight: 300;
}

.bear-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 40px 0;
    position: relative;
    z-index: 1;
}

.bear {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 4px solid white;
}

.bear.bubi {
    animation-delay: 0s;
}

.bear.yier {
    animation-delay: 1.5s;
}

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

.heart {
    font-size: 40px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.description {
    font-size: 18px;
    color: #666;
    line-height: 1.8;
    margin: 30px 0;
    position: relative;
    z-index: 1;
}

.description small {
    font-size: 14px;
    color: #999;
    display: block;
    margin-top: 10px;
}

.start-btn {
    background: linear-gradient(135deg, #FF69B4 0%, #FFB6C1 100%);
    color: white;
    border: none;
    padding: 18px 50px;
    font-size: 22px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.4);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    font-weight: bold;
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 105, 180, 0.5);
}

.start-btn:active {
    transform: translateY(-1px);
}

/* 角色选择样式 */
.role-selection {
    margin: 30px 0;
    position: relative;
    z-index: 1;
}

.role-title {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
    font-weight: bold;
}

.role-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.role-btn {
    background: white;
    border: 3px solid #FFB6C1;
    border-radius: 20px;
    padding: 20px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 140px;
}

.role-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.3);
    border-color: #FF69B4;
}

.role-btn.bubu-btn:hover {
    border-color: #87CEEB;
    box-shadow: 0 10px 30px rgba(135, 206, 235, 0.3);
}

.role-btn img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #FFB6C1;
    transition: all 0.3s ease;
}

.role-btn.bubu-btn img {
    border-color: #87CEEB;
}

.role-btn:hover img {
    transform: scale(1.1);
}

.role-btn span {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.role-btn small {
    font-size: 12px;
    color: #999;
}

.footer-info {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px dashed #FFB6C1;
    position: relative;
    z-index: 1;
}

.footer-info p {
    font-size: 14px;
    color: #999;
    margin: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.footer-bear {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}

/* ========== 答题页样式 ========== */
.progress-container {
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #FFE4E1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF69B4 0%, #FFB6C1 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 6.67%;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    font-size: 16px;
    color: #FF69B4;
    font-weight: bold;
}

.question-container {
    position: relative;
    z-index: 1;
}

.question-number {
    font-size: 16px;
    color: #FF69B4;
    margin-bottom: 10px;
    font-weight: bold;
}

.question-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
    font-weight: bold;
}

.question-content {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
    padding: 20px;
    background: #FFF5EE;
    border-radius: 15px;
    border-left: 4px solid #FF69B4;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-btn {
    background: white;
    border: 2px solid #FFB6C1;
    padding: 18px 25px;
    font-size: 16px;
    border-radius: 15px;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 182, 193, 0.3), transparent);
    transition: left 0.5s ease;
}

.option-btn:hover::before {
    left: 100%;
}

.option-btn:hover {
    border-color: #FF69B4;
    background: #FFF5EE;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.2);
}

.option-btn:active {
    transform: translateX(5px) scale(0.98);
}

.option-label {
    display: inline-block;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #FF69B4 0%, #FFB6C1 100%);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    margin-right: 15px;
    font-weight: bold;
    flex-shrink: 0;
}

.option-text {
    display: inline;
    color: #333;
}

.bear-decoration {
    text-align: center;
    margin-top: 30px;
    position: relative;
    z-index: 1;
}

.bear-decoration img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 3px solid white;
}

/* ========== 结果页样式 ========== */
#result-page .container {
    text-align: center;
}

.result-header {
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.result-title {
    font-size: 28px;
    color: #FF69B4;
    margin-bottom: 15px;
}

.result-emoji {
    font-size: 60px;
    animation: bounce 2s ease-in-out infinite;
}

.result-card {
    background: linear-gradient(135deg, #FFF5EE 0%, #FFE4E1 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
    box-shadow: 0 5px 20px rgba(255, 105, 180, 0.15);
}

.result-image {
    text-align: center;
    margin-bottom: 20px;
}

.result-image img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: float 3s ease-in-out infinite;
}

.result-type {
    font-size: 36px;
    color: #FF69B4;
    font-weight: bold;
    margin-bottom: 10px;
}

.result-slogan {
    font-size: 20px;
    color: #666;
    margin-bottom: 25px;
    font-style: italic;
}

.result-traits {
    text-align: left;
    margin-bottom: 25px;
}

.trait-item {
    padding: 12px 15px;
    margin: 10px 0;
    background: white;
    border-radius: 10px;
    font-size: 16px;
    color: #333;
    border-left: 4px solid #FF69B4;
    transition: transform 0.3s ease;
}

.trait-item:hover {
    transform: translateX(5px);
}

.result-stats {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed #FFB6C1;
}

.stats-title {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
    font-weight: bold;
}

.stats-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-label {
    font-size: 14px;
    color: #666;
    min-width: 80px;
    text-align: right;
}

.stat-bar-container {
    flex: 1;
    height: 20px;
    background: #FFE4E1;
    border-radius: 10px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF69B4 0%, #FFB6C1 100%);
    border-radius: 10px;
    transition: width 1s ease;
}

.stat-count {
    font-size: 14px;
    color: #FF69B4;
    font-weight: bold;
    min-width: 30px;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.retry-btn, .share-btn {
    background: white;
    border: 2px solid #FF69B4;
    color: #FF69B4;
    padding: 15px 35px;
    font-size: 18px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.retry-btn:hover, .share-btn:hover {
    background: #FF69B4;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 105, 180, 0.3);
}

.footer-decoration {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed #FFB6C1;
    position: relative;
    z-index: 1;
}

.footer-decoration span {
    font-size: 14px;
    color: #999;
}

.visit-stats {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #FFB6C1;
}

.visit-stats span {
    font-size: 14px;
    color: #FF69B4;
}

#busuanzi_site_pv {
    font-weight: bold;
    color: #FF1493;
}

.author-link {
    text-align: center;
    margin-top: 12px;
    position: relative;
    z-index: 2;
}

.author-link a {
    font-size: 14px;
    color: #FF69B4;
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
    z-index: 2;
}

.author-link a:hover {
    color: #FF1493;
    text-decoration: underline;
}

/* 游戏卡片样式 */
.game-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 30px 0;
    position: relative;
    z-index: 1;
}

.game-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.2);
    transition: all 0.3s ease;
    border: 3px solid #FFB6C1;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 105, 180, 0.3);
}

.game-card-header {
    background: linear-gradient(135deg, #FF69B4 0%, #FFB6C1 100%);
    padding: 20px;
    text-align: center;
}

.game-card-title {
    color: white;
    font-size: 22px;
    margin: 0;
    font-weight: bold;
}

.game-card-content {
    padding: 20px;
    text-align: center;
}

.game-card-content .bear-container {
    margin-bottom: 15px;
}

.game-card-content .bear {
    width: 80px;
    height: 80px;
}

.game-card-content .heart {
    font-size: 20px;
    margin: 0 10px;
}

.game-card-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid #FFB6C1;
}

.game-card-description {
    color: #666;
    line-height: 1.6;
    margin: 0;
    font-size: 14px;
}

.game-card-footer {
    padding: 0 20px 20px;
    text-align: center;
}

.game-card-btn {
    background: linear-gradient(135deg, #FF69B4 0%, #FFB6C1 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.3);
    transition: all 0.3s ease;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
}

.game-card-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.4);
}

.back-btn {
    background: white;
    border: 2px solid #FF69B4;
    color: #FF69B4;
    padding: 10px 25px;
    font-size: 14px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #FF69B4;
    color: white;
}

/* 找不同游戏入口按钮 */
.game-link {
    text-align: center;
    margin: 20px 0;
    position: relative;
    z-index: 1;
}

.game-btn {
    background: linear-gradient(135deg, #FF69B4 0%, #FFB6C1 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.4);
    transition: all 0.3s ease;
    font-weight: bold;
}

.game-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 105, 180, 0.5);
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .container {
        padding: 30px 20px;
    }

    .title {
        font-size: 36px;
    }

    .subtitle {
        font-size: 22px;
    }

    .bear {
        width: 80px;
        height: 80px;
    }

    .heart {
        font-size: 30px;
    }

    .description {
        font-size: 16px;
    }

    .start-btn {
        font-size: 18px;
        padding: 15px 40px;
    }

    .question-title {
        font-size: 20px;
    }

    .question-content {
        font-size: 16px;
        padding: 15px;
    }

    .option-btn {
        padding: 15px 20px;
        font-size: 15px;
    }

    .result-type {
        font-size: 28px;
    }

    .result-image img {
        width: 160px;
        height: 160px;
    }

    .result-slogan {
        font-size: 18px;
    }

    .trait-item {
        font-size: 14px;
        padding: 10px 12px;
    }

    .retry-btn, .share-btn {
        font-size: 16px;
        padding: 12px 30px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 25px 15px;
        border-radius: 20px;
    }

    .title {
        font-size: 28px;
    }

    .subtitle {
        font-size: 18px;
    }

    .bear {
        width: 80px;
        height: 80px;
    }

    .heart {
        font-size: 25px;
    }

    .bear-container {
        gap: 15px;
    }

    .start-btn {
        font-size: 16px;
        padding: 12px 35px;
    }

    .result-actions {
        flex-direction: column;
    }

    .retry-btn, .share-btn {
        width: 100%;
    }

    .result-image img {
        width: 140px;
        height: 140px;
    }
}

/* ========== 动画增强 ========== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.option-btn {
    animation: slideIn 0.5s ease forwards;
}

.option-btn:nth-child(1) {
    animation-delay: 0.1s;
}

.option-btn:nth-child(2) {
    animation-delay: 0.2s;
}

.option-btn:nth-child(3) {
    animation-delay: 0.3s;
}

.option-btn:nth-child(4) {
    animation-delay: 0.4s;
}

/* 找不同游戏入口按钮 */
.game-link {
    text-align: center;
    margin: 20px 0;
    position: relative;
    z-index: 1;
}

.game-btn {
    background: linear-gradient(135deg, #FF69B4 0%, #FFB6C1 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.4);
    transition: all 0.3s ease;
    font-weight: bold;
}

.game-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 105, 180, 0.5);
}
