/* ========================================
   AI算命系统 - 服务页面样式
   ======================================== */

.service-content {
    max-width: 900px;
    margin: 0 auto;
}

.form-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: var(--border-gold);
    padding: 40px;
    margin-bottom: 40px;
}

.form-actions {
    text-align: center;
    margin-top: 32px;
}

.form-actions .btn {
    min-width: 200px;
}

/* 结果区域 */
.result-section {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: var(--border-gold);
    padding: 40px;
    animation: fadeIn 0.5s ease;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(212, 168, 83, 0.2);
}

.result-header h2 {
    font-size: 24px;
    color: var(--gold-primary);
}

/* 八字命盘 */
.bazi-chart {
    margin-bottom: 32px;
}

.bazi-chart h3 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.chart-item {
    background: var(--secondary-dark);
    border: 1px solid rgba(212, 168, 83, 0.2);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
}

.chart-item .label {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.chart-item .value {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: var(--gold-primary);
}

/* 分析标签页 */
.analysis-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(212, 168, 83, 0.2);
    padding-bottom: 16px;
}

.tab-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid rgba(212, 168, 83, 0.3);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

.tab-btn.active {
    background: var(--gold-gradient);
    border-color: var(--gold-primary);
    color: var(--primary-dark);
}

/* 分析内容 */
.analysis-content {
    position: relative;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-panel.active {
    display: block;
}

.analysis-card {
    background: var(--secondary-dark);
    border-radius: var(--radius-md);
    border: 1px solid rgba(212, 168, 83, 0.1);
    padding: 24px;
}

.analysis-card h4 {
    font-size: 16px;
    color: var(--gold-primary);
    margin-bottom: 16px;
}

.analysis-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* 结果操作 */
.result-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(212, 168, 83, 0.2);
}

/* 上传区域 */
.upload-area {
    border: 2px dashed rgba(212, 168, 83, 0.3);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--gold-primary);
    background: rgba(212, 168, 83, 0.05);
}

.upload-area.dragover {
    border-color: var(--gold-primary);
    background: rgba(212, 168, 83, 0.1);
}

.upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: rgba(212, 168, 83, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--gold-primary);
}

.upload-area h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.upload-area p {
    font-size: 14px;
    color: var(--text-muted);
}

/* 塔罗牌 */
.tarot-cards {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin: 32px 0;
}

.tarot-card {
    aspect-ratio: 2/3;
    background: linear-gradient(135deg, var(--secondary-dark) 0%, var(--tertiary-dark) 100%);
    border: 2px solid rgba(212, 168, 83, 0.3);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tarot-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gold-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tarot-card:hover {
    transform: translateY(-8px);
    border-color: var(--gold-primary);
    box-shadow: var(--shadow-gold);
}

.tarot-card:hover::before {
    opacity: 0.1;
}

.tarot-card i {
    font-size: 24px;
    color: var(--gold-primary);
    z-index: 1;
}

.tarot-card.selected {
    border-color: var(--gold-primary);
    box-shadow: 0 0 20px rgba(212, 168, 83, 0.4);
}

.tarot-card.selected::before {
    opacity: 0.2;
}

/* 灵签 */
.lots-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.lot-card {
    background: var(--secondary-dark);
    border: 1px solid rgba(212, 168, 83, 0.2);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lot-card:hover {
    border-color: var(--gold-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-gold);
}

.lot-card .lot-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: var(--gold-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--primary-dark);
}

.lot-card h3 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.lot-card p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 签文结果 */
.lot-result {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(212, 168, 83, 0.05) 100%);
    border: 2px solid var(--gold-primary);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    margin-top: 32px;
}

.lot-number {
    font-size: 48px;
    font-weight: bold;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.lot-fortune {
    display: inline-block;
    padding: 8px 24px;
    background: var(--gold-gradient);
    color: var(--primary-dark);
    border-radius: 20px;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 24px;
}

.lot-poem {
    font-size: 18px;
    color: var(--text-primary);
    line-height: 2;
    margin-bottom: 24px;
    font-style: italic;
}

.lot-interpretation {
    text-align: left;
    background: var(--secondary-dark);
    border-radius: var(--radius-md);
    padding: 24px;
}

.lot-interpretation h4 {
    font-size: 16px;
    color: var(--gold-primary);
    margin-bottom: 12px;
}

.lot-interpretation p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* 日历 */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 24px;
}

.calendar-header {
    text-align: center;
    padding: 12px;
    font-size: 14px;
    color: var(--gold-primary);
    font-weight: bold;
}

.calendar-day {
    aspect-ratio: 1;
    background: var(--secondary-dark);
    border: 1px solid rgba(212, 168, 83, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.calendar-day:hover {
    border-color: var(--gold-primary);
}

.calendar-day .day-number {
    font-size: 16px;
    color: var(--text-primary);
}

.calendar-day .day-fortune {
    font-size: 10px;
    margin-top: 4px;
    padding: 2px 6px;
    border-radius: 4px;
}

.calendar-day.good .day-fortune {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.calendar-day.medium .day-fortune {
    background: rgba(255, 152, 0, 0.2);
    color: #FF9800;
}

.calendar-day.bad .day-fortune {
    background: rgba(244, 67, 54, 0.2);
    color: #F44336;
}

.calendar-day.selected {
    border-color: var(--gold-primary);
    background: rgba(212, 168, 83, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .form-section,
    .result-section {
        padding: 24px;
    }
    
    .chart-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .analysis-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-btn {
        white-space: nowrap;
    }
    
    .tarot-cards {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .lots-container {
        grid-template-columns: 1fr;
    }
    
    .calendar-grid {
        gap: 4px;
    }
    
    .calendar-day .day-number {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .chart-grid {
        grid-template-columns: 1fr;
    }
    
    .tarot-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .result-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .result-actions {
        flex-direction: column;
    }
}
