/**
 * 契合测试页面专用样式
 * 小清新梦幻风格
 */

/* 页面背景 */
.test-body {
    background: linear-gradient(135deg, #ffeef8 0%, #e8f4fc 50%, #fff0f5 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* 樱花容器 */
.sakura-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* 散落装饰 */
.test-scatter {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.scatter-icon {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.5;
    animation: floatIcon 6s ease-in-out infinite;
}

.si-1 { top: 15%; left: 8%; animation-delay: 0s; }
.si-2 { top: 25%; right: 12%; animation-delay: 0.8s; }
.si-3 { top: 50%; left: 5%; animation-delay: 1.5s; }
.si-4 { top: 65%; right: 8%; animation-delay: 2s; }
.si-5 { bottom: 25%; left: 12%; animation-delay: 2.5s; }
.si-6 { bottom: 15%; right: 15%; animation-delay: 3s; }

@keyframes floatIcon {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.5; }
    50% { transform: translateY(-15px) rotate(10deg); opacity: 0.7; }
}

/* 主内容区 */
.test-main {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    padding: 100px 20px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== 开始界面 - 小卡片创意风格 ========== */
.test-hero {
    width: 100%;
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.test-cards-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

/* 主卡片 */
.test-main-card {
    position: relative;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 2rem 1.5rem;
    box-shadow: 0 15px 50px rgba(255, 150, 180, 0.2);
    border: 1px solid rgba(255, 200, 220, 0.3);
    overflow: hidden;
}

.card-ribbon {
    position: absolute;
    top: -5px;
    right: 20px;
    font-size: 2rem;
    animation: ribbonBounce 2s ease-in-out infinite;
}

@keyframes ribbonBounce {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-5px) rotate(5deg); }
}

.card-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.card-icon-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.card-icon {
    font-size: 3.5rem;
    display: block;
    animation: heartPulse 1.5s ease-in-out infinite;
}

@keyframes heartPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.card-sparkle {
    position: absolute;
    top: -5px;
    right: -10px;
    font-size: 1.2rem;
    animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.5; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.card-title {
    font-size: 2rem;
    background: linear-gradient(135deg, #ff7a9e, #7eb8da);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.3rem;
}

.card-desc {
    font-size: 0.95rem;
    color: #8a9bab;
}

.card-body {
    text-align: center;
}

/* 信息胶囊 */
.info-pills {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.info-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 0.9rem;
    background: linear-gradient(135deg, rgba(255, 240, 245, 0.9), rgba(240, 248, 255, 0.9));
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 200, 220, 0.3);
}

.pill-icon {
    font-size: 1rem;
}

.pill-text {
    color: #5a6c7d;
    font-weight: 500;
}

/* 开始按钮 - 创意样式 */
.start-btn-fancy {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    overflow: hidden;
    background: transparent;
    font-family: var(--font-family);
}

.start-btn-fancy .btn-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff7a9e, #ff8a80);
    border-radius: 30px;
    transition: transform 0.3s ease;
    pointer-events: none;
}

.start-btn-fancy:hover .btn-bg {
    transform: scale(1.05);
}

.start-btn-fancy .btn-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    pointer-events: none;
}

.start-btn-fancy .btn-text {
    font-size: 1.1rem;
    font-weight: 600;
}

.start-btn-fancy .btn-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.start-btn-fancy:hover .btn-arrow {
    transform: translateX(5px);
}

.card-footer {
    margin-top: 1.2rem;
    text-align: center;
}

.footer-hint {
    font-size: 0.8rem;
    color: #aab5c0;
}

/* 侧边小卡片 - 分享码查询 */
.test-side-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 18px;
    padding: 1.2rem;
    box-shadow: 0 8px 25px rgba(126, 184, 218, 0.15);
    border: 1px solid rgba(126, 184, 218, 0.2);
    text-align: center;
}

.side-card-icon {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}

.side-card-title {
    font-size: 1rem;
    color: #3d4f5f;
    margin-bottom: 0.2rem;
}

.side-card-desc {
    font-size: 0.8rem;
    color: #8a9bab;
    margin-bottom: 0.8rem;
}

