/* IP查询工具样式 */
.query-section {
    margin-bottom: 2rem;
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.query-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.input-group {
    display: flex;
    gap: 10px;
}

.form-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0069d9;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-small {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

/* 当前IP信息样式 */
.current-ip {
    margin-bottom: 2rem;
    background-color: #e9f5ff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ip-info-card {
    background-color: white;
    border-radius: 6px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ip-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
}

.ip-label {
    font-weight: 500;
    margin-right: 0.5rem;
    color: #555;
}

.ip-address {
    font-weight: 600;
    color: #007bff;
    font-size: 1.1rem;
}

.ip-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-item label {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.detail-item span {
    font-weight: 500;
    color: #333;
}

/* 查询结果样式 */
.query-result {
    margin-bottom: 2rem;
}

.result-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.result-ip {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

.result-status {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.result-status.loading {
    background-color: #fff3cd;
    color: #856404;
}

.result-status.success {
    background-color: #d4edda;
    color: #155724;
}

.result-status.error {
    background-color: #f8d7da;
    color: #721c24;
}

.result-content {
    padding: 1.5rem;
}

.data-sources {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.source-item {
    background-color: #f8f9fa;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.source-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: #e9ecef;
    border-bottom: 1px solid #dee2e6;
}

.source-header h4 {
    margin: 0;
    font-size: 1rem;
    color: #495057;
}

.source-status {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
}

.source-status.loading {
    background-color: #fff3cd;
    color: #856404;
}

.source-status.success {
    background-color: #d4edda;
    color: #155724;
}

.source-status.error {
    background-color: #f8d7da;
    color: #721c24;
}

.source-content {
    padding: 1rem;
    min-height: 100px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table tr:not(:last-child) {
    border-bottom: 1px solid #eee;
}

.data-table td {
    padding: 0.5rem 0;
}

.key-cell {
    font-weight: 500;
    color: #555;
    width: 40%;
}

.value-cell {
    color: #333;
}

.no-data, .loading-message, .error-message {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 1rem 0;
}

.error-message {
    color: #dc3545;
}

/* 查询历史样式 */
.query-history {
    margin-bottom: 2rem;
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.history-container {
    margin-bottom: 1rem;
    max-height: 300px;
    overflow-y: auto;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.history-list {
    padding: 0.5rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
}

.history-item:last-child {
    border-bottom: none;
}

.history-ip-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.history-ip {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.history-location {
    font-size: 0.875rem;
    color: #666;
}

.history-time {
    font-size: 0.75rem;
    color: #999;
    margin: 0 1rem;
}

.history-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 1rem;
}

.no-history {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-style: italic;
}

/* 使用说明样式 */
.usage-info {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.info-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.info-item {
    background-color: white;
    padding: 1rem;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.info-item h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.info-item ul {
    margin: 0;
    padding-left: 1.5rem;
}

.info-item li {
    margin-bottom: 0.5rem;
    color: #555;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
    }
    
    .data-sources {
        grid-template-columns: 1fr;
    }
    
    .info-content {
        grid-template-columns: 1fr;
    }
    
    .ip-details {
        grid-template-columns: 1fr;
    }
}