/* 裕盛昌贵金属实时行情系统样式 - 清爽版 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.5;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    padding-bottom: 20px;
}

/* 顶部 */
.header {
    background: linear-gradient(135deg, #C65911 0%, #E67E22 100%);
    color: white;
    padding: 20px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section h1 {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 1px;
}

.tagline {
    font-size: 13px;
    opacity: 0.9;
    margin-top: 4px;
}

.status-section {
    text-align: right;
}

.time {
    display: block;
    font-size: 13px;
    font-weight: 500;
    opacity: 0.95;
}

.status {
    display: block;
    font-size: 12px;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.2);
}

.status.open {
    background: rgba(144,238,144,0.3);
}

.status.closed {
    background: rgba(255,182,193,0.3);
}

.status.holiday {
    background: rgba(200,200,200,0.3);
}

/* 国际金价基准 */
.benchmark-section {
    display: flex;
    justify-content: space-around;
    padding: 15px 10px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

/* AI行情解读按钮 */
.ai-analysis-section {
    padding: 12px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
}

.ai-analysis-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    padding: 10px 24px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.ai-analysis-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.ai-analysis-btn:active {
    transform: translateY(0);
}

.ai-icon {
    font-size: 18px;
}

/* AI弹窗 */
.ai-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.ai-modal.active {
    display: flex;
}

.ai-modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    max-height: 80vh;
    overflow: hidden;
    animation: aiModalSlideIn 0.3s ease;
}

@keyframes aiModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.ai-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.ai-modal-close:hover {
    background: rgba(255,255,255,0.2);
}

.ai-modal-body {
    padding: 20px;
    max-height: calc(80vh - 100px);
    overflow-y: auto;
}

.ai-disclaimer {
    padding: 12px 20px;
    background: #fff8e1;
    border-top: 1px solid #ffe082;
}

.ai-disclaimer p {
    font-size: 11px;
    color: #f57c00;
    margin: 0;
    text-align: center;
}

/* AI加载动画 */
.ai-loading {
    text-align: center;
    padding: 40px 20px;
}

.ai-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: aiSpin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes aiSpin {
    to { transform: rotate(360deg); }
}

.ai-loading p {
    color: #666;
    font-size: 14px;
}

/* AI分析结果样式 */
.ai-result {
    animation: aiFadeIn 0.4s ease;
}

@keyframes aiFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-result-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.ai-result-price {
    font-size: 32px;
    font-weight: 700;
    color: #C65911;
    font-family: 'DIN Alternate', 'Helvetica Neue', sans-serif;
}

.ai-result-unit {
    font-size: 14px;
    color: #999;
    margin-left: 4px;
}

.ai-result-update {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

.ai-result-section {
    margin-bottom: 18px;
    padding: 14px;
    background: #f8f9fa;
    border-radius: 10px;
}

.ai-result-section:last-child {
    margin-bottom: 0;
}

.ai-result-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
}

.ai-result-value {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
}

.ai-suggestion-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px;
    border-radius: 10px;
    text-align: center;
    margin-top: 16px;
}

.ai-suggestion-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.ai-suggestion-desc {
    font-size: 13px;
    opacity: 0.95;
    line-height: 1.5;
}

.ai-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
}

.ai-tag.high {
    background: #ffebee;
    color: #e74c3c;
}

.ai-tag.low {
    background: #e8f5e9;
    color: #27ae60;
}

.ai-tag.mid {
    background: #fff3e0;
    color: #f39c12;
}

.ai-risk-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #666;
    margin-top: 6px;
}

.benchmark-item {
    text-align: center;
    flex: 1;
}

.benchmark-item .label {
    display: block;
    font-size: 11px;
    color: #999;
    margin-bottom: 4px;
}

.benchmark-item .value {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #C65911;
}

.benchmark-item .unit {
    font-size: 10px;
    color: #999;
}

/* 行情表格 */
.quote-table-container {
    padding: 10px 15px;
}

.quote-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.quote-table thead {
    background: #fafafa;
}

.quote-table th {
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    color: #666;
    font-size: 13px;
    border-bottom: 2px solid #e8e8e8;
}

.quote-table td {
    padding: 14px 8px;
    text-align: center;
    border-bottom: 1px solid #f5f5f5;
}

.quote-table tbody tr:hover {
    background: #fafafa;
}

/* 商品名称 */
.product-name {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.product-sub {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

/* 价格样式 */
.price {
    font-weight: 600;
    font-size: 17px;
    font-family: 'DIN Alternate', 'Helvetica Neue', sans-serif;
}

.price.up {
    color: #e74c3c;
}

.price.down {
    color: #27ae60;
}

.price-sell {
    color: #C65911;
}

.change-icon {
    font-size: 10px;
    margin-left: 2px;
}

/* 最高最低价 */
.high-low {
    font-size: 11px;
    color: #666;
    line-height: 1.6;
}

.high-low .high {
    color: #e74c3c;
}

.high-low .low {
    color: #27ae60;
}

/* 同行资金批发 - 单行条 */
.wholesale-bar {
    margin: 10px 15px;
    background: #2c3e50;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: white;
    font-size: 12px;
}

.wholesale-label {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}

.wholesale-tags {
    display: flex;
    gap: 6px;
    flex: 1;
}

.wholesale-tags span {
    background: rgba(255,255,255,0.15);
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

.wholesale-contact {
    opacity: 0.7;
    white-space: nowrap;
    font-size: 11px;
}

/* 黄金热点追踪 */
.news-section {
    margin: 15px;
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.news-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* AI分析按钮 - 现代简约设计 */
.ai-analysis-btn-inline {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.ai-analysis-btn-inline:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.ai-analysis-btn-inline .ai-icon {
    width: 14px;
    height: 14px;
}

.news-section .section-header h3 {
    color: #333;
    font-size: 16px;
}

.news-refresh-btn {
    background: none;
    border: 1px solid #ddd;
    color: #999;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 10px;
    cursor: pointer;
}

.news-refresh-btn:hover {
    border-color: #C65911;
    color: #C65911;
}

.news-subtitle {
    font-size: 11px;
    color: #C65911;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.news-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    background: #fafafa;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.news-item:hover {
    background: #f0f0f0;
}

.news-tag {
    background: #C65911;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 10px;
    flex-shrink: 0;
    margin-top: 2px;
}

.news-content {
    flex: 1;
}

.news-title {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-source {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

/* 免责声明 */
.disclaimer {
    padding: 15px;
    margin: 15px;
    background: #fafafa;
    border-radius: 8px;
    font-size: 11px;
    color: #999;
    text-align: center;
}

.disclaimer p {
    margin-bottom: 5px;
}

/* 响应式 */
@media (max-width: 480px) {
    .container {
        max-width: 100%;
    }
    
    .wholesale-content {
        grid-template-columns: 1fr;
    }
}
