/* DNS 查询工具专用样式 */
/* 注意：不重复定义 tools-common.css 中的公共样式（如 info-card） */

/* ========== 查询表单区域 ========== */
.dns-query-form {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.dns-query-form .form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.dns-query-form .form-group {
    display: flex;
    flex-direction: column;
}

.dns-query-form .form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dns-query-form .form-group label i {
    color: #4CAF50;
    font-size: 16px;
}

.dns-query-form .form-input,
.dns-query-form .form-select {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
}

.dns-query-form .form-input:focus,
.dns-query-form .form-select:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.dns-query-form .form-help {
    font-size: 12px;
    color: #666;
    margin-top: 6px;
}

.dns-query-form .form-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.dns-query-form .btn {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dns-query-form .btn-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.dns-query-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.dns-query-form .btn-primary:active {
    transform: translateY(0);
}

.dns-query-form .btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.dns-query-form .btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.dns-query-form .btn-secondary:hover {
    background: #e0e0e0;
}

/* 快捷查询按钮 */
.quick-query {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.quick-query-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.btn-quick {
    padding: 8px 16px;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-quick:hover {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

/* ========== 查询结果区域 ========== */
#result-container {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.result-header h3 {
    font-size: 20px;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-header h3 i {
    color: #4CAF50;
}

.result-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    background: #f5f5f5;
    color: #333;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-small:hover {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

/* 结果信息 */
.result-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
}

.result-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.result-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.result-value {
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

/* 结果表格 */
.result-table-container {
    overflow-x: auto;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.result-table thead {
    background: #f5f5f5;
}

.result-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.result-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.result-table tbody tr:hover {
    background: #f9f9f9;
}

.result-table td {
    padding: 12px;
    color: #666;
}

.result-table td:first-child {
    color: #999;
    font-weight: 500;
}

.result-table td:nth-child(2) {
    font-family: 'Courier New', monospace;
    color: #333;
    word-break: break-all;
}

.result-table .btn-copy {
    padding: 6px 12px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.result-table .btn-copy:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.result-table .btn-copy:active {
    transform: translateY(0);
}

/* ========== 查询历史区域 ========== */
#history-container {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.history-header h3 {
    font-size: 18px;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-header h3 i {
    color: #FF9800;
}

#history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-empty {
    text-align: center;
    color: #999;
    padding: 30px;
    font-size: 14px;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f9f9f9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.history-item:hover {
    background: #f0f0f0;
    border-color: #4CAF50;
    transform: translateX(5px);
}

.history-item-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.history-domain {
    font-family: 'Courier New', monospace;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.history-type {
    padding: 4px 10px;
    background: #4CAF50;
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.history-time {
    color: #999;
    font-size: 12px;
}

/* ========== 响应式设计 ========== */

/* 平板端（768px - 1024px） */
@media (max-width: 1024px) {
    .dns-query-form .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .result-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 手机端（< 768px） */
@media (max-width: 768px) {
    .dns-query-form {
        padding: 20px;
    }

    .dns-query-form .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .dns-query-form .form-actions {
        flex-direction: column;
    }

    .dns-query-form .btn {
        width: 100%;
    }

    .quick-query {
        flex-wrap: wrap;
    }

    .btn-quick {
        flex: 1;
        min-width: 80px;
    }

    #result-container,
    #history-container {
        padding: 20px;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .result-actions {
        width: 100%;
    }

    .result-actions .btn-small {
        flex: 1;
    }

    .result-info {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .result-table {
        font-size: 12px;
    }

    .result-table th,
    .result-table td {
        padding: 8px;
    }

    .history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .history-item-info {
        width: 100%;
        flex-wrap: wrap;
    }
}

/* 超小屏幕（< 480px） */
@media (max-width: 480px) {
    .dns-query-form,
    #result-container,
    #history-container {
        padding: 15px;
        border-radius: 12px;
    }

    .dns-query-form .btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .result-table {
        font-size: 11px;
    }

    .result-table th,
    .result-table td {
        padding: 6px;
    }

    .result-table th:first-child,
    .result-table td:first-child {
        display: none;
    }
}
