body {
    font-family: system-ui, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #f8fafc;
    color: #0f172a;
    margin: 20px auto;
    max-width: 1100px;
    padding: 0 20px;
    font-size: 15px;
}

h1 {
    font-size: 24px;
    margin-bottom: 6px;
    color: #0b1220;
}

h3 {
    font-size: 18px;
    margin: 16px 0 8px 0;
    color: #0b1220;
}

.small {
    font-size: 14px;
    color: #475569;
}

.section-title {
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 15px;
}

.input-type-label {
    font-size: 14px;
    margin-bottom: 6px;
    font-weight: 700;
    color: #475569;
}

.box {
    background: #fff;
    padding: 14px;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(2, 6, 23, 0.06);
    border: 1px solid #e2e8f0;
    margin-top: 16px;
}

textarea {
    width: 100%;
    height: 120px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    resize: vertical;
    box-sizing: border-box;
    background: #fefefe;
}

textarea:focus {
    outline: none;
    border-color: #0366d6;
    box-shadow: 0 0 0 2px rgba(3, 102, 214, 0.1);
}

input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    font-family: system-ui, 'Segoe UI', Roboto, Arial, sans-serif;
    flex: 1;
    max-width: 400px;
    box-sizing: border-box;
}

input[type="text"]:focus {
    outline: none;
    border-color: #0366d6;
    box-shadow: 0 0 0 2px rgba(3, 102, 214, 0.1);
}

input[type="file"] {
    display: none;
}

button {
    padding: 8px 14px;
    border: 0;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

button.primary {
    background: #0366d6;
    color: white;
}

button.primary:hover {
    background: #0256b8;
}

button.primary:active {
    background: #024593;
}

button.secondary {
    background: #e2e8f0;
    color: #0f172a;
}

button.secondary:hover {
    background: #cbd5e1;
}

button.secondary:active {
    background: #b4c1d3;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.file-label {
    background: #e2e8f0;
    color: #0f172a;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
}

.file-label:hover {
    background: #cbd5e1;
}

.file-label:active {
    background: #b4c1d3;
}

.controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    align-items: center;
}

.dns-fetch-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.dns-provider-select {
    display: flex;
    gap: 12px;
    align-items: center;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.radio-label input[type="radio"] {
    cursor: pointer;
}

.raw-hex-display {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    background: #f1f5f9;
    padding: 10px;
    border-radius: 8px;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 300px;
    overflow-y: auto;
}

.output-display {
    font-family: monospace;
    font-size: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

th, td {
    padding: 8px;
    border-bottom: 1px solid #f1f5f9;
    text-align: left;
    vertical-align: top;
}

th {
    width: 220px;
    color: #0b1220;
    font-weight: 700;
    font-size: 14px;
    background: #f8fafc;
}

td {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    word-break: break-word;
}

.status-message {
    margin-top: 8px;
    font-size: 14px;
}

.error {
    color: #b91c1c;
    font-weight: 700;
    margin-top: 8px;
}

.success {
    color: #15803d;
    font-weight: 700;
    margin-top: 8px;
}

hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 8px 0;
}

@media (max-width: 768px) {
    body {
        margin: 10px auto;
        padding: 0 10px;
    }
    
    .dns-fetch-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    input[type="text"] {
        max-width: none;
    }
    
    th {
        width: 150px;
    }
}

.github-footer {
    text-align: right;
    margin-top: 24px;
}

.github-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #24292e;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.github-badge:hover {
    background: #1b1f23;
}

.github-badge svg {
    display: block;
}