/**
 * Alexa 排名查询工具 - 专用样式
 * 注意：不要重复定义 tools-common.css 中的公共样式
 */

/* ==================== 查询输入区 ==================== */
.query-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-group label {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.domain-input {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
}

.domain-input:focus {
    outline: none;
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.query-btn {
    padding: 14px 32px;
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.query-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.query-btn:active {
    transform: translateY(0);
}

.query-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 加载动画 */
.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: #4A90E2;
    font-size: 1.1rem;
    font-weight: 500;
}

.loading-spinner i {
    font-size: 1.5rem;
}

/* ==================== 结果显示区 ==================== */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.rank-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.rank-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #4A90E2;
}

.rank-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rank-card-icon i {
    font-size: 1.8rem;
    color: white;
}

.rank-card-content {
    flex: 1;
}

.rank-card-content h3 {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.rank-value {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.rank-label {
    font-size: 0.85rem;
    color: #888;
    margin-top: 4px;
    display: block;
}

/* ==================== 流量详情 ==================== */
.traffic-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
}

.traffic-details h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.traffic-details h3 i {
    color: #4A90E2;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 500;
    color: #555;
}

.detail-value {
    font-weight: 600;
    color: #333;
}

/* ==================== 排名趋势图表 ==================== */
.trend-chart-container {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
}

.trend-chart-container h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.trend-chart-container h3 i {
    color: #4A90E2;
}

#trend-chart {
    width: 100% !important;
    max-height: 400px;
}

/* ==================== 数据说明 ==================== */
.data-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
    color: #856404;
}

.data-note i {
    font-size: 1.2rem;
    color: #f39c12;
    flex-shrink: 0;
    margin-top: 2px;
}

.data-note strong {
    color: #6c5100;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .result-grid {
        grid-template-columns: 1fr;
    }

    .rank-card {
        padding: 20px;
    }

    .rank-card-icon {
        width: 50px;
        height: 50px;
    }

    .rank-card-icon i {
        font-size: 1.5rem;
    }

    .rank-value {
        font-size: 1.6rem;
    }

    .query-btn {
        width: 100%;
    }

    .detail-row {
        flex-direction: column;
        gap: 8px;
    }

    .detail-label {
        font-weight: 600;
    }

    #trend-chart {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .domain-input {
        font-size: 0.9rem;
        padding: 12px 16px;
    }

    .query-btn {
        font-size: 0.95rem;
        padding: 12px 24px;
    }

    .rank-value {
        font-size: 1.4rem;
    }

    .traffic-details h3,
    .trend-chart-container h3 {
        font-size: 1.1rem;
    }

    .data-note {
        font-size: 0.85rem;
        padding: 14px 16px;
    }
}