.share-code-input-wrap {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.share-code-input {
    width: 110px;
    padding: 0.6rem 0.8rem;
    border: 2px solid rgba(126, 184, 218, 0.3);
    border-radius: 12px;
    text-align: center;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s;
    letter-spacing: 2px;
}

.share-code-input:focus {
    border-color: #7eb8da;
}

.lookup-btn {
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, #7eb8da, #98d8c8);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.lookup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(126, 184, 218, 0.4);
}

/* 装饰小卡片 */
.test-deco-card {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    animation: floatCard 4s ease-in-out infinite;
}

.deco-emoji {
    font-size: 1.3rem;
}

.deco-text {
    font-size: 0.7rem;
    color: #8a9bab;
    margin-top: 0.2rem;
}

.deco-1 {
    top: 20px;
    left: -60px;
    animation-delay: 0s;
}

.deco-2 {
    top: 50%;
    right: -70px;
    animation-delay: 1s;
}

.deco-3 {
    bottom: 80px;
    left: -50px;
    animation-delay: 2s;
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-10px) rotate(3deg); }
}

/* 移动端隐藏装饰卡片 */
@media (max-width: 600px) {
    .test-deco-card {
        display: none;
    }
    
    .test-cards-container {
        padding: 0 15px;
    }
    
    .test-main-card {
        padding: 1.5rem 1.2rem;
    }
    
    .card-title {
        font-size: 1.8rem;
    }
    
    .info-pills {
        gap: 0.4rem;
    }
    
    .info-pill {
        padding: 0.4rem 0.7rem;
        font-size: 0.8rem;
    }
}

/* ========== 测试进行界面 ========== */
.test-progress-section {
    width: 100%;
    max-width: 600px;
    animation: fadeInUp 0.5s ease;
}

.test-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* 进度环 */
.progress-indicator {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed rgba(126, 184, 218, 0.3);
}

.progress-ring {
    position: relative;
    width: 70px;
    height: 70px;
}

.progress-ring svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.progress-bg {
    fill: none;
    stroke: #f0f0f0;
    stroke-width: 6;
}

.progress-fill {
    fill: none;
    stroke: url(#progressGradient);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.85rem;
    font-weight: 600;
    color: #5a6c7d;
}

.category-tag {
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.3), rgba(126, 184, 218, 0.3));
    border-radius: 15px;
    font-size: 0.85rem;
    color: #5a6c7d;
}

/* 题目区域 */
.question-area {
    margin-bottom: 2rem;
}

.question-text {
    font-size: 1.2rem;
    color: #3d4f5f;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    min-height: 60px;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.option-item {
    padding: 1rem 1.2rem;
    background: rgba(248, 249, 250, 0.8);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    color: #5a6c7d;
    text-align: left;
}

.option-item:hover {
    background: rgba(126, 184, 218, 0.1);
    border-color: rgba(126, 184, 218, 0.3);
    transform: translateX(5px);
}

.option-item.selected {
    background: linear-gradient(135deg, rgba(255, 122, 158, 0.15), rgba(126, 184, 218, 0.15));
    border-color: #ff7a9e;
    color: #3d4f5f;
}

/* 导航按钮 */
.test-nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.nav-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-family);
}

.prev-btn {
    background: rgba(248, 249, 250, 0.9);
    border: 1px solid #ddd;
    color: #5a6c7d;
}

.prev-btn:hover:not(:disabled) {
    background: #f0f0f0;
}

