/* === EndLayer Share === */

:root {
    --bg: #0a0b0e;
    --surface: #fff;
    --text: #1a1a1a;
    --text-dim: #666;
    --text-muted: #999;
    --blue: #30ACE2;
    --blue-dim: rgba(48,172,226,0.08);
    --blue-border: rgba(48,172,226,0.25);
    --green: #2ecc71;
    --orange: #e67e22;
    --red: #c0392b;
    --radius: 10px;
    --radius-sm: 6px;
    --border: #eee;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Noto Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 0;
    -webkit-font-smoothing: antialiased;
}

/* === Logo === */
.logo { margin-bottom: 28px; position: relative; }
.logo img { height: 38px; opacity: 0.9; transition: opacity 0.3s; }
.logo img:hover { opacity: 1; }

/* === Main Card === */
.box {
    background: var(--surface);
    border-radius: 12px;
    padding: 40px;
    max-width: 640px;
    width: 94%;
    text-align: center;
    animation: cardIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Links === */
a { color: var(--blue); text-decoration: none; transition: color 0.2s; }
a:hover { text-decoration: underline; }

/* === Buttons === */
.btn {
    display: inline-block;
    background: #f5f6f8;
    color: var(--text-dim);
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-family: 'Noto Sans', sans-serif;
    text-decoration: none;
    transition: all 0.2s ease;
    width: 100%;
    margin-bottom: 12px;
}
.btn:hover {
    background: #ebedf0;
    color: var(--text);
    text-decoration: none;
}
.btn svg { vertical-align: middle; margin-right: 8px; }
.btn-primary {
    background: var(--blue);
    color: #fff;
    font-weight: 500;
}
.btn-primary:hover { background: #2899ca; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #a93226; }

/* === Form Elements === */
input[type=text], input[type=password], select, textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    font-size: 14px;
    font-family: 'Noto Sans', sans-serif;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}
input[type=text]:focus, input[type=password]:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--blue);
}
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
textarea { resize: vertical; min-height: 200px; }
input::placeholder, textarea::placeholder { color: #bbb; }
label {
    display: block;
    text-align: left;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* === Auth Lock === */
.auth-lock {
    position: fixed; top: 18px; right: 18px;
    cursor: pointer; z-index: 50;
    opacity: 0.3;
    transition: opacity 0.3s;
}
.auth-lock:hover { opacity: 0.9; }
.auth-lock.unlocked { opacity: 0.45; }
.auth-lock.unlocked:hover { opacity: 0.9; }
.auth-lock svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* === Home Grid === */
.home-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.home-grid .btn {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 22px 12px 18px;
    border-radius: var(--radius);
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.02em;
    background: #f5f6f8;
    color: var(--text-dim);
}
.home-grid .btn svg {
    width: 24px; height: 24px;
    stroke: var(--blue);
    margin-right: 0;
    transition: transform 0.25s ease;
}
.home-grid .btn:hover {
    background: var(--blue);
    color: #fff;
}
.home-grid .btn:hover svg {
    stroke: #fff;
    transform: scale(1.08);
}
.home-grid .btn-disabled {
    opacity: 0.45;
    pointer-events: none;
    position: relative;
}
.home-grid .btn-disabled::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 14px;
    height: 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E") no-repeat center / contain;
    opacity: 0.6;
}

/* Stagger grid items */
.home-grid .btn { animation: gridIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; }
.home-grid .btn:nth-child(1) { animation-delay: 0.04s; }
.home-grid .btn:nth-child(2) { animation-delay: 0.07s; }
.home-grid .btn:nth-child(3) { animation-delay: 0.10s; }
.home-grid .btn:nth-child(4) { animation-delay: 0.13s; }
.home-grid .btn:nth-child(5) { animation-delay: 0.16s; }
.home-grid .btn:nth-child(6) { animation-delay: 0.19s; }
.home-grid .btn:nth-child(7) { animation-delay: 0.22s; }
.home-grid .btn:nth-child(8) { animation-delay: 0.25s; }
.home-grid .btn:nth-child(9) { animation-delay: 0.28s; }
.home-grid .btn:nth-child(10) { animation-delay: 0.31s; }
@keyframes gridIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* === Page Titles === */
.page-title {
    font-size: 1.25rem;
    color: var(--text);
    margin-bottom: 6px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.page-desc {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-bottom: 28px;
    line-height: 1.7;
}

/* === Overline === */
.overline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 12px;
    display: block;
}

/* === Note Text === */
.note-text { font-size: 0.75rem; color: var(--text-muted); margin-top: 10px; }

/* === Result / Error === */
.result {
    margin-top: 20px;
    padding: 20px;
    background: var(--blue-dim);
    border-radius: var(--radius);
    text-align: center;
    animation: fadeUp 0.3s ease both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.result-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 10px;
    font-weight: 500;
}
.result-url {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
}
.result-url:focus { outline: none; border-color: var(--blue); }
.result-copied { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--blue); margin-top: 8px; display: none; letter-spacing: 0.05em; }

.error {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fef0f0;
    border-radius: var(--radius-sm);
    color: #c0392b;
    font-size: 13px;
}

/* === Features Tags === */
.features { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 16px 0; }
.features span {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    color: var(--text-muted);
    background: #f5f6f8;
    padding: 4px 12px;
    border-radius: 20px;
}

