﻿/* iOS 双击缩放禁止 */
html, body {
    touch-action: manipulation;
    -ms-touch-action: manipulation;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 禁止 iOS 双击放大 */
* {
    -webkit-tap-highlight-color: transparent;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b35;
    --secondary-color: #f7c548;
    --bg-dark: #1a1a2e;
    --bg-card: #16213e;
    --bg-light: #0f3460;
    --text-white: #ffffff;
    --text-gray: #b8b8b8;
    --success: #4ecca3;
    --danger: #e74c3c;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: url('bg.png') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-white);
    min-height: 100vh;
    line-height: 1.6;
    touch-action: manipulation;
    overscroll-behavior: none;
}

/* 缁撴灉椤甸潰鍏佽婊氬姩 */
#result-page {
    overflow-y: auto;
    min-height: 100vh;
    padding-bottom: 20px;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* 鍒嗕韩閫夐」妯℃€佹鏍峰紡 */
.share-options-card {
    max-width: 400px;
}

.share-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
}

@media (max-width: 480px) {
    .share-options-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.share-option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
    font-size: 0.9rem;
}

.share-option-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #f5576c;
    transform: translateY(-3px);
}

.share-option-btn:active {
    transform: translateY(0);
}

.share-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.share-label {
    font-weight: 600;
    margin-bottom: 4px;
}

.share-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

.wx-share-btn:hover {
    border-color: #07c160;
    background: rgba(7, 193, 96, 0.1);
}

.system-share-btn:hover {
    border-color: #2196f3;
    background: rgba(33, 150, 243, 0.1);
}

.copy-share-btn:hover {
    border-color: #ff9800;
    background: rgba(255, 152, 0, 0.1);
}

.share-cancel-btn {
    width: 100%;
    margin-top: 10px;
}

/* 棣栭〉鏍峰紡 */
.header {
    text-align: center;
    padding: 20px 0 15px 0;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.4);
    border: 3px solid rgba(255, 107, 53, 0.3);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    text-shadow: 0 4px 20px rgba(245, 87, 108, 0.3);
}

.header h2 {
    font-size: 1.8rem;
    color: var(--text-white);
    margin-bottom: 15px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.tagline {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.info-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    margin: 15px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.info-card ul {
    list-style: none;
    margin-bottom: 20px;
}

.info-card li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: var(--text-gray);
}

.info-card li::before {
    content: '鉁?;
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

.info-card li strong {
    color: var(--primary-color);
}

.score-rule {
    background: var(--bg-light);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.score-rule h4 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.score-rule p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.start-btn {
    width: 100%;
    padding: 16px;
    background: var(--gradient-2);
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(245, 87, 108, 0.4);
    margin: 15px 0;
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(245, 87, 108, 0.5);
}

.start-btn:active {
    transform: translateY(-1px);
}

.footer-note {
    text-align: center;
    color: var(--text-gray);
    font-size: 0.85rem;
    padding: 10px 0;
}

/* 绛旈椤垫牱寮?*/
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-light);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress {
    height: 100%;
    background: var(--gradient-3);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.question-count {
    text-align: center;
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.question-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.question-text {
    font-size: 1.2rem;
    line-height: 1.7;
    margin-bottom: 25px;
    color: var(--text-white);
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    padding: 18px 20px;
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--text-white);
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

/* 閫夐」 A - 绾㈣壊 */
.option-btn:nth-child(1) {
    background: linear-gradient(135deg, rgba(245, 87, 108, 0.15), rgba(245, 87, 108, 0.05));
    border-left: 4px solid #f5576c;
}
.option-btn:nth-child(1):hover {
    background: linear-gradient(135deg, rgba(245, 87, 108, 0.25), rgba(245, 87, 108, 0.1));
    border-left-color: #ff6b7a;
}
.option-btn:nth-child(1).selected {
    background: linear-gradient(135deg, rgba(245, 87, 108, 0.3), rgba(245, 87, 108, 0.15));
    border-left-color: #f5576c;
    border-right: 2px solid #f5576c;
}

/* 閫夐」 B - 钃濊壊 */
.option-btn:nth-child(2) {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.15), rgba(79, 172, 254, 0.05));
    border-left: 4px solid #4facfe;
}
.option-btn:nth-child(2):hover {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.25), rgba(79, 172, 254, 0.1));
    border-left-color: #5ebcff;
}
.option-btn:nth-child(2).selected {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.3), rgba(79, 172, 254, 0.15));
    border-left-color: #4facfe;
    border-right: 2px solid #4facfe;
}