.next-btn {
    background: linear-gradient(135deg, #7eb8da, #98d8c8);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(126, 184, 218, 0.3);
}

.next-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(126, 184, 218, 0.4);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* ========== 结果界面 ========== */
.test-result-section {
    width: 100%;
    max-width: 800px;
    animation: fadeInUp 0.5s ease;
}

/* ========== 新版结果页 - 小清新创意风格 ========== */
.result-card-new {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 30px;
    padding: 2.5rem 2rem;
    box-shadow: 0 15px 50px rgba(255, 150, 180, 0.15);
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 200, 220, 0.3);
    animation: resultCardIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 电脑端优化 */
@media (min-width: 768px) {
    .result-card-new {
        max-width: 520px;
        padding: 2.5rem 3rem;
    }
    
    .score-circle-wrap {
        width: 150px;
        height: 150px;
    }
    
    .score-num {
        font-size: 3.2rem;
    }
    
    .score-label {
        font-size: 1.3rem;
    }
    
    .score-emoji {
        font-size: 2.5rem;
    }
    
    .result-quote {
        font-size: 1.05rem;
        padding: 1rem 1.5rem;
    }
    
    .dim-tag {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .result-btns {
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .result-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
}

@keyframes resultCardIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* 顶部装饰 */
.result-deco {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.deco-star {
    font-size: 1.2rem;
    animation: starTwinkle 1.5s ease-in-out infinite;
}

.deco-star:nth-child(3) { animation-delay: 0.5s; }

.deco-heart {
    font-size: 1.5rem;
    animation: heartFloat 2s ease-in-out infinite;
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

@keyframes heartFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* 核心分数区 */
.result-core {
    position: relative;
    margin-bottom: 1rem;
}

.score-circle-wrap {
    position: relative;
    width: 130px;
    height: 130px;
    margin: 0 auto;
}

.score-circle {
    position: relative;
    width: 100%;
    height: 100%;
}

.score-circle svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.score-track {
    fill: none;
    stroke: rgba(255, 200, 220, 0.3);
    stroke-width: 6;
}

.score-progress {
    fill: none;
    stroke: url(#scoreGradient);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(255, 122, 158, 0.4));
}

.score-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: baseline;
}

.score-num {
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ff7a9e, #ff6b8a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.score-percent {
    font-size: 1rem;
    color: #ffb6c1;
    font-weight: 500;
}

.score-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 150, 180, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glowPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.score-label {
    font-size: 1.1rem;
    color: #ff7a9e;
    font-weight: 600;
    margin-top: 0.5rem;
}

.score-emoji {
    font-size: 2rem;
    margin-top: 0.3rem;
    animation: emojiPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.8s both;
}

@keyframes emojiPop {
    from { opacity: 0; transform: scale(0); }
    to { opacity: 1; transform: scale(1); }
}

/* 一句话描述 */
.result-quote {
    font-size: 0.95rem;
    color: #5a6c7d;
    line-height: 1.6;
    padding: 0.8rem 1rem;
    background: linear-gradient(135deg, rgba(255, 240, 245, 0.8), rgba(240, 248, 255, 0.8));
    border-radius: 15px;
    margin-bottom: 1rem;
    font-style: italic;
}

/* 维度标签云 */
.dimension-tags {
    margin-bottom: 1.2rem;
}

.tags-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.dim-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    font-size: 0.8rem;
    color: #5a6c7d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 200, 220, 0.2);
    animation: tagFadeIn 0.4s ease both;
}

.dim-tag:nth-child(1) { animation-delay: 0.1s; }
.dim-tag:nth-child(2) { animation-delay: 0.15s; }
.dim-tag:nth-child(3) { animation-delay: 0.2s; }
.dim-tag:nth-child(4) { animation-delay: 0.25s; }
.dim-tag:nth-child(5) { animation-delay: 0.3s; }

@keyframes tagFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dim-tag-icon {
    font-size: 0.9rem;
}

.dim-tag-score {
    font-weight: 600;
    color: #ff7a9e;
}

/* 操作按钮 */
.result-btns {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
}

.result-btn {
    padding: 0.6rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
    border: none;
}

.btn-restart {
    background: linear-gradient(135deg, #ff7a9e, #ff8a80);
    color: white;
    box-shadow: 0 3px 12px rgba(255, 122, 158, 0.3);
}

.btn-restart:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(255, 122, 158, 0.4);
}

.btn-share {
    background: linear-gradient(135deg, #7eb8da, #98d8c8);
    color: white;
}

.btn-share:hover {
    transform: translateY(-2px);
}

.btn-home {
    background: rgba(248, 249, 250, 0.9);
    color: #5a6c7d;
    border: 1px solid rgba(200, 200, 200, 0.5);
}

.btn-home:hover {
    background: white;
}

/* 移动端适配 */
@media (max-width: 480px) {
    .result-card-new {
        padding: 1.5rem 1rem;
        margin: 0 10px;
    }
    
    .score-circle-wrap {
        width: 110px;
        height: 110px;
    }
    
    .score-num {
        font-size: 2.2rem;
    }
    
    .result-btns {
        flex-wrap: wrap;
    }
    
    .result-btn {
        flex: 1;
        min-width: 80px;
    }
}

.home-btn:hover {
    background: #f0f0f0;
}

/* ========== 加载和错误状态 ========== */
.test-loading-section,
.test-error-section {
    text-align: center;
    animation: fadeInUp 0.5s ease;
}

.loading-card,
.error-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 3rem 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 0 auto;
}

.loading-heart {
    font-size: 4rem;
    animation: heartPulse 1s ease-in-out infinite;
}

.loading-text {
    margin-top: 1rem;
    color: #8a9bab;
}

.error-icon {
    font-size: 4rem;
}

.error-card h2 {
    color: #3d4f5f;
    margin: 1rem 0 0.5rem;
}

.error-card p {
    color: #8a9bab;
    margin-bottom: 1.5rem;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .test-main {
        padding: 80px 15px 30px;
    }
    
    .test-title {
        font-size: 2rem;
    }
    
    .test-features {
        gap: 0.8rem;
    }
    
    .feature-item {
        padding: 0.5rem 0.8rem;
    }
    
    .test-card,
    .result-card {
        padding: 1.5rem;
    }
    
    .progress-indicator {
        flex-direction: column;
        text-align: center;
    }
    
    .scores-grid {
        grid-template-columns: 1fr;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
    }
}

@media (max-width: 375px) {
    .test-heart-icon {
        font-size: 4rem;
    }
    
    .test-title {
        font-size: 1.8rem;
    }
    
    .question-text {
        font-size: 1.1rem;
    }
}


/* ========== 登录/注册弹窗 ========== */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.auth-modal.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.auth-modal-content {
    position: relative;
    width: 90%;
    max-width: 360px;
    padding: 2rem;
    border-radius: 24px;
    animation: authSlideIn 0.4s ease;
}

@keyframes authSlideIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
}

.auth-header h3 {
    font-size: 1.5rem;
    color: #3d4f5f;
    margin-bottom: 0.3rem;
}

.auth-header p {
    font-size: 0.9rem;
    color: #8a9bab;
}

.auth-input-group {
    margin-bottom: 1rem;
}

.auth-input-group input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 2px solid rgba(126, 184, 218, 0.3);
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.auth-input-group input:focus {
    border-color: #ff7a9e;
}

.auth-submit-btn {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, #ff7a9e, #ff8a80);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 122, 158, 0.4);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-switch {
    text-align: center;
    font-size: 0.9rem;
    color: #8a9bab;
}

.auth-switch a {
    color: #ff7a9e;
    text-decoration: none;
    font-weight: 500;
}

/* ========== 排行榜弹窗 ========== */
.ranking-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.ranking-modal.active {
    opacity: 1;
    visibility: visible;
}

.ranking-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.ranking-modal-content {
    position: relative;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    padding: 1.5rem;
    border-radius: 24px;
    animation: authSlideIn 0.4s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ranking-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    z-index: 10;
}

.ranking-header {
    text-align: center;
    margin-bottom: 1rem;
}

.ranking-icon {
    font-size: 2.5rem;
}

.ranking-header h3 {
    font-size: 1.3rem;
    color: #3d4f5f;
    margin: 0.3rem 0;
}

.ranking-total {
    font-size: 0.85rem;
    color: #8a9bab;
}

.ranking-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

.ranking-rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 50%;
    background: #f0f0f0;
    color: #666;
}

.ranking-item:nth-child(1) .ranking-rank {
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: white;
}

.ranking-item:nth-child(2) .ranking-rank {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: white;
}

.ranking-item:nth-child(3) .ranking-rank {
    background: linear-gradient(135deg, #cd7f32, #b87333);
    color: white;
}

.ranking-avatar {
    font-size: 1.5rem;
}

.ranking-info {
    flex: 1;
}

.ranking-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #3d4f5f;
}

.ranking-level {
    font-size: 0.75rem;
    color: #8a9bab;
}

.ranking-score {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ff7a9e;
}

.ranking-loading {
    text-align: center;
    padding: 2rem;
    color: #8a9bab;
}

/* 排行榜按钮 */
.ranking-btn {
    position: fixed;
    right: 20px;
    bottom: 240px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #ffb700);
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 183, 0, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
}

.ranking-btn:hover {
    transform: scale(1.1);
}

/* 用户状态显示 */
.user-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    font-size: 0.85rem;
}

.user-avatar {
    font-size: 1.2rem;
}

.user-name {
    color: #3d4f5f;
    font-weight: 500;
}

@media (max-width: 480px) {
    .ranking-btn {
        right: 15px;
        bottom: 220px;
        width: 45px;
        height: 45px;
    }
}


/* ========== 结果页用户信息 ========== */
.result-user-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 0.8rem 1.2rem;
    background: linear-gradient(135deg, rgba(255, 245, 250, 0.8), rgba(240, 248, 255, 0.8));
    border-radius: 15px;
    margin: 1rem auto;
    max-width: 95%;
    border: 1px solid rgba(255, 200, 220, 0.2);
}

.result-user-info span {
    display: inline-flex;
    align-items: center;
    font-size: 0.8rem;
    color: #7a8a9a;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .result-user-info {
        flex-direction: column;
        gap: 4px;
    }
    
    .result-user-info span {
        margin-right: 0 !important;
    }
}


/* ========== 侧边卡片组 ========== */
.side-cards-wrap {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.side-cards-wrap .test-side-card {
    flex: 1;
}

/* 排行榜项可点击样式 */
.ranking-item:hover {
    background: rgba(255, 240, 245, 0.8);
    transform: translateX(5px);
}

/* 移动端侧边卡片垂直排列 */
@media (max-width: 480px) {
    .side-cards-wrap {
        flex-direction: column;
    }
}
