/* 重置与基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* 首页样式 */
.main-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.decoration {
    position: absolute;
    font-size: 40px;
    opacity: 0.1;
    z-index: 0;
}

.top-left { top: 10px; left: 10px; }
.top-right { top: 10px; right: 10px; }
.bottom-left { bottom: 10px; left: 10px; }
.bottom-right { bottom: 10px; right: 10px; }

.year-badge {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    border-radius: 50px;
    font-weight: bold;
    margin-bottom: 20px;
}

.year {
    font-size: 24px;
    margin-right: 8px;
}

.year-text {
    font-size: 14px;
}

.main-title {
    font-size: 2.8rem;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.title-part {
    display: inline-block;
}

.highlight {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
}

.intro-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.intro-icon {
    font-size: 40px;
    color: #ff6b6b;
}

.intro-content h3 {
    margin-bottom: 10px;
    color: #333;
}

.intro-content ul {
    list-style: none;
}

.intro-content li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.intro-content li i {
    margin-right: 10px;
    color: #ff6b6b;
    width: 20px;
}

.horse-types-preview {
    margin-bottom: 30px;
}

.horse-types-preview h3 {
    margin-bottom: 15px;
    color: #333;
}

.types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
}

.type-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    color: white;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.type-item:hover {
    transform: translateY(-5px);
}

.type-icon {
    font-size: 30px;
    margin-bottom: 8px;
}

.type-name {
    font-size: 14px;
    font-weight: bold;
}

.start-section {
    text-align: center;
    margin: 40px 0;
}

.start-btn {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(255, 107, 107, 0.4);
}

.test-info {
    margin-top: 15px;
    color: #666;
    font-size: 14px;
}

.test-info i {
    margin-right: 5px;
}

.count {
    font-weight: bold;
    color: #ff6b6b;
}

