/**
 * Veni-Vidi-Vici 游戏样式
 */

/* 🆕 Stage 3: 下注前声明弹窗样式 */
.chao-bet-warning-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chao-bet-warning-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.chao-bet-warning-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chao-bet-warning-header {
    text-align: center;
    margin-bottom: 30px;
}

.chao-bet-warning-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}

.chao-bet-warning-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.chao-bet-warning-body {
    font-size: 16px;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 30px;
}

.chao-bet-warning-body p {
    margin: 10px 0;
}

.chao-bet-warning-body strong {
    color: #1f2937;
    font-weight: 600;
}

.chao-bet-warning-actions {
    text-align: center;
}

.chao-bet-confirm-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.chao-bet-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.chao-bet-confirm-btn:active {
    transform: translateY(0);
}

/* 🆕 Stage 5: 下注确认层样式 */
.chao-bet-confirmation-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chao-bet-confirmation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.chao-bet-confirmation-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    max-width: 700px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    animation: modalSlideIn 0.3s ease-out;
}

.chao-bet-confirmation-header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 20px;
}

.chao-bet-confirmation-header h3 {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.chao-bet-confirmation-body {
    font-size: 16px;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 30px;
}

.chao-bet-confirmation-body p {
    margin: 15px 0;
}

.chao-bet-summary-item {
    background: #f9fafb;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 4px solid #667eea;
}

.chao-bet-summary-item strong {
    color: #1f2937;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.chao-bet-regret-hint {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
}

.chao-bet-regret-hint strong {
    color: #856404;
}

.chao-bet-regret-hint p {
    color: #856404;
    margin-top: 8px;
    margin-bottom: 0;
}

.chao-bet-confirmation-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.chao-bet-cancel-btn {
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #e5e7eb;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.chao-bet-cancel-btn:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

/* 🆕 砝码投掷交互样式 */
.chao-coin-pool-container {
    margin: 30px 0;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

.chao-coin-pool-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.chao-coin-pool-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.chao-coin-count {
    font-size: 16px;
    font-weight: 600;
    color: #3b82f6;
}

.chao-coin-count-value {
    font-size: 24px;
    color: #1f2937;
}

.chao-coin-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    min-height: 60px;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
}

.chao-coin {
    font-size: 24px;
    transition: all 0.3s;
    cursor: default;
    opacity: 1;
    transform: scale(1);
}

.chao-coin.chao-coin-used {
    opacity: 0.3;
    transform: scale(0.8);
}

.chao-flying-coin {
    pointer-events: none;
    will-change: transform, left, top;
}

/* 🆕 路径投掷区域样式 */
.chao-path-toss-areas {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 30px 0;
}

.chao-path-toss-area {
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.chao-path-toss-area:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.chao-path-toss-area.chao-path-receiving {
    animation: pathReceive 0.3s ease-out;
    border-color: #10b981;
    background: #f0fdf4;
}

@keyframes pathReceive {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

.chao-path-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.chao-path-code {
    font-size: 32px;
    font-weight: 700;
    color: #3b82f6;
    line-height: 1;
}

.chao-path-name {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

.chao-path-description {
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
    margin-bottom: 12px;
}

.chao-path-attributes {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.chao-path-attr {
    padding: 4px 12px;
    background: #f3f4f6;
    border-radius: 12px;
    font-size: 12px;
    color: #374151;
    font-weight: 500;
}

.chao-path-toss-count {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.chao-toss-count-value {
    font-size: 32px;
    font-weight: 700;
    color: #3b82f6;
    line-height: 1;
}

.chao-toss-count-label {
    font-size: 14px;
    color: #6b7280;
}

.chao-path-toss-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.chao-path-toss-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 4px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 🆕 资源摘要样式 */
.chao-resource-summary {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    margin: 20px 0;
}

.chao-summary-item {
    text-align: center;
}

.chao-summary-label {
    display: block;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 4px;
}

.chao-summary-value {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
}

/* 游戏容器 */
#chao-game-root .chao-game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 游戏头部 */
#chao-game-root .chao-game-header {
    text-align: center;
    margin-bottom: 30px;
}

#chao-game-root .chao-game-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
}

#chao-game-root .chao-game-header p {
    font-size: 16px;
    color: #6b7280;
}

/* 命运投资局 - 资源分配 */
#chao-game-root .pn-resource-allocation {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

#chao-game-root .pn-resource-item {
    padding: 20px;
    background: #f9fafb;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
    transition: all 0.3s;
}

#chao-game-root .pn-resource-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

#chao-game-root .pn-resource-label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

#chao-game-root .pn-resource-icon {
    font-size: 24px;
}

#chao-game-root .pn-resource-name {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

#chao-game-root .pn-resource-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

#chao-game-root .pn-resource-controls button {
    width: 36px;
    height: 36px;
    border: 2px solid #3b82f6;
    background: #fff;
    color: #3b82f6;
    border-radius: 6px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

#chao-game-root .pn-resource-controls button:hover {
    background: #3b82f6;
    color: #fff;
}

#chao-game-root .pn-resource-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#chao-game-root .pn-resource-input {
    width: 60px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px;
}

