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

html,
body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: #111827;
}

a {
    color: inherit;
    text-decoration: none;
}

.page {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.hero {
    padding: 32px 16px 16px;
    color: #f9fafb;
}

.hero-small {
    padding-top: 24px;
    padding-bottom: 8px;
}

.hero-inner {
    max-width: 960px;
    margin: 0 auto;
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero-subtitle {
    margin-top: 8px;
    font-size: 14px;
    opacity: 0.9;
}

.content {
    flex: 1;
    padding: 0 16px 24px;
}

.content > * {
    max-width: 960px;
    margin: 0 auto 16px;
}

.card {
    background: rgba(249, 250, 251, 0.98);
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
    overflow: hidden;
}

.card-narrow {
    max-width: 520px;
}

.card-header {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.card-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.card-header-between {
    justify-content: space-between;
}

.card-body {
    padding: 12px 16px 16px;
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 8px 4px 4px;
}

.link-item {
    display: block;
    padding: 10px 10px 9px;
    background: radial-gradient(circle at top left, #e0f2fe, #eef2ff);
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, background 0.15s ease-out;
}

.link-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.3);
}

.link-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.link-desc {
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
}

.empty {
    padding: 24px 16px;
    text-align: center;
    color: #f9fafb;
}

.empty p {
    margin-bottom: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #f9fafb;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.45);
    transition: transform 0.1s ease-out, box-shadow 0.15s ease-out, filter 0.1s ease-out;
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.6);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 5px 14px rgba(79, 70, 229, 0.5);
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
}

.btn-secondary {
    background: linear-gradient(135deg, #10b981, #22c55e);
    box-shadow: 0 8px 18px rgba(16, 185, 129, 0.45);
}

.btn-text {
    background: transparent;
    color: #4b5563;
    box-shadow: none;
    padding-inline: 4px;
}

.btn-text:hover {
    background: rgba(148, 163, 184, 0.15);
    box-shadow: none;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer {
    padding: 8px 16px 16px;
    color: #e5e7eb;
    font-size: 12px;
}

.footer-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer a {
    text-decoration: underline;
}

.home-body {
    background-color: #f3f4f6;
}

.home-wrapper {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
}

.home-main {
    width: 100%;
    max-width: 420px;
}

.home-frame {
    background-image: repeating-linear-gradient(45deg, #ef4444 0 6px, #ffffff 6px 12px, #16a34a 12px 18px, #ffffff 18px 24px);
    padding: 4px;
    border-radius: 10px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.25);
}

.home-frame-inner {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 14px 8px 10px;
}

.home-title {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #f97316;
    margin-bottom: 6px;
}

.home-subtitle {
    text-align: center;
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 6px;
}

.domain-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.domain-table td {
    padding: 8px 4px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    vertical-align: middle;
}

.domain-link {
    color: #2563eb;
    text-decoration: underline;
    word-break: break-all;
}

.home-empty {
    padding: 12px 4px 4px;
    text-align: center;
    font-size: 14px;
    color: #4b5563;
}

.home-empty-link {
    display: inline-block;
    margin-top: 4px;
    font-size: 14px;
    color: #2563eb;
    text-decoration: underline;
}

.home-footer {
    margin-top: 8px;
    width: 100%;
    max-width: 420px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #9ca3af;
}

.home-footer-link {
    color: #4b5563;
    text-decoration: underline;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.form-group-inline {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.form-group-inline > div {
    flex: 1;
}

label {
    font-size: 13px;
    color: #4b5563;
}

input[type="text"],
input[type="password"],
input[type="url"],
input[type="number"],
textarea {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background-color: #f9fafb;
    font-size: 14px;
    outline: none;
    transition: border-color 0.12s ease-out, box-shadow 0.12s ease-out, background-color 0.12s ease-out;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
textarea:focus {
    border-color: #4f46e5;
    background-color: #ffffff;
    box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.25);
}

textarea {
    resize: vertical;
}

.checkbox-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 6px;
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.alert {
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 10px;
}

.alert-error {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th,
.table td {
    padding: 8px 6px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    white-space: nowrap;
}

.table th {
    font-weight: 600;
    color: #6b7280;
    background: #f3f4f6;
}

.table tr:last-child td {
    border-bottom: none;
}

.table-link {
    font-size: 13px;
    color: #2563eb;
    margin-right: 6px;
}

.table-link-danger {
    color: #dc2626;
}

@media (max-width: 640px) {
    .hero {
        padding-top: 24px;
    }

    .hero-title {
        font-size: 22px;
    }

    .hero-subtitle {
        font-size: 13px;
    }

    .link-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card {
        border-radius: 16px;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.28);
    }

    .card-header {
        padding-inline: 14px;
    }

    .card-body {
        padding-inline: 12px;
    }

    .card-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .btn {
        padding-inline: 12px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}
