@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,500,0,0&display=swap');

:root {
    --md-sys-color-primary: #a8c8ff;
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-primary-container: #194073;
    --md-sys-color-on-primary-container: #d7e6ff;
    --md-sys-color-secondary: #bcc6db;
    --md-sys-color-on-secondary: #ffffff;
    --md-sys-color-secondary-container: #394255;
    --md-sys-color-tertiary: #7ed5df;
    --md-sys-color-on-tertiary: #ffffff;
    --md-sys-color-surface: #161b23;
    --md-sys-color-surface-container: #1f252f;
    --md-sys-color-surface-container-high: #272e3a;
    --md-sys-color-surface-container-highest: #303948;
    --md-sys-color-surface-bright: #1e242e;
    --md-sys-color-background: #11161d;
    --md-sys-color-outline: #8b94a5;
    --md-sys-color-outline-variant: #414957;
    --md-sys-color-on-surface: #e6eaf1;
    --md-sys-color-on-surface-variant: #b6becd;
    --md-sys-color-error: #ffb4ab;
    --md-sys-color-success: #79d8a0;
    --md-state-hover: rgba(168, 200, 255, 0.11);
    --md-state-pressed: rgba(168, 200, 255, 0.16);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.24), 0 2px 8px rgba(0, 0, 0, 0.28);
    --shadow-2: 0 10px 26px rgba(0, 0, 0, 0.35);
    --radius-xl: 28px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --content-width: min(1120px, calc(100% - 32px));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
        background-color: var(--md-sys-color-background);
        background-image:
            radial-gradient(circle at top left, rgba(89, 132, 201, 0.18), transparent 30%),
            radial-gradient(circle at top right, rgba(76, 161, 171, 0.12), transparent 30%);
    color: var(--md-sys-color-on-surface);
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    line-height: 1.5;
    animation: page-fade-in 0.5s ease-out both;
}

a {
    color: inherit;
}

.icon {
    font-family: 'Material Symbols Rounded', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 20px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

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

button,
input,
textarea,
select {
    font: inherit;
}

.site-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    width: var(--content-width);
    margin: 16px auto 0;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 12px;
    z-index: 50;
    border: 1px solid rgba(65, 73, 87, 0.88);
    border-radius: 999px;
    background: rgba(25, 31, 40, 0.92);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
    box-shadow: var(--shadow-1);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease, background-color 0.24s ease;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--md-sys-color-on-surface);
    transition: transform 0.24s ease, opacity 0.24s ease;
}

.brand img {
    height: 34px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.nav-links a {
    text-decoration: none;
    color: var(--md-sys-color-on-surface-variant);
    padding: 10px 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.nav-links a .icon {
    font-size: 18px;
}

.nav-links a:hover {
    background: var(--md-state-hover);
    color: var(--md-sys-color-primary);
    transform: translateY(-1px);
}

.nav-links .nav-active {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.content-wrapper {
    flex: 1;
    width: 100%;
}

.page,
.doc-shell,
.dashboard-shell {
    width: var(--content-width);
    margin: 0 auto;
}

.page {
    padding: 40px 0 56px;
}

.hero {
    display: grid;
    gap: 24px;
    padding: 28px 0 12px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.surface,
.card,
.auth-card,
.price-card,
.dashboard-panel,
.doc-card,
.sidebar,
.search-shell,
.notice-card {
    background: var(--md-sys-color-surface);
    border: 1px solid rgba(65, 73, 87, 0.88);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-1);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease, background-color 0.24s ease;
}

.surface,
.auth-card,
.doc-card,
.notice-card,
.dashboard-panel,
.search-shell {
    padding: 28px;
}

.card,
.price-card {
    padding: 22px;
}

/* Cards inside a surface get elevated bg for visual contrast */
.surface .card {
    background: var(--md-sys-color-surface-container);
    box-shadow: none;
}

/* Hero aside: stack cards in a single column so they fill the aside height */
.hero-grid > aside .card-grid {
    grid-template-columns: 1fr;
    height: 100%;
    align-content: stretch;
}

.badge,
.kicker,
.status-pill,
.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-primary-container);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--md-sys-color-success);
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1 {
    font-size: clamp(2.3rem, 5vw, 3.8rem);
    line-height: 1.06;
    letter-spacing: -0.03em;
    margin: 16px 0 12px;
}

h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    line-height: 1.12;
    margin-bottom: 12px;
}

h3 {
    font-size: 1.05rem;
    line-height: 1.3;
    margin-bottom: 8px;
}

.lead,
.body,
.helper,
.muted {
    color: var(--md-sys-color-on-surface-variant);
}

.lead {
    font-size: 1.05rem;
    max-width: 62ch;
}

.helper,
.muted {
    font-size: 0.94rem;
}

.button-row,
.cta-row,
.toggle-row,
.category-tabs,
.stats-grid,
.card-grid,
.contact-grid,
.feature-grid,
.pricing-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.card-grid,
.contact-grid,
.feature-grid,
.pricing-grid,
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.article-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cta-row,
.toggle-row,
.category-tabs {
    align-items: center;
}

