* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, system-ui, sans-serif; background: #111 url('/bg.gif') center center / cover no-repeat fixed; color: #333; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; padding: 36px 0; }
.logo { margin-bottom: 24px; position: relative; display: inline-block; }
.logo img { height: 42px; }
.box { background: #fff; border-radius: 10px; padding: 40px; max-width: 640px; width: 94%; text-align: center; box-shadow: 0 4px 24px rgba(0,0,0,0.3); }
a { color: #30ace2; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Buttons */
.btn { display: inline-block; background: #f7f9fb; color: #333; border: 1px solid #cdd2d9; padding: 14px 28px; border-radius: 8px; cursor: pointer; font-size: 15px; text-decoration: none; transition: background 0.2s, border-color 0.2s; width: 100%; margin-bottom: 12px; }
.btn:hover { background: #eef1f5; border-color: #b0b7c0; text-decoration: none; }
.btn svg { vertical-align: middle; margin-right: 8px; }
.btn-primary { background: #30ace2; border-color: #30ace2; color: #fff; }
.btn-primary:hover { background: #2899ca; }
.btn-danger { background: #c0392b; border-color: #c0392b; color: #fff; }
.btn-danger:hover { background: #a93226; }

/* Form elements */
input[type=text], input[type=password], select, textarea { width: 100%; padding: 10px 14px; border: 1px solid #cdd2d9; border-radius: 6px; background: #f7f9fb; color: #333; font-size: 14px; margin-bottom: 12px; font-family: inherit; }
input[type=text]:focus, input[type=password]:focus, select:focus, textarea:focus { outline: none; border-color: #30ace2; }
textarea { resize: vertical; min-height: 200px; }
input::placeholder, textarea::placeholder { color: #aaa; }
label { display: block; text-align: left; font-size: 13px; color: #888; margin-bottom: 4px; }

/* Auth lock */
.auth-lock { position: fixed; top: 16px; right: 16px; cursor: pointer; z-index: 50; opacity: 0.5; transition: opacity 0.2s; }
.auth-lock { opacity: 0.7; }
.auth-lock:hover { opacity: 1; }
.auth-lock svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.auth-lock.unlocked svg { stroke: #fff; }

/* Home grid */
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.home-grid .btn { margin-bottom: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 14px; }
.home-grid .btn svg { width: 28px; height: 28px; stroke: #30ace2; margin-right: 0; }
.home-grid .btn:hover { background: #30ace2; color: #fff; border-color: #30ace2; }
.home-grid .btn:hover svg { stroke: #fff; }
.home-grid .btn-disabled { opacity: 0.4; pointer-events: none; }

/* Page titles */
.page-title { font-size: 18px; color: #333; margin-bottom: 6px; font-weight: 600; }
.page-desc { font-size: 13px; color: #888; margin-bottom: 24px; }

/* Info text */
.note-text { font-size: 12px; color: #999; margin-top: 8px; }

/* Result / error */
.result { margin-top: 20px; padding: 20px; background: #eef6fc; border: 1px solid #d4e8f5; border-radius: 10px; text-align: center; }
.result-label { font-size: 12px; color: #30ace2; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; font-weight: 600; }
.result-url { width: 100%; padding: 12px 14px; border: 1px solid #d4e8f5; border-radius: 6px; background: #fff; color: #333; font-size: 13px; cursor: pointer; text-align: center; font-family: 'SF Mono', Menlo, monospace; }
.result-url:focus { outline: none; border-color: #30ace2; box-shadow: 0 0 0 3px rgba(48,172,226,0.15); }
.result-copied { font-size: 12px; color: #30ace2; margin-top: 8px; display: none; font-weight: 500; }
.error { margin-top: 16px; padding: 12px; background: #fef0f0; border: 1px solid #e6c3c3; border-radius: 6px; color: #c0392b; font-size: 14px; }

/* Features tags */
.features { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 16px 0; }
.features span { font-size: 12px; color: #777; background: #f7f9fb; padding: 4px 10px; border-radius: 12px; }

/* File select */
.file-select { cursor: pointer; border: 2px dashed #cdd2d9 !important; }
.file-select:hover { border-color: #b0b7c0 !important; }

/* Note view */
.note-display { background: #f7f9fb; border: 1px solid #cdd2d9; border-radius: 6px; padding: 16px; text-align: left; white-space: pre-wrap; word-break: break-word; font-size: 14px; color: #333; margin-bottom: 16px; min-height: 60px; }

/* Modal overlay */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); z-index: 100; justify-content: center; align-items: center; backdrop-filter: blur(4px); }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 32px; max-width: 520px; width: 92%; max-height: 80vh; overflow-y: auto; position: relative; box-shadow: 0 8px 40px rgba(0,0,0,0.2); animation: modalIn 0.25s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 22px; color: #aaa; cursor: pointer; padding: 4px 8px; }
.modal-close:hover { color: #333; }
.modal h3 { font-size: 16px; color: #222; margin-bottom: 20px; font-weight: 600; }
.modal-item { display: flex; gap: 14px; margin-bottom: 18px; align-items: flex-start; }
.modal-item:last-child { margin-bottom: 0; }
.modal-icon { flex-shrink: 0; width: 36px; height: 36px; border-radius: 8px; background: #f0f7ff; display: flex; align-items: center; justify-content: center; }
.modal-icon svg { width: 18px; height: 18px; stroke: #30ace2; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.modal-item-text { text-align: left; font-size: 13px; color: #555; line-height: 1.6; }
.modal-item-text strong { color: #222; font-weight: 600; display: block; margin-bottom: 2px; font-size: 14px; }
.modal-item-text code { background: #f0f3f7; padding: 1px 6px; border-radius: 3px; font-size: 12px; }

/* Info rows */
.info-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.info-row:last-child { border-bottom: none; }
.info-label { font-size: 13px; color: #888; }
.info-value { font-size: 13px; color: #333; font-weight: 500; }

/* Legal */
.legal { font-size: 13px; color: #aaa; margin-top: 20px; line-height: 1.5; }

/* Footer */
.footer { margin-top: 24px; font-size: 13px; color: rgba(255,255,255,0.4); text-align: center; }
.footer p { margin: 0; }
.back-link { display: inline-block; color: #30ace2; margin-bottom: 8px; font-size: 13px; }
.back-link:hover { color: #2899ca; }

/* DNS Report */
.dns-section { background: #fff; border: 1px solid #eef1f5; border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.dns-section:last-child { margin-bottom: 0; }
.dns-section-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.dns-section-header-pass { background: #eef6fc; }
.dns-section-header-warn { background: #fef5e7; }
.dns-section-header-fail { background: #fde8e8; }
.dns-section-title { font-size: 13px; font-weight: 600; color: #333; display: flex; align-items: center; gap: 8px; }
.dns-section-title svg { width: 15px; height: 15px; stroke: #30ace2; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dns-checks { padding: 4px 16px 8px; }
.dns-badges { display: flex; gap: 6px; }
.dns-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
.dns-badge-pass { background: #e8f4fd; color: #30ace2; }
.dns-badge-warn { background: #fef5e7; color: #e67e22; }
.dns-badge-fail { background: #fde8e8; color: #c0392b; }
.dns-checks { display: flex; flex-direction: column; gap: 2px; }
.dns-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; padding: 4px 0; }
.dns-icon { flex-shrink: 0; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 11px; font-weight: 700; color: #fff; line-height: 1; }
.dns-icon-pass { background: #30ace2; }
.dns-icon-warn { background: #e67e22; }
.dns-icon-fail { background: #c0392b; }
.dns-icon-info { background: transparent; border: 2px solid #ccc; }
.dns-label { color: #777; flex-shrink: 0; min-width: 150px; font-size: 13px; line-height: 1.5; }
.dns-value { color: #333; font-weight: 500; word-break: break-all; font-size: 13px; line-height: 1.5; min-width: 0; overflow: hidden; }
.dns-code { font-family: inherit; font-size: 13px; font-weight: 500; background: transparent; border: none; padding: 0; margin: 0; width: 100%; resize: none; color: #333; outline: none; overflow: hidden; line-height: 1.5; display: block; }

/* Info tools */
.info-tools { margin-top: 20px; display: flex; gap: 10px; }
.info-tools .btn { flex: 1; margin-bottom: 0; }

/* Mobile */
@media (max-width: 480px) {
    body { padding: 16px 0; }
    .box { padding: 24px 16px; width: 96%; }
    .home-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .home-grid .btn { padding: 14px 8px; font-size: 12px; }
    .home-grid .btn svg { width: 22px; height: 22px; }
    .page-title { font-size: 16px; }
    .page-desc { font-size: 12px; }
    .dns-label { min-width: 100px; font-size: 12px; }
    .dns-value { font-size: 12px; }
    .dns-row { gap: 6px; }
    .dns-section-header { padding: 10px 12px; flex-wrap: wrap; gap: 6px; }
    .dns-section-title { font-size: 12px; }
    .dns-badge { font-size: 10px; }
    .dns-checks { padding: 4px 12px 8px; }
    .info-row { flex-direction: column; gap: 2px; }
    .info-label { font-size: 12px; }
    .info-value { font-size: 12px; }
    .modal { padding: 24px 16px; width: 96%; }
    .modal-item { gap: 10px; }
    .modal-icon { width: 30px; height: 30px; }
    .result-url { font-size: 11px; padding: 10px; }
    .legal { font-size: 11px; }
    .btn { padding: 12px 20px; font-size: 14px; }
    .auth-lock { top: 10px; right: 10px; }
    .info-tools { flex-direction: column; }
    .info-tools .btn { font-size: 13px; }
}

/* 404 */
.four04 { font-size: 120px; font-weight: 700; color: rgba(255,255,255,0.15); line-height: 1; }
.four04-msg { font-size: 18px; color: rgba(255,255,255,0.9); margin-top: 24px; }
.four04-hint { font-size: 14px; color: rgba(255,255,255,0.6); margin-top: 12px; }