/* 閫夐」 C - 缁胯壊 */
.option-btn:nth-child(3) {
    background: linear-gradient(135deg, rgba(66, 201, 144, 0.15), rgba(66, 201, 144, 0.05));
    border-left: 4px solid #42c990;
}
.option-btn:nth-child(3):hover {
    background: linear-gradient(135deg, rgba(66, 201, 144, 0.25), rgba(66, 201, 144, 0.1));
    border-left-color: #56d4a3;
}
.option-btn:nth-child(3).selected {
    background: linear-gradient(135deg, rgba(66, 201, 144, 0.3), rgba(66, 201, 144, 0.15));
    border-left-color: #42c990;
    border-right: 2px solid #42c990;
}

/* 閫夐」 D - 姗欒壊 */
.option-btn:nth-child(4) {
    background: linear-gradient(135deg, rgba(255, 151, 76, 0.15), rgba(255, 151, 76, 0.05));
    border-left: 4px solid #ff974c;
}
.option-btn:nth-child(4):hover {
    background: linear-gradient(135deg, rgba(255, 151, 76, 0.25), rgba(255, 151, 76, 0.1));
    border-left-color: #ffa75e;
}
.option-btn:nth-child(4).selected {
    background: linear-gradient(135deg, rgba(255, 151, 76, 0.3), rgba(255, 151, 76, 0.15));
    border-left-color: #ff974c;
    border-right: 2px solid #ff974c;
}

.option-btn.selected::after {
    content: '鉁?;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.option-label {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-right: 10px;
}

.nav-buttons {
    display: flex;
    gap: 15px;
}

.nav-btn {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prev-btn {
    background: var(--bg-light);
    color: var(--text-white);
}

.prev-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.prev-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.next-btn {
    background: var(--gradient-3);
    color: white;
}

.next-btn:hover {
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.4);
}

/* 缁撴灉椤垫牱寮?*/
.result-header {
    text-align: center;
    padding: 20px 0;
}

.result-header h2 {
    font-size: 1.5rem;
    color: var(--text-gray);
}