.btn,
.btn-tonal,
.btn-text,
.btn-discord,
.tab-btn,
.btn-full {
    appearance: none;
    border: none;
    border-radius: 999px;
    min-height: 42px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn.danger,
.btn-full.danger {
    background: #92342f;
    color: #ffeceb;
}

.btn,
.btn-full {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    box-shadow: var(--shadow-1);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease, background-color 0.24s ease;
}

.btn-tonal,
.tab-btn.active {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.btn-text,
.tab-btn {
    background: transparent;
    color: var(--md-sys-color-primary);
}

.btn-discord {
    background: #5865f2;
    color: #fff;
}

.btn:hover,
.btn-tonal:hover,
.btn-text:hover,
.btn-discord:hover,
.tab-btn:hover,
.btn-full:hover {
    transform: translateY(-1px);
}

.btn-full {
    width: 100%;
}

.section-stack {
    display: grid;
    gap: 24px;
}

.stats-grid .card strong,
.metric-value,
.price {
    display: block;
    margin-top: 6px;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
}

.price-card.popular {
    border-color: rgba(36, 95, 166, 0.36);
    box-shadow: var(--shadow-2);
}

.price-meta,
.plan-meta,
.inline-list,
.list {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.94rem;
}

.price-features,
.doc-list,
.inline-list {
    margin: 16px 0 0;
    padding-left: 18px;
    color: var(--md-sys-color-on-surface-variant);
}

.price-features li,
.doc-list li,
.inline-list li {
    margin-bottom: 8px;
}

.toggle-row {
    justify-content: center;
}

.toggle-label {
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.92rem;
    font-weight: 500;
}

.toggle-label.active {
    color: var(--md-sys-color-primary);
}

.switch {
    position: relative;
    display: inline-flex;
    width: 52px;
    height: 32px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: var(--md-sys-color-surface-container-high);
    border: 1px solid var(--md-sys-color-outline-variant);
    cursor: pointer;
}

.slider::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #c7cfdb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.switch input:checked + .slider {
    background: var(--md-sys-color-primary-container);
}

.switch input:checked + .slider::before {
    transform: translateX(20px);
}

.search-shell {
    display: grid;
    gap: 16px;
}

.search-field {
    position: relative;
}

.search-input,
.text-input,
textarea {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid var(--md-sys-color-outline-variant);
    background: var(--md-sys-color-surface-bright);
    color: var(--md-sys-color-on-surface);
        outline: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input {
    padding-left: 44px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--md-sys-color-on-surface-variant);
}

.search-input:focus,
.text-input:focus,
textarea:focus {
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 4px rgba(36, 95, 166, 0.12);
}

.article-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    text-decoration: none;
    color: var(--md-sys-color-on-surface);
    background: var(--md-sys-color-surface-container);
    transition: background-color 0.2s ease;
}

.article-link:hover {
    background: var(--md-sys-color-primary-container);
}

details.faq-item {
    border: 1px solid rgba(65, 73, 87, 0.88);
    border-radius: 16px;
    background: var(--md-sys-color-surface-container);
    padding: 14px 16px;
}

details.faq-item + details.faq-item {
    margin-top: 10px;
}

details.faq-item summary {
    cursor: pointer;
    list-style: none;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
}

details.faq-item summary::-webkit-details-marker {
    display: none;
}

details.faq-item p {
    margin-top: 10px;
    color: var(--md-sys-color-on-surface-variant);
}

.auth-layout {
    width: var(--content-width);
    min-height: calc(100vh - 96px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 24px;
    align-items: center;
}

.auth-card {
    max-width: 420px;
    width: 100%;
}

.field-stack {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.error-msg {
    display: none;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 180, 171, 0.14);
    color: #ffd7d1;
    font-size: 0.92rem;
}

.divider-text {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.88rem;
}

.divider-text::before,
.divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--md-sys-color-outline-variant);
}

#password-overlay,
#access-denied {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(8, 11, 16, 0.62);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
    z-index: 100;
}

.dialog {
    width: min(420px, 100%);
    padding: 28px;
    background: var(--md-sys-color-surface);
    border: 1px solid rgba(65, 73, 87, 0.88);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2);
}

.dialog-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.doc-shell {
    padding: 40px 0 56px;
}

.doc-card {
    width: 100%;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
}

.doc-meta {
    margin-bottom: 18px;
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.92rem;
}

.doc-section + .doc-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
}

.doc-section p + p {
    margin-top: 10px;
}

.doc-list strong {
    color: var(--md-sys-color-on-surface);
    font-weight: 600;
}

.dashboard-shell {
    padding: 24px 0 40px;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 20px;
}

.sidebar {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-self: start;
    position: sticky;
    top: 92px;
}

.sidebar .brand {
    margin-bottom: 12px;
}

.nav-item {
    padding: 12px 14px;
    border-radius: 16px;
    text-decoration: none;
    color: var(--md-sys-color-on-surface-variant);
    font-weight: 500;
}