.social-share {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.share-btn {
    padding: 10px 20px;
    border-radius: 50px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.share-btn.wechat {
    background: #09bb07;
    color: white;
}

.share-btn.xiaohongshu {
    background: #ff2442;
    color: white;
}

.share-btn.weibo {
    background: #e6162d;
    color: white;
}

.share-btn:hover {
    transform: translateY(-3px);
}

.footer-note {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
}

/* 题目页样式 */
.progress-container {
    background: #f0f0f0;
    border-radius: 10px;
    height: 20px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.progress-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.progress-percent {
    color: #ff6b6b;
}

.quiz-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.question-number {
    display: flex;
    align-items: center;
    gap: 10px;
}

.q-icon {
    font-size: 24px;
}

.q-num {
    font-size: 24px;
    font-weight: bold;
    color: #ff6b6b;
}

.question-type {
    background: #f0f0f0;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 14px;
}

.question-text {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #333;
    line-height: 1.4;
}

.options-form {
    margin-bottom: 30px;
}

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

.option-card {
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.option-card:hover {
    border-color: #ff8e8e;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.option-card.selected {
    border-color: #ff6b6b;
    background: #fff5f5;
}

.option-card input[type="radio"] {
    display: none;
}

.option-content {
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 15px;
}

.option-letter {
    background: #f0f0f0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
}

.option-card.selected .option-letter {
    background: #ff6b6b;
    color: white;
}

.option-text {
    flex-grow: 1;
    font-size: 1.1rem;
}

.checkmark {
    color: #ff6b6b;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.option-card.selected .checkmark {
    opacity: 1;
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.nav-btn {
    padding: 12px 30px;
    border-radius: 50px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.prev-btn {
    background: #f0f0f0;
    color: #666;
}

.next-btn {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
}

.nav-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.nav-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.quiz-tip {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 15px;
    font-size: 14px;
    color: #666;
    border-left: 4px solid #ff6b6b;
}

.quiz-tip i {
    color: #ff6b6b;
    margin-right: 8px;
}

.quiz-footer {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-top: 20px;
}

/* 结果页样式 */
.result-container {
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.confetti {
    position: absolute;
    font-size: 30px;
    animation: fall 3s linear forwards;
}

@keyframes fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.result-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.result-header {
    text-align: center;
    margin-bottom: 30px;
}

.result-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 2.5rem;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.result-icon {
    font-size: 3rem;
}

.result-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 15px;
}

.match-percent {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-weight: bold;
}

.result-description {
    margin-bottom: 30px;
}

.result-text {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    line-height: 1.6;
}

.element-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 50px;
    color: white;
    font-weight: bold;
}

.element-icon {
    font-size: 20px;
}

.result-chart {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

.result-chart h3 {
    margin-bottom: 20px;
    color: #333;
}

.chart-container {
    width: 100%;
    max-width: 300px;
    margin: 0 auto 20px;
    height: 300px;
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: white;
    border-radius: 10px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.legend-name {
    flex-grow: 1;
    font-weight: bold;
}

.legend-score {
    color: #666;
}

.detailed-analysis {
    margin-bottom: 30px;
}

.detailed-analysis h3 {
    margin-bottom: 20px;
    color: #333;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.analysis-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

.analysis-card:hover {
    transform: translateY(-5px);
}

.analysis-icon {
    font-size: 30px;
    margin-bottom: 15px;
}

.analysis-card h4 {
    margin-bottom: 10px;
    color: #333;
}

.analysis-card p {
    color: #666;
    font-size: 14px;
}

.fortune-advice {
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #fff5f5, #fff);
    border-radius: 15px;
    border-left: 5px solid #ff6b6b;
}

.fortune-advice h3 {
    margin-bottom: 20px;
    color: #333;
}

.advice-content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.advice-content ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.advice-content li {
    margin-bottom: 10px;
}

.advice-tip {
    background: white;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #ff6b6b;
    font-weight: bold;
}

.horse-match {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 15px;
}

.horse-match h3 {
    margin-bottom: 15px;
    color: #333;
}

.match-type {
    font-weight: bold;
    color: #ff6b6b;
}

.match-users {
    margin: 20px 0;
}

.match-user {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 15px;
    margin-bottom: 15px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.user-info {
    flex-grow: 1;
}

.user-name {
    font-weight: bold;
}

.user-match {
    font-size: 14px;
    color: #666;
}

.match-btn {
    background: #f0f0f0;
    border: none;
    padding: 8px 15px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.match-btn:hover {
    background: #ff6b6b;
    color: white;
}

.match-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 200px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-weight: bold;
}

.action-btn.secondary {
    background: #f0f0f0;
    color: #333;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.share-section {
    margin-bottom: 30px;
    padding: 25px;
    background: white;
    border-radius: 15px;
    border: 2px dashed #e0e0e0;
}

.share-section h3 {
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.share-result-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-radius: 15px;
    color: white;
    margin: 20px 0;
}

.share-result-icon {
    font-size: 40px;
}

.share-result-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.share-result-desc {
    font-size: 1rem;
    opacity: 0.9;
}

.share-result-id {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 5px;
}

.result-share {
    justify-content: center;
}

.result-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.retake-btn, .home-btn {
    flex: 1;
    min-width: 150px;
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-weight: bold;
}

.retake-btn {
    background: #f0f0f0;
    color: #333;
}

.home-btn {
    background: #333;
    color: white;
}

.retake-btn:hover, .home-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.result-footer {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: #ff6b6b;
    text-decoration: none;
    margin: 0 5px;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .main-card, .quiz-card, .result-card {
        padding: 20px;
    }
    
    .main-title {
        font-size: 2rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .intro-card {
        flex-direction: column;
        text-align: center;
    }
    
    .intro-icon {
        align-self: center;
    }
    
    .types-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .start-btn {
        width: 100%;
        padding: 15px 20px;
    }
    
    .question-text {
        font-size: 1.3rem;
    }
    
    .option-content {
        padding: 15px;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .action-btn {
        min-width: 100%;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
    }
    
    .result-title {
        font-size: 1.8rem;
        flex-direction: column;
    }
    
    .result-icon {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .types-grid {
        grid-template-columns: 1fr;
    }
    
    .horse-types-preview h3, 
    .detailed-analysis h3,
    .fortune-advice h3,
    .horse-match h3,
    .share-section h3 {
        text-align: center;
    }
}
/* 添加以下样式到 style.css */
.user-info {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.welcome-text {
    font-size: 14px;
    color: #666;
}

.logout-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

.logout-btn:hover {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.login-time {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* 在 style.css 末尾添加以下样式 */

/* 新特性网格 */
.features {
    margin: 30px 0;
}

.features h3 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #ff6b6b;
}

.feature-icon {
    font-size: 30px;
    margin-bottom: 15px;
}

.feature-item h4 {
    margin-bottom: 10px;
    color: #333;
}

.feature-item p {
    color: #666;
    font-size: 14px;
}

/* 类型描述 */
.type-desc {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 5px;
}

/* 打印按钮 */
.print-btn {
    background: #4dabf7 !important;
    color: white !important;
}

/* 动画延迟 */
.animate__animated {
    animation-duration: 0.6s;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}