/* 排行榜页面样式 - 使用styles.css统一的高端page-header样式 */

/* 标签切换 */
.rankings-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 24px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
}

.tab-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 排行榜内容 */
.rankings-content {
    display: none;
}

.rankings-content.active {
    display: block;
}

.rankings-header {
    display: grid;
    grid-template-columns: 80px 1fr 150px 120px 100px 100px 100px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 10px 10px 0 0;
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.rankings-body {
    background: white;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.rank-item {
    display: grid;
    grid-template-columns: 80px 1fr 150px 120px 100px 100px 100px;
    padding: 20px;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s;
}

.rank-item:hover {
    background: #f8f9fa;
    transform: scale(1.01);
}

.rank-item:last-child {
    border-bottom: none;
}

/* 排名样式 */
.rank-number {
    font-size: 1.5rem;
    font-weight: 700;
}

.rank-number.gold { color: #ffd700; }
.rank-number.silver { color: #c0c0c0; }
.rank-number.bronze { color: #cd7f32; }

/* AI产品信息 */
.ai-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ai-logo {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.ai-details h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.ai-details .country {
    font-size: 0.85rem;
    color: #888;
}

.trend-up {
    color: #52c41a;
    margin-left: 5px;
}

.trend-down {
    color: #ff4d4f;
    margin-left: 5px;
}

/* 公司 */
.company-col {
    color: #666;
}

/* 下载量 */
.downloads-col {
    font-weight: 600;
    color: #333;
}

/* 热度指数 */
.score-col {
    display: flex;
    align-items: center;
    gap: 8px;
}

.score-bar {
    width: 60px;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
}

.score-value {
    font-weight: 600;
    color: #667eea;
}

/* 送花 */
.flowers-col {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #ff6b6b;
    font-weight: 600;
}

/* 打CALL按钮 */
.action-col .btn-call {
    padding: 8px 20px;
    border: none;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e53 100%);
    color: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.action-col .btn-call:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255,107,107,0.4);
}

.btn-call i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* 国家地区榜单 */
.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.country-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.country-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.country-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.country-flag {
    font-size: 2.5rem;
}

.country-name {
    font-size: 1.3rem;
    font-weight: 600;
}

.country-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.stat-box {
    text-align: center;
}

.stat-box .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.stat-box .label {
    font-size: 0.85rem;
    color: #888;
}

.growth {
    color: #52c41a;
    font-weight: 600;
}

.top-ai-list {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
}

.top-ai-list h4 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: #666;
}

.top-ai-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.top-ai-list li {
    padding: 5px 0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-ai-list .rank-badge {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalIn 0.3s;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.ai-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    margin-bottom: 20px;
}

.ai-preview .ai-logo {
    width: 60px;
    height: 60px;
    font-size: 2rem;
}

.ai-preview .ai-name {
    font-size: 1.5rem;
    font-weight: 600;
}

.gift-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.gift-btn {
    padding: 15px;
    border: 2px solid #f0f0f0;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.gift-btn:hover {
    border-color: #667eea;
    background: #f8f9fa;
    transform: scale(1.05);
}

.gift-icon {
    font-size: 1.8rem;
}

.gift-name {
    font-size: 0.9rem;
    color: #666;
}

.gift-price {
    font-size: 0.85rem;
    color: #ff6b6b;
    font-weight: 600;
}

.custom-amount {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.custom-amount input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #f0f0f0;
    border-radius: 8px;
    font-size: 1rem;
}

.custom-amount button {
    padding: 10px 25px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
}

.sender-list {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
}

.sender-list h4 {
    margin: 0 0 15px 0;
    font-size: 0.95rem;
    color: #666;
}

.sender-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.sender-item:last-child {
    border-bottom: none;
}

.sender-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.sender-info {
    flex: 1;
}

.sender-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.sender-time {
    font-size: 0.75rem;
    color: #999;
}

.sender-gift {
    color: #ff6b6b;
    font-weight: 600;
}

/* 响应式 */
@media (max-width: 900px) {
    .rankings-header {
        display: none;
    }
    
    .rank-item {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }
    
    .ai-info {
        justify-content: center;
    }
    
    .company-col, .downloads-col {
        font-size: 0.9rem;
    }
    
    .action-col .btn-call {
        width: 100%;
        justify-content: center;
    }
    
    .gift-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .rankings-tabs {
        gap: 10px;
    }
    
    .tab-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .country-grid {
        grid-template-columns: 1fr;
    }
}
