:root {
    --primary-color: #2563eb;
    --primary-soft: #3b82f6;
    --accent-color: #1d4ed8;

    --bg-color: #0b1220;
    --bg-elevated: #111827;
    --bg-subtle: #0f172a;

    --card-bg: #111827;
    --card-border: rgba(255, 255, 255, 0.06);

    --text-color: #e5e7eb;
    --text-muted: #94a3b8;

    --nav-height: 64px;
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 6px;

    --font-sans: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

body {
    font-family: var(--font-sans);
    background: linear-gradient(180deg, #0b1220 0%, #0e1627 100%);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("background.webp") center/cover no-repeat;
    opacity: 0.1;
    z-index: -1;
    pointer-events: none;
    filter: grayscale(50%);
}

a {
    text-decoration: none;
    color: var(--primary-soft);
    transition: color 0.15s ease, opacity 0.15s ease;
}

a:hover {
    color: #60a5fa;
}

ul {
    list-style: none;
}

.container {
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: 20px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header {
    background: rgba(11, 18, 32, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--card-border);
    height: var(--nav-height);
    display: flex;
    position: sticky;
    top: 0;
    z-index: 1000;
}

main {
    flex: 1;
    padding: 56px 20px 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

h1 {
    font-size: clamp(2.2rem, 6vw, 3.2rem);
    font-weight: 750;
    margin-bottom: 18px;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--primary-color);
}

p.lead {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 620px;
    margin-bottom: 52px;
}

.dns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
    width: 100%;
    max-width: 960px;
    margin-bottom: 56px;
}

.dns-card {
    background: var(--card-bg);
    padding: 26px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    text-align: left;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.dns-card:hover {
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.4);
}

.dns-card h3 {
    margin-bottom: 10px;
    color: var(--primary-soft);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
}

.dns-card code {
    display: block;
    word-break: break-all;
    overflow-wrap: anywhere;
    white-space: normal;
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    font-size: 0.9rem;
}

.copy-target {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    background: #0b1220;
    color: #bfdbfe;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    display: block;
    margin-bottom: 18px;
    word-break: break-all;
    border: 1px solid var(--card-border);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    user-select: all;
}

.copy-target:hover {
    background: #0f172a;
    border-color: rgba(59, 130, 246, 0.5);
    color: #e0f2fe;
}

.copy-target.copied {
    background: rgba(34, 197, 94, 0.12) !important;
    border-color: #22c55e !important;
    color: #86efac !important;
}

.download-button {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    margin-top: 12px;
    font-weight: 600;
    transition: transform 0.15s ease, background 0.15s ease;
    user-select: none;
}

.download-button:hover {
    transform: translateY(-2px);
    background: var(--primary-soft);
}

.download-button:active {
    transform: translateY(0);
}

.box {
    width: 100%;
    max-width: 960px;
    margin-top: 72px;
    text-align: left;
}

.box h2 {
    font-size: 1.6rem;
    margin-bottom: 36px;
    text-align: center;
    font-weight: 650;
}

.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.card-item {
    background: var(--bg-elevated);
    padding: 22px;
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
    font-size: 0.92rem;
    color: var(--text-muted);
}

.url-list li {
    border-bottom: 1px solid var(--card-border);
    padding: 10px 0;
    display: flex;
    align-items: center;
    color: var(--text-muted);
}

.url-list li::before {
    content: "›";
    color: var(--primary-color);
    margin-right: 10px;
    font-weight: bold;
}

footer {
    background: #0a0f1a;
    padding: 48px 20px;
    margin-top: auto;
    border-top: 1px solid var(--card-border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
}

#toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #16a34a;
    color: #fff;
    padding: 10px 22px;
    border-radius: 999px;
    font-weight: 600;
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
    z-index: 2000;
    pointer-events: none;
}

.full-width {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    main { padding: 30px 15px; }
    h1 { font-size: 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

.gafam-box {
    text-align: center;
    padding: 30px;
}

.gafam-banner {
    display: inline-block;
    width: 100%;
    max-width: 800px;
    margin: 10px auto;
    border-radius: 4px;
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.gafam-banner:hover {
    opacity: 0.8;
}

.gafam-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.tech-container {
    margin: 30px auto 50px auto;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.tech-container a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.2s ease;
}

.tech-container a:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.tech-divider {
    color: rgba(255, 255, 255, 0.2);
}