@font-face {
    font-family: "Preview";
    src: url("../assets/fonts/preview.otf");
    font-display: swap;
}

:root {
    --bg-top: #10223d;
    --bg-bottom: #0b1220;
    --panel-bg: rgba(17, 24, 39, 0.92);
    --panel-border: rgba(255, 255, 255, 0.08);
    --panel-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);

    --text-primary: #f8fafc;
    --text-secondary: #d8e3f0;
    --text-muted: #9fb0c4;
    --text-markdown: #dbe7f5;
    --text-markdown-strong: #ffffff;

    --accent: #38bdf8;
    --accent-hover: #7dd3fc;

    --button-bg: #1f2937;
    --button-hover: #2b3a4d;
    --button-border: rgba(255, 255, 255, 0.08);

    --success: #4ade80;
    --error: #f87171;

    --code-bg: rgba(255, 255, 255, 0.08);
    --content-bg: rgba(0, 0, 0, 0.18);

    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 12px;

    --max-width: 960px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 24px;
    font-family: "Preview", system-ui, sans-serif;
    color: var(--text-primary);
    background:
        radial-gradient(
            circle at top,
            rgba(56, 189, 248, 0.18) 0%,
            transparent 32%
        ),
        linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

img {
    display: block;
    max-width: 100%;
}

button {
    font: inherit;
}

.page {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
}

.card {
    padding: 32px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--panel-shadow);
    backdrop-filter: blur(10px);
}

.hero {
    margin-bottom: 2rem;
}

.logo {
    width: min(100%, 720px);
    aspect-ratio: 100 / 21.38;
    margin: 0 auto 1.5rem;
    background-image: url("../assets/branding/gridgames.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.subtitle {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.notice {
    margin: 0 0 1.5rem;
    padding: 1rem 1.25rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: var(--radius-md);
}

.actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 14px 18px;
    color: var(--text-primary);
    background: var(--button-bg);
    border: 1px solid var(--button-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        transform 0.15s ease,
        border-color 0.15s ease;
}

.button:hover {
    color: var(--accent-hover);
    background: var(--button-hover);
    border-color: rgba(125, 211, 252, 0.25);
    transform: translateY(-1px);
}

.button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.status {
    min-height: 1.5rem;
    margin: 0 0 1rem;
    text-align: center;
    color: var(--text-muted);
}

.status.error {
    color: var(--error);
}

.status.success {
    color: var(--success);
}

.license-section {
    margin-top: 0.5rem;
}

.license-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.license-title {
    margin: 0;
    font-size: 1.5rem;
    color: var(--accent);
}

.license-caption {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.license-content {
    padding: 24px;
    overflow: auto;
    line-height: 1.7;
    color: var(--text-markdown);
    background: var(--content-bg);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
}

.license-content h1,
.license-content h2,
.license-content h3,
.license-content h4,
.license-content h5,
.license-content h6 {
    margin: 1.5em 0 0.6em;
    line-height: 1.3;
    color: var(--text-primary);
}

.license-content h1:first-child,
.license-content h2:first-child,
.license-content h3:first-child {
    margin-top: 0;
}

.license-content p,
.license-content ul,
.license-content ol,
.license-content blockquote,
.license-content pre,
.license-content table {
    margin: 0.9em 0;
    color: var(--text-markdown);
}

.license-content ul,
.license-content ol {
    padding-left: 1.5rem;
}

.license-content li {
    color: var(--text-markdown);
}

.license-content li + li {
    margin-top: 0.4rem;
}

.license-content strong {
    color: var(--text-markdown-strong);
}

.license-content em {
    color: #c7dcff;
}

.license-content a {
    color: var(--accent-hover);
}

.license-content code {
    padding: 0.15em 0.4em;
    font-size: 0.95em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: #f8fbff;
    background: var(--code-bg);
    border-radius: 6px;
}

.license-content pre {
    padding: 1rem;
    overflow: auto;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

.license-content pre code {
    padding: 0;
    background: transparent;
}

.license-content blockquote {
    margin-left: 0;
    padding-left: 1rem;
    color: #c9d9ea;
    border-left: 3px solid rgba(56, 189, 248, 0.35);
}

.license-content hr {
    margin: 1.5rem 0;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.license-content table {
    width: 100%;
    border-collapse: collapse;
}

.license-content th,
.license-content td {
    padding: 0.75rem;
    color: var(--text-markdown);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}

.license-content th {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.footer-note {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.92rem;
    color: var(--text-muted);
}

@media (max-width: 640px) {
    body {
        padding: 14px;
    }

    .card {
        padding: 20px;
    }

    .license-content {
        padding: 18px;
    }
}
