:root {
    color-scheme: dark;
    --bg-0: #07111f;
    --bg-1: #0e1b31;
    --bg-2: #142748;
    --card: rgba(9, 18, 35, 0.72);
    --card-border: rgba(255, 255, 255, 0.14);
    --text: #edf3ff;
    --muted: rgba(237, 243, 255, 0.78);
    --accent: #7fd4ff;
    --accent-strong: #4fb0ff;
    --accent-warm: #f3c46a;
    --success: #7be495;
    --danger: #ff8e8e;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Avenir Next", "Gill Sans", "Trebuchet MS", sans-serif;
    min-height: 100vh;
    padding: clamp(1.25rem, 3vw, 2.5rem);
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(127, 212, 255, 0.22), transparent 32%),
        radial-gradient(circle at bottom right, rgba(243, 196, 106, 0.15), transparent 28%),
        linear-gradient(160deg, var(--bg-0) 0%, var(--bg-1) 48%, var(--bg-2) 100%);
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    width: 26rem;
    height: 26rem;
    border-radius: 50%;
    filter: blur(20px);
    opacity: 0.38;
    z-index: -1;
    pointer-events: none;
}

body::before {
    top: -8rem;
    left: -6rem;
    background: radial-gradient(circle, rgba(127, 212, 255, 0.9), transparent 68%);
}

body::after {
    right: -8rem;
    bottom: -10rem;
    background: radial-gradient(circle, rgba(243, 196, 106, 0.75), transparent 66%);
}

body > strong,
body > h1,
body > h2,
body > h3,
body > p,
body > ul,
body > ol,
body > div,
body > a {
    margin-left: auto;
    margin-right: auto;
}

body > strong,
body > h1 {
    display: block;
    max-width: 1120px;
    text-align: center;
    font-size: clamp(2rem, 4.8vw, 4.5rem);
    line-height: 1.04;
    letter-spacing: -0.04em;
    color: var(--text);
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

body > strong::after,
body > h1::after,
#mainTitle::after {
    content: "";
    display: block;
    width: min(8rem, 26vw);
    height: 0.22rem;
    margin: 1rem auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--accent-warm), transparent);
}

body > p,
body > h2,
body > h3,
body > ul,
body > ol {
    width: min(100%, 820px);
    max-width: 820px;
    color: var(--muted);
    line-height: 1.75;
    font-size: clamp(0.98rem, 1.35vw, 1.05rem);
}

body > p + p,
body > h2 + p,
body > h3 + p,
body > ul + p,
body > ol + p {
    margin-top: 0.9rem;
}

body > p,
body > h2,
body > h3,
body > ul,
body > ol {
    margin-top: 1rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    transition:
        color 180ms ease,
        transform 180ms ease,
        opacity 180ms ease,
        border-color 180ms ease;
}

a:hover {
    color: #ffffff;
}

a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 10px;
}

.container {
    max-width: 1120px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.row {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: clamp(1rem, 2.5vw, 1.5rem);
    width: 100%;
}

.info-box,
.intro-box,
.error-box {
    background: var(--card);
    border-radius: 24px;
    padding: clamp(1.3rem, 2.5vw, 2rem);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px) saturate(130%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
    transition:
        transform 220ms ease,
        border-color 220ms ease,
        box-shadow 220ms ease;
}

.info-box,
.intro-box {
    display: flex;
    flex: 1 1;
    min-width: min(100%, 320px);
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.info-box:hover,
.intro-box:hover,
.error-box:hover {
    transform: translateY(-8px);
    border-color: rgba(127, 212, 255, 0.42);
    box-shadow: 0 32px 70px rgba(0, 0, 0, 0.46);
}

.info-box h1,
.info-box h2,
.intro-box h1,
.intro-box h2,
.error-title {
    width: 100%;
    text-align: center;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text);
    padding-bottom: 0.85rem;
    margin-bottom: 0.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.info-box p,
.intro-box p,
.error-message {
    width: 100%;
    text-align: center;
    color: var(--muted);
    line-height: 1.7;
    font-size: clamp(0.98rem, 1.35vw, 1.05rem);
}

.info-box p:last-child,
.intro-box p:last-child,
.error-message:last-child {
    margin-bottom: 0;
}

.container p,
.container h3,
.container li {
    color: var(--muted);
}

.back-button,
.btn,
.email-link,
.pgp-link,
.chat-room-link,
.chat-room-link-se,
.chat-room-link-so {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.9rem 1.3rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.back-button,
.btn,
.email-link {
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    color: #06111d !important;
}

.back-button:hover,
.btn:hover,
.email-link:hover {
    color: #06111d !important;
    transform: translateY(-2px);
    box-shadow: 0 20px 44px rgba(79, 176, 255, 0.34);
}

.btn-secondary,
.pgp-link {
    background: transparent;
    color: var(--accent) !important;
    border-color: rgba(127, 212, 255, 0.35);
}

.btn-secondary:hover,
.pgp-link:hover {
    color: #ffffff !important;
    border-color: rgba(127, 212, 255, 0.62);
}

.chat-room-link {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text) !important;
    border-color: rgba(255, 255, 255, 0.14);
}

.chat-room-link:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff !important;
}

.chat-room-link-se {
    background: rgba(30, 83, 151, 0.2);
    color: #d8ecff !important;
    border-color: rgba(30, 83, 151, 0.42);
}

.chat-room-link-se:hover {
    background: rgba(30, 83, 151, 0.34);
    color: #ffffff !important;
}

.chat-room-link-so {
    background: rgba(244, 128, 36, 0.2);
    color: #ffe9d2 !important;
    border-color: rgba(244, 128, 36, 0.42);
}

.chat-room-link-so:hover {
    background: rgba(244, 128, 36, 0.32);
    color: #ffffff !important;
}

.contact-item {
    margin-bottom: 0.25rem;
    text-align: center;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.highlight {
    padding: 0.75rem 1rem;
    border-radius: 14px;
    margin: 0.4rem 0;
    font-weight: 800;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.highlight.email {
    background: rgba(123, 228, 149, 0.12);
    color: #bdf4c9;
}

.highlight.password {
    background: rgba(255, 142, 142, 0.12);
    color: #ffc0c0;
}

.app-store-badge {
    display: inline-block;
    margin-top: 0.6rem;
    transition: transform 180ms ease;
}

.app-store-badge:hover {
    transform: translateY(-2px) scale(1.03);
}

.app-store-badge img {
    height: 60px;
    width: auto;
}

.error-box {
    text-align: center;
    padding: clamp(1.5rem, 3vw, 2.5rem);
}

.error-number {
    font-size: clamp(4rem, 8vw, 6rem);
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 0.9rem;
    text-shadow: 0 8px 18px rgba(79, 176, 255, 0.2);
}

.action-buttons {
    display: flex;
    gap: 0.9rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.2rem;
}

.btn {
    min-width: 12rem;
}

.back-button {
    margin-bottom: 1rem;
}

body > strong,
body > h1,
body > p,
body > h2,
body > h3,
body > ul,
body > ol,
body > div,
body > a,
body > button {
    margin-top: 1rem;
}

body > strong:first-child,
body > h1:first-child,
body > p:first-child,
body > div:first-child,
body > a:first-child {
    margin-top: 0;
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    body > strong,
    body > h1 {
        font-size: clamp(1.8rem, 8vw, 3rem);
    }

    .row {
        width: 100%;
    }

    .info-box,
    .intro-box {
        min-width: 100%;
    }

    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        min-width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