.result-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 30px;
    margin: 20px 0;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(245, 87, 108, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.personality-icon {
    font-size: 5rem;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.personality-title {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.personality-subtitle {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.score-display {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 10px 0;
}

.score-label {
    display: none;
}

.score-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    background: none;
    -webkit-text-fill-color: white;
}

.personality-desc {
    color: var(--text-gray);
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.result-details {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 25px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-details h3 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

/* 璇︾粏鍒嗘瀽鍖哄煙 */
.analysis-section {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    margin: 15px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.analysis-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.analysis-item {
    background: var(--bg-light);
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    border-left: 3px solid var(--primary-color);
}

.analysis-label {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin-bottom: 8px;
}

.analysis-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.share-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.share-btn,
.restart-btn {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.share-btn {
    background: var(--gradient-4);
    color: white;
}

.share-btn:hover {
    box-shadow: 0 8px 30px rgba(67, 233, 123, 0.4);
    transform: translateY(-2px);
}

.restart-btn {
    background: var(--bg-light);
    color: var(--text-white);
}

.restart-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 鍝嶅簲寮忎紭鍖?*/
@media (max-width: 360px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .header h2 {
        font-size: 1.5rem;
    }
    
    .question-text {
        font-size: 1.1rem;
    }
    
    .option-btn {
        padding: 15px;
        font-size: 0.95rem;
    }
    
    .personality-title {
        font-size: 1.5rem;
    }
    
    .score-value {
        font-size: 2rem;
    }
}

/* 浜烘牸绫诲瀷棰滆壊 */
.type-s-rush {
    --type-gradient: var(--gradient-2);
}

.type-b-camper {
    --type-gradient: var(--gradient-1);
}

.type-t-leader {
    --type-gradient: var(--gradient-3);
}

.type-i-chill {
    --type-gradient: var(--gradient-4);
}

/* 鍔犺浇鍔ㄧ敾 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 鑷畾涔夌‘璁ゅ璇濇 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 30px;
    max-width: 320px;
    width: 90%;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 10px;
}

.modal-desc {
    font-size: 0.95rem;
    color: var(--text-gray);
    margin-bottom: 25px;
    line-height: 1.6;
}

.modal-buttons {
    display: flex;
    gap: 12px;
}

.modal-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn-cancel {
    background: var(--bg-light);
    color: var(--text-white);
}

.modal-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-btn-confirm {
    background: var(--gradient-2);
    color: white;
}

.modal-btn-confirm:hover {
    box-shadow: 0 8px 30px rgba(245, 87, 108, 0.4);
    transform: translateY(-2px);
}

/* 鎻愮ず瀵硅瘽妗嗙壒娈婃牱寮?*/
#alert-modal .modal-icon {
    font-size: 3.5rem;
}

#alert-modal .modal-buttons {
    justify-content: center;
}

#alert-modal .modal-btn {
    min-width: 120px;
}

/* ========== 缁撴灉椤甸潰绉诲姩绔竴灞忎紭鍖?========== */
@media (max-height: 850px) {
    /* 鍘嬬缉缁撴灉椤甸潰鏁翠綋闂磋窛 */
    #result-page {
        padding-bottom: 10px;
    }
    
    /* 缁撴灉澶撮儴 */
    .result-header {
        padding: 5px 0;
    }
    
    .result-header h2 {
        font-size: 1.1rem;
    }
    
    /* 缁撴灉鍗＄墖 */
    .result-card {
        padding: 12px 10px;
        margin: 6px 0;
    }
    
    /* 浜烘牸鍥炬爣 */
    .personality-icon {
        font-size: 2.8rem;
        margin-bottom: 4px;
    }
    
    /* 浜烘牸鏍囬 */
    .personality-title {
        font-size: 1.2rem;
        margin-bottom: 3px;
    }
    
    /* 浜烘牸鍓爣棰?*/
    .personality-subtitle {
        font-size: 0.7rem;
        margin-bottom: 4px;
    }
    
    /* 浜烘牸鎻忚堪 - 淇濇寔瀹屾暣鏄剧ず */
    .personality-desc {
        font-size: 0.68rem;
        line-height: 1.35;
        margin-top: 4px;
    }
    
    /* 鍒嗘暟鏄剧ず */
    .score-display {
        margin: 6px 0;
    }
    
    .score-label {
        font-size: 0.65rem;
        margin-bottom: 2px;
    }
    
    .score-value {
        font-size: 1.7rem;
    }
    
    /* 璇︾粏鍒嗘瀽 */
    .result-details {
        margin-top: 8px;
    }
    
    .result-details h3 {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }
    
    /* 鍒嗘瀽缃戞牸 */
    .analysis-grid {
        gap: 6px;
    }
    
    .analysis-item {
        padding: 6px 5px;
    }
    
    .analysis-label {
        font-size: 0.6rem;
        margin-bottom: 2px;
    }
    
    .analysis-value {
        font-size: 0.75rem;
    }
    
    /* 鍒嗕韩鎸夐挳 */
    .share-section {
        margin-top: 8px;
        gap: 6px;
    }
    
    .share-btn, .restart-btn {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    /* 椤佃剼 */
    .footer-note {
        margin-top: 6px;
        padding: 6px;
    }
    
    .footer-note p {
        font-size: 0.6rem;
    }
}

/* ========== 娴锋姤妯℃€佹鏍峰紡 ========== */
.poster-modal-card {
    max-width: 90%;
    width: 90%;
    padding: 10px;
    position: relative;
    max-height: 90vh;
    overflow: auto;
}

.poster-container {
    width: 400px;
    max-width: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    padding: 25px 20px;
    margin: 0 auto;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
    flex-shrink: 0;
}

.poster-header {
    margin-bottom: 15px;
}

.poster-title {
    font-size: 1.1rem;
    font-weight: 900;
    color: #ffffff;
    margin: 0;
}
.poster-title-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
    border: 2px solid rgba(255, 107, 53, 0.3);
    vertical-align: middle;
    margin-right: 8px;
}
.poster-logo {
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.poster-logo-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    border: 2px solid rgba(255, 107, 53, 0.3);
    display: block;
    transform: translateZ(0);
}

.poster-subtitle {
    font-size: 0.7rem;
    color: #a0a0b0;
    margin-top: 3px;
}

.poster-content {
    margin: 15px 0;
}

.poster-icon {
    font-size: 4rem;
    margin-bottom: 8px;
}

.poster-personality {
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffffff;
    margin: 8px 0;
}

.poster-score {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    margin: 8px 0;
}

.poster-desc {
    font-size: 0.75rem;
    color: #a0a0b0;
    line-height: 1.5;
    margin: 10px 0;
    text-align: left;
}

.poster-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 15px;
}

.poster-stat {
    background: var(--bg-light);
    padding: 12px 8px;
    border-radius: 8px;
    text-align: center;
}

.poster-stat-label {
    font-size: 0.7rem;
    color: var(--text-gray);
    margin-bottom: 5px;
}

.poster-stat-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
}

.poster-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 娓告垙椋庢牸寤鸿鍖哄煙 */
.game-style-section {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    margin: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.game-style-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
    text-align: center;
}

.game-style-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.style-item {
    background: var(--bg-light);
    padding: 12px;
    border-radius: 10px;
    border-left: 3px solid var(--primary-color);
    transition: all 0.3s ease;
}

.style-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.style-label {
    font-size: 0.75rem;
    color: var(--text-gray);
    margin-bottom: 6px;
    font-weight: 600;
}

.style-value {
    font-size: 0.9rem;
    color: var(--text-white);
    line-height: 1.4;
    font-weight: 500;
}

/* 娴锋姤 footer 鍐呯殑鏍峰紡 */
.poster-footer .game-style-section {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 12px;
    margin-top: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.poster-footer .game-style-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 12px;
}

.poster-footer .game-style-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.poster-footer .style-item {
    background: var(--bg-light);
    padding: 10px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.poster-footer .style-label {
    font-size: 0.65rem;
    color: var(--text-gray);
    margin-bottom: 4px;
}

.poster-footer .style-value {
    font-size: 0.75rem;
    color: var(--text-white);
    line-height: 1.3;
}

.poster-analysis-section {
    flex: 1;
    min-width: 200px;
    text-align: left;
}

.poster-analysis-title {
    font-size: 0.65rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
}

.poster-analysis-grid {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.poster-analysis-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.55rem;
    color: #a0a0b0;
    white-space: nowrap;
}

.poster-analysis-icon {
    font-size: 0.6rem;
}

.poster-analysis-text {
    line-height: 1.3;
}

.poster-qrcode-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.poster-qrcode-img {
    width: 80px;
    height: 80px;
    image-rendering: pixelated;
}

.poster-qrcode-tip {
    font-size: 0.55rem;
    color: #a0a0b0;
    text-align: center;
}

.poster-copyright {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
}

.poster-copyright p {
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-weight: 500;
}

.result-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 8px;
    border-radius: 50%;
}

/* 缁撴灉椤甸潰 - 娴锋姤椋庢牸甯冨眬 */
.result-header {
    text-align: center;
    padding: 15px 0 10px 0;
}

.result-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.result-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    border: 2px solid rgba(255, 107, 53, 0.3);
}

