/* 话费查询工具专用样式 */

/* 查询表单 */
.query-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.input-tips {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.input-tips p {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.input-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.input-tips li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    padding-left: 1rem;
    position: relative;
}

.input-tips li:before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* 运营商网格 */
.operator-section {
    margin-bottom: 2rem;
}

.operator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.operator-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.operator-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.operator-logo {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.operator-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.operator-code {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* 查询结果 */
.query-results {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.result-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.phone-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.phone-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.operator-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.query-time {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.balance-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.balance-item {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.balance-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.balance-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.balance-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* 余额点击复制样式 */
.clickable-balance {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border-radius: 4px;
    padding: 2px 6px;
    margin: -2px -6px;
}

.clickable-balance:hover {
    background-color: rgba(66, 133, 244, 0.1);
    transform: scale(1.02);
}

.clickable-balance::after {
    content: '点击复制';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    margin-bottom: 5px;
    z-index: 1000;
}

.clickable-balance:hover::after {
    opacity: 1;
}

/* 套餐信息 */
.package-info h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.package-details {
    display: grid;
    gap: 0.75rem;
}

.package-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.package-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.package-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* 查询历史 */
.query-history {
    margin-bottom: 2rem;
}

.history-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.history-list {
    max-height: 500px;
    overflow-y: auto;
}

.empty-history {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    background: #f8f9fa;
    border-radius: 8px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 0.75rem;
    transition: all 0.2s ease;
}

.history-item:hover {
    transform: translateX(3px);
    border-color: var(--primary-color);
}

.history-info {
    flex: 1;
}

.history-phone {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.history-operator {
    color: var(--primary-color);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.history-time {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.history-balance {
    margin: 0 1rem;
}

.balance-amount {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.history-repeat-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}

.history-repeat-btn:hover {
    background: var(--primary-dark);
}

/* 统计信息 */
.statistics-section {
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    cursor: pointer;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* 查询按钮增强 */
#query-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

#query-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

#query-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

#query-btn:active::after {
    width: 200px;
    height: 200px;
}

/* 输入框增强 */
#phone-number {
    transition: all 0.2s ease;
}

#phone-number:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
    transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .operator-grid {
        grid-template-columns: 1fr;
    }

    .balance-info {
        grid-template-columns: 1fr;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .history-balance {
        margin: 0;
    }

    .history-controls {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