.nav-item:hover,
.nav-item.active {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.user-profile {
    margin-top: auto;
    padding-top: 16px;
    display: grid;
    gap: 8px;
}

.user-label {
    font-size: 0.8rem;
    color: var(--md-sys-color-on-surface-variant);
}

.dashboard-main {
    display: grid;
    gap: 20px;
}

.footer {
    width: var(--content-width);
    margin: 0 auto 24px;
    padding: 18px 0 0;
    border-top: 1px solid var(--md-sys-color-outline-variant);
    color: var(--md-sys-color-on-surface-variant);
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 20px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 14px;
}

.footer-links a {
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-links a:hover {
    color: var(--md-sys-color-primary);
    transform: translateY(-1px);
}

.footer-note {
    margin-top: 0;
}

.reveal {
    animation: reveal-up 0.45s ease both;
}

.reveal-delay-1 { animation-delay: 0.08s; }
.reveal-delay-2 { animation-delay: 0.16s; }
.reveal-delay-3 { animation-delay: 0.24s; }

.surface:hover,
.card:hover,
.price-card:hover,
.dashboard-panel:hover,
.doc-card:hover,
.notice-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-2);
    border-color: rgba(114, 142, 185, 0.48);
}

.badge,
.chip {
    transition: transform 0.25s ease, filter 0.25s ease;
}

.badge:hover,
.chip:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
}

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

html.th-loading body > * {
    visibility: hidden;
}

html.th-loading .th-loader-overlay {
    visibility: visible;
}

.th-loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at center, #1a2330 0%, #0f141b 100%);
    transition: opacity 0.32s ease;
}

.th-loader-mark {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #d9e5f8;
    font-size: clamp(2rem, 8vw, 5rem);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.th-loader-orb {
    width: 0.7em;
    height: 0.7em;
    border-radius: 50%;
    background: linear-gradient(145deg, #72b6ff, #4c82d6);
    box-shadow: 0 0 40px rgba(114, 182, 255, 0.45);
    animation: th-pulse 1.2s ease-in-out infinite;
}

@keyframes th-pulse {
    0%,
    100% {
        transform: scale(0.92);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.06);
        opacity: 1;
    }
}

.th-server-loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at center, #0f1722 0%, #090d14 100%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.th-server-loader.is-active {
    opacity: 1;
    pointer-events: auto;
}

.th-server-loader-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(2rem, 9vw, 5.2rem);
    font-weight: 500;
    letter-spacing: 0.01em;
    color: #dfe8f8;
}

.th-server-part {
    display: inline-flex;
    overflow: hidden;
}

.th-server-start .th-server-letter {
    color: #f2f6ff;
}

.th-server-end .th-server-letter {
    color: #8bb6ff;
}

.th-server-letter {
    transform: translateY(105%);
    opacity: 0;
    animation: th-server-letter-in 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.th-server-start .th-server-letter:nth-child(1) { animation-delay: 0.04s; }
.th-server-start .th-server-letter:nth-child(2) { animation-delay: 0.11s; }
.th-server-start .th-server-letter:nth-child(3) { animation-delay: 0.18s; }
.th-server-start .th-server-letter:nth-child(4) { animation-delay: 0.25s; }
.th-server-end .th-server-letter:nth-child(1) { animation-delay: 0.32s; }
.th-server-end .th-server-letter:nth-child(2) { animation-delay: 0.39s; }
.th-server-end .th-server-letter:nth-child(3) { animation-delay: 0.46s; }
.th-server-end .th-server-letter:nth-child(4) { animation-delay: 0.53s; }

.th-server-orb-wrap {
    width: 0.8em;
    height: 0.8em;
    display: grid;
    place-items: center;
}

.th-server-orb {
    width: 74%;
    height: 74%;
    border-radius: 50%;
    background: linear-gradient(145deg, #7dc0ff, #4f85d8);
    box-shadow: 0 0 44px rgba(106, 176, 255, 0.55), 0 0 0 150vmax rgba(7, 11, 18, 0.4);
    animation: th-server-orb-pulse 0.95s ease-in-out infinite alternate;
}

@keyframes page-fade-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes th-server-letter-in {
    from {
        transform: translateY(105%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes th-server-orb-pulse {
    from {
        transform: scale(0.78);
    }
    to {
        transform: scale(1);
    }
}

@media (max-width: 900px) {
    .hero-grid,
    .auth-layout,
    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 720px) {
    .navbar {
        width: calc(100% - 16px);
        border-radius: 24px;
        top: 8px;
        align-items: flex-start;
        flex-direction: column;
    }

    .nav-links {
        width: 100%;
        justify-content: flex-start;
    }

    .page,
    .doc-shell,
    .dashboard-shell,
    .auth-layout {
        width: calc(100% - 16px);
    }

    .surface,
    .auth-card,
    .doc-card,
    .dashboard-panel,
    .search-shell,
    .notice-card,
    .dialog {
        padding: 22px;
    }
}