#chao-game-root .pn-resource-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

#chao-game-root .pn-resource-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
    transition: width 0.3s;
}

/* 资源摘要 */
#chao-game-root .pn-resource-summary {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: #eff6ff;
    border-radius: 8px;
    margin-bottom: 20px;
}

.pn-points-used,
#chao-game-root .pn-points-remaining {
    font-size: 16px;
    font-weight: 600;
    color: #1e40af;
}

#chao-game-root .pn-points-value {
    font-size: 20px;
    color: #3b82f6;
}

/* 年收入轨迹挑战 - 输入表单 */
#chao-game-root .pn-income-inputs {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

#chao-game-root .pn-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#chao-game-root .pn-input-group label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

#chao-game-root .pn-income-input {
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

#chao-game-root .pn-income-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 游戏操作按钮 */
#chao-game-root .chao-game-actions {
    text-align: center;
}

#chao-game-root .chao-game-submit-btn {
    padding: 14px 32px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

#chao-game-root .chao-game-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

#chao-game-root .chao-game-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#chao-game-root .chao-game-submit-btn.active {
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
}

/* 游戏结果 */
#chao-game-root .chao-game-result {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
#chao-game-root from {
        opacity: 0;
        transform: translateY(20px);
    }
#chao-game-root to {
        opacity: 1;
        transform: translateY(0);
    }
}

#chao-game-root .pn-result-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 100%);
    border-radius: 12px;
}

#chao-game-root .pn-result-label {
    font-size: 24px;
    font-weight: 700;
    color: #1e40af;
    margin: 15px 0;
}

#chao-game-root .pn-result-score {
    font-size: 18px;
    color: #6b7280;
}

/* 收入结果 */
#chao-game-root .pn-income-result {
    margin-bottom: 30px;
}

#chao-game-root .pn-income-range {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
    border-radius: 12px;
    margin-bottom: 20px;
}

#chao-game-root .pn-income-range h3 {
    font-size: 18px;
    color: #6b7280;
    margin-bottom: 10px;
}

#chao-game-root .pn-income-amount {
    font-size: 36px;
    font-weight: 800;
    color: #1e40af;
}

#chao-game-root .pn-income-details {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

#chao-game-root .pn-detail-item {
    text-align: center;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    flex: 1;
}

#chao-game-root .pn-detail-label {
    display: block;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 5px;
}

#chao-game-root .pn-detail-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

/* 结果标签 */
#chao-game-root .pn-result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

#chao-game-root .pn-tag {
    padding: 8px 16px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* 推荐产品 */
#chao-game-root .pn-recommendations {
    margin: 30px 0;
}

#chao-game-root .pn-recommendations h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 15px;
}

#chao-game-root .pn-recommendation-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#chao-game-root .pn-recommendation-item {
    padding: 20px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.3s;
}

#chao-game-root .pn-recommendation-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

#chao-game-root .pn-recommendation-item h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

#chao-game-root .pn-match-score {
    font-size: 14px;
    color: #10b981;
    font-weight: 600;
    margin-bottom: 10px;
}