.result-title {
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffffff;
    margin: 8px 0;
}

.result-subtitle {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin: 5px 0;
}

.result-content {
    margin: 15px 0;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 8px;
    text-align: center;
}

.result-personality {
    font-size: 1.3rem;
    font-weight: 900;
    color: #ffffff;
    margin: 8px 0;
    text-align: center;
}

.result-personality-subtitle {
    font-size: 0.9rem;
    color: #a0a0b0;
    margin-top: 5px;
    text-align: center;
}

.result-score {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 10px 0;
}

.result-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-gray);
    margin: 15px 0;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 15px;
}

.result-footer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.result-analysis-section {
    margin: 10px 0;
}

.result-analysis-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 10px;
}

.result-analysis-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 缁撴灉椤甸潰缁熻椤?- 娴锋姤椋庢牸 */
.result-stat {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-stat-label {
    font-size: 0.75rem;
    color: var(--text-gray);
    margin-bottom: 3px;
}

.result-stat-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-white);
}


/* 娴锋姤闀挎寜淇濆瓨鎻愮ず */
.poster-longpress-hint {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    z-index: 10;
    pointer-events: none;
    opacity: 0.8;
}

/* 海报容器添加长按样式 - 仅在海报模态框内禁止触摸 */
#poster-modal .poster-container {
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

/* 结果页面内的 poster-container 允许滚动 */
#result-page .poster-container {
    touch-action: auto;
    user-select: text;
    -webkit-user-select: text;
    -webkit-touch-callout: default;
}

/* 长按时的视觉反馈 */
.poster-container.longpress-active {
    opacity: 0.8;
    transform: scale(0.98);
    transition: all 0.2s;
}

/* ========== 海报操作按钮样式 ========== */
.poster-action-buttons {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.poster-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    min-width: 120px;
}

.poster-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.poster-btn.preview-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.poster-btn.generate-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.poster-btn.share-result-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* 海报容器优化 */
#poster-container {
    position: relative;
    max-width: 100%;
    overflow: hidden;
}

#poster-container canvas {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    touch-action: pinch-zoom;
}

/* 海报生成 loading 样式 */
#poster-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#poster-loading-overlay.active {
    display: flex;
    opacity: 1;
}

.poster-loading-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    padding: 40px 60px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.poster-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.poster-loading-text {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
}

/* 海报预览弹层样式 */
#poster-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#poster-preview-overlay.active {
    display: flex;
    opacity: 1;
}

.poster-preview-card {
    background: #1a1a2e;
    border-radius: 16px;
    max-width: 440px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.poster-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.poster-preview-title {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
}

.poster-preview-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.poster-preview-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.poster-preview-body {
    padding: 16px 0;
    flex: 1;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.poster-preview-img {
    max-width: 90%;
    height: auto;
    display: block;
    margin: 0 auto;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.poster-preview-tip {
    padding: 12px 20px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 480px) {
    .poster-preview-card {
        max-height: 95vh;
    }
    
    .poster-preview-img {
        max-height: 70vh;
    }
}
