/* DNS域名解析工具专用样式 */

/* 查询表单样式 */
.dns-query-form {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.input-with-button {
    display: flex;
    gap: 10px;
}

.form-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #4a90e2;
}

.btn {
    padding: 10px 25px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #4a90e2;
    color: white;
}

.btn-primary:hover {
    background-color: #3a7bc8;
}

/* 记录类型选择器 */
.record-type-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.radio-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.radio-btn input[type="radio"] {
    display: none;
}

.radio-btn span {
    font-size: 14px;
    color: #666;
}

.radio-btn:hover {
    border-color: #4a90e2;
    background-color: #f0f7ff;
}

.radio-btn input[type="radio"]:checked + span {
    color: #4a90e2;
    font-weight: 600;
}

.radio-btn:has(input[type="radio"]:checked) {
    border-color: #4a90e2;
    background-color: #e8f3ff;
}

/* 下拉选择器 */
.form-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.form-select:focus {
    outline: none;
    border-color: #4a90e2;
}

/* 解析结果样式 */
.dns-results {
    margin-top: 25px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

.dns-results h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

.table-responsive {
    overflow-x: auto;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 4px;
    overflow: hidden;
}

.results-table thead th {
    background-color: #f5f5f5;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.results-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    color: #666;
}

.results-table tbody tr:last-child td {
    border-bottom: none;
}

.results-table tbody tr:hover {
    background-color: #f9f9f9;
}

/* 记录类型说明面板 */
.dns-info-panel {
    margin-top: 25px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.dns-info-panel h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

.record-type-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.record-type-item {
    padding: 10px 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
}

.record-type-item strong {
    color: #333;
}

/* 加载动画 */
.loading {
    display: inline-block;
    padding: 10px 20px;
    color: #666;
    font-size: 14px;
}

.loading::after {
    content: '...';
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .dns-query-form {
        padding: 20px 15px;
    }

    .input-with-button {
        flex-direction: column;
    }

    .form-input {
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .record-type-group {
        gap: 8px;
    }

    .radio-btn {
        flex: 1 1 calc(50% - 4px);
        min-width: 100px;
        justify-content: center;
        padding: 10px 12px;
    }

    .results-table {
        font-size: 13px;
    }

    .results-table thead th,
    .results-table tbody td {
        padding: 8px;
    }

    .dns-info-panel {
        padding: 15px;
    }

    .record-type-item {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .radio-btn {
        flex: 1 1 100%;
        justify-content: center;
    }
}