#chao-game-root .pn-product-link {
    display: inline-block;
    padding: 8px 16px;
    background: #3b82f6;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

#chao-game-root .pn-product-link:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

/* CTA按钮 */
#chao-game-root .chao-game-ctas {
    margin-top: 30px;
}

#chao-game-root .chao-game-ctas h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 15px;
    text-align: center;
}

#chao-game-root .pn-cta-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#chao-game-root .chao-game-cta-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}

#chao-game-root .chao-game-cta-btn:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

#chao-game-root .pn-cta-icon {
    font-size: 32px;
    flex-shrink: 0;
}

#chao-game-root .pn-cta-content {
    flex: 1;
}

#chao-game-root .pn-cta-label {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

#chao-game-root .pn-cta-description {
    font-size: 14px;
    color: #6b7280;
}

#chao-game-root .pn-cta-book_appointment {
    border-color: #10b981;
}

#chao-game-root .pn-cta-book_appointment:hover {
    border-color: #059669;
    background: #ecfdf5;
}

#chao-game-root .pn-cta-join_course {
    border-color: #3b82f6;
}

#chao-game-root .pn-cta-join_course:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

#chao-game-root .pn-cta-upgrade_member {
    border-color: #f59e0b;
}

#chao-game-root .pn-cta-upgrade_member:hover {
    border-color: #d97706;
    background: #fffbeb;
}

/* 加载状态 */
#chao-game-root .chao-game-container.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

#chao-game-root .chao-game-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
#chao-game-root to {
        transform: rotate(360deg);
    }
}

/* 响应式设计 */
/* 🆕 P1.3: 移动端响应式优化 */
@media (max-width: 768px) {
#chao-game-root .chao-game-container {
        padding: 15px;
    }
    
#chao-game-root .chao-game-header h2 {
        font-size: 24px;
    }
    
#chao-game-root .pn-income-details {
        flex-direction: column;
    }
    
#chao-game-root .pn-resource-controls {
        flex-wrap: wrap;
    }
    
#chao-game-root .chao-game-cta-btn {
        flex-direction: column;
        text-align: center;
    }
}

/* 🆕 路径翻牌动画样式 */
.chao-path-reveal-container {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.chao-path-flip-card {
    width: 200px;
    height: 200px;
    position: relative;
    perspective: 1000px;
    margin: 0 auto;
}

.chao-path-flip-front,
.chao-path-flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.chao-path-flip-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    transform: rotateY(0deg);
}

.chao-path-flip-back {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    transform: rotateY(180deg);
}

.chao-path-flip-card.chao-path-flip-active .chao-path-flip-front {
    transform: rotateY(-180deg);
}

.chao-path-flip-card.chao-path-flip-active .chao-path-flip-back {
    transform: rotateY(0deg);
}

.chao-path-flip-code {
    font-size: 80px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 10px;
}

.chao-path-flip-label {
    font-size: 18px;
    opacity: 0.9;
}

.chao-path-flip-icon {
    font-size: 64px;
    margin-bottom: 10px;
}

.chao-path-flip-name {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    padding: 0 20px;
}

/* 🆕 事件卡中断样式 */
.chao-event-card-interrupt {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chao-event-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.chao-event-card-content {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    z-index: 10003;
}

.chao-event-card-header {
    text-align: center;
    margin-bottom: 30px;
}

.chao-event-card-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 15px;
}

.chao-event-card-header h3 {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.chao-event-card-body {
    margin-bottom: 30px;
}

.chao-event-card-impact {
    font-size: 14px;
    color: #374151;
}

.chao-event-card-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.chao-event-card-btn {
    flex: 1;
    padding: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.chao-event-card-btn:hover {
    border-color: #3b82f6;
    background: #f0f7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.chao-event-card-btn.chao-event-card-adjust:hover {
    border-color: #10b981;
    background: #f0fdf4;
}

.chao-btn-icon {
    font-size: 32px;
}

.chao-btn-text {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.chao-btn-desc {
    font-size: 12px;
    color: #6b7280;
}