/* === File Select === */
.file-select { cursor: pointer; border: 2px dashed #ddd !important; background: #fafafa !important; }
.file-select:hover { border-color: var(--blue) !important; background: var(--blue-dim) !important; }

/* === Note Display === */
.note-display {
    background: #f8f9fa;
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 16px;
    min-height: 60px;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.7;
}

/* === Modal === */
.modal-overlay {
    display: none;
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.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 20px 60px rgba(0,0,0,0.3);
    animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.modal-close {
    position: absolute; top: 14px; right: 16px;
    background: none; border: none;
    font-size: 20px; color: #bbb;
    cursor: pointer; padding: 4px 8px;
    transition: color 0.2s;
}
.modal-close:hover { color: var(--text); }
.modal h3 { font-size: 1rem; color: var(--text); 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: var(--blue-dim);
    display: flex; align-items: center; justify-content: center;
}
.modal-icon svg { width: 16px; height: 16px; stroke: var(--blue); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.modal-item-text { text-align: left; font-size: 13px; color: var(--text-dim); line-height: 1.7; }
.modal-item-text strong { color: var(--text); font-weight: 600; display: block; margin-bottom: 3px; font-size: 13px; }
.modal-item-text code {
    font-family: 'JetBrains Mono', monospace;
    background: #f0f3f7;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--blue);
}

/* === Info Rows === */
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 11px 0;
    border-bottom: 1px solid #f0f0f0;
}
.info-row:last-child { border-bottom: none; }
.info-label { font-size: 13px; color: var(--text-muted); }
.info-value { font-size: 0.8rem; color: var(--text); font-weight: 500; font-family: 'JetBrains Mono', monospace; }

/* === Legal === */
.legal { font-size: 0.72rem; color: #bbb; margin-top: 24px; line-height: 1.7; }

/* === Footer === */
.footer {
    margin-top: 28px;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.3);
    text-align: center;
}
.footer p { margin: 0; }
.back-link {
    display: inline-block;
    color: rgba(255,255,255,0.35);
    margin-bottom: 8px;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.03em;
    transition: color 0.2s;
}
.back-link:hover { color: var(--blue); text-decoration: none; }

/* === DNS / Report Sections === */
.dns-section {
    background: #f8f9fa;
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
    animation: fadeUp 0.3s ease both;
}
.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: var(--blue-dim); }
.dns-section-header-warn { background: rgba(230,126,34,0.08); }
.dns-section-header-fail { background: rgba(192,57,43,0.08); }

.dns-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.dns-section-title svg { width: 15px; height: 15px; stroke: var(--blue); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.dns-checks { padding: 6px 16px 10px; display: flex; flex-direction: column; gap: 2px; }
.dns-badges { display: flex; gap: 6px; }
.dns-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.02em;
}
.dns-badge-pass { background: var(--blue-dim); color: var(--blue); }
.dns-badge-warn { background: rgba(230,126,34,0.08); color: var(--orange); }
.dns-badge-fail { background: rgba(192,57,43,0.08); color: var(--red); }

.dns-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; padding: 5px 0; }
.dns-icon {
    flex-shrink: 0; width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; font-size: 10px; font-weight: 700; color: #fff; line-height: 1;
}
.dns-icon-pass { background: var(--blue); }
.dns-icon-warn { background: var(--orange); }
.dns-icon-fail { background: var(--red); }
.dns-icon-info { background: transparent; border: 1.5px solid #ccc; color: #ccc; font-size: 9px; }

.dns-label { color: var(--text-muted); flex-shrink: 0; min-width: 150px; font-size: 13px; line-height: 1.5; }
.dns-value { color: var(--text); font-weight: 500; word-break: break-all; font-size: 13px; line-height: 1.5; min-width: 0; overflow: hidden; }
.dns-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 400;
    background: transparent;
    border: none;
    padding: 0; margin: 0;
    width: 100%;
    resize: none;
    color: var(--text);
    outline: none;
    overflow: hidden;
    line-height: 1.5;
    display: block;
}

/* === Info Tools === */
.info-tools { margin-top: 20px; display: flex; gap: 8px; }
.info-tools .btn { flex: 1; margin-bottom: 0; font-size: 13px; padding: 12px 10px; }

/* === Mobile === */
@media (max-width: 768px) {
    .home-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
    body { padding: 20px 0; }
    .box { padding: 24px 18px; width: 96%; }
    .home-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .home-grid .btn { padding: 16px 8px; font-size: 11px; }
    .home-grid .btn svg { width: 20px; height: 20px; }
    .page-title { font-size: 1.1rem; }
    .page-desc { font-size: 0.78rem; margin-bottom: 20px; }
    .dns-label { min-width: 90px; 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: 0.75rem; }
    .dns-badge { font-size: 0.6rem; }
    .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: 0.65rem; }
    .btn { padding: 12px 16px; font-size: 13px; }
    .auth-lock { top: 12px; right: 12px; }
    .info-tools { flex-direction: column; }
    .info-tools .btn { font-size: 12px; }
}

/* === 404 === */
.four04 { font-family: 'JetBrains Mono', monospace; font-size: 100px; font-weight: 700; color: #eee; line-height: 1; letter-spacing: -0.02em; }
.four04-msg { font-size: 1rem; color: var(--text-dim); margin-top: 20px; }
.four04-hint { font-size: 0.82rem; color: var(--text-muted); margin-top: 10px; }
