:root {
    --bg: #f4f6f8;
    --bg-doc: #f7f7f7;
    --text: #1f2937;
    --text-doc: #333;
    --text-muted: #4b5563;
    --text-faint: #6b7280;
    --surface: #ffffff;
    --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.10);
    --shadow-doc: 0 4px 8px rgba(0, 0, 0, 0.1);
    --radius-card: 18px;
    --radius-doc: 12px;
    --blue: #2563eb;
    --blue-link: #1976d2;
    --blue-link-alt: #007bff;
    --discord: #5865f2;
    --roblox: #e2231a;
    --green: #16a34a;
    --red: #dc2626;
    --red-doc: #d32f2f;
    --orange: #d97706;
    --dark: #111827;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body.page-center {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    color: var(--text);
}

body.page-doc {
    background: var(--bg-doc);
    color: var(--text-doc);
    line-height: 1.6;
    padding: 1em;
}

.card {
    width: min(92vw, 760px);
    background: var(--surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 2rem;
    text-align: center;
}

.doc-container {
    width: 100%;
    max-width: 800px;
    margin: 1em auto 0;
    padding: 2em;
    background: var(--surface);
    box-shadow: var(--shadow-doc);
    border-radius: var(--radius-doc);
}

.doc-container.narrow {
    max-width: 600px;
    text-align: center;
}

h1 {
    margin: 0 0 1rem;
}

.page-center h1 {
    color: inherit;
}

.page-doc h1 {
    color: var(--blue-link);
}

.title-green {
    color: var(--green) !important;
}

.title-discord {
    color: var(--discord) !important;
}

.title-roblox {
    color: var(--roblox) !important;
}

.title-red {
    color: var(--red) !important;
}

.title-red-doc {
    color: var(--red-doc) !important;
}

.title-orange {
    color: var(--orange) !important;
}

.page-center p {
    margin: 0.7rem 0;
    font-size: 1.05rem;
    color: var(--text-muted);
}

.page-center .line {
    margin: 0.2rem 0;
    font-size: 1.05rem;
    color: var(--text-muted);
}

.page-doc p {
    margin: 0.5em 0;
    font-size: 1.1em;
}

.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.actions.tight {
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.button,
a.button,
button.button {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.65rem 0.95rem;
    border: 0;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    line-height: 1.2;
    cursor: pointer;
    box-sizing: border-box;
    transition: transform 0.15s ease, opacity 0.15s ease, background-color 0.15s ease;
}

.button:hover,
a.button:hover,
button.button:hover {
    transform: translateY(-1px);
    opacity: 0.96;
}

.button-wide {
    min-width: 240px;
}

.button-blue {
    background: var(--blue);
    color: #fff;
}

.button-discord {
    background: var(--discord);
    color: #fff;
}

.button-roblox {
    background: var(--roblox);
    color: #fff;
}

.button-dark {
    background: var(--dark);
    color: #fff;
}

.button-warning {
    background: var(--orange);
    color: #fff;
}

.button-danger {
    background: var(--red);
    color: #fff;
}

.home-link {
    display: block;
    margin-top: 2em;
    text-align: center;
}

.home-link a {
    color: var(--blue-link-alt);
    text-decoration: none;
}

.home-link a:hover {
    text-decoration: underline;
}

a {
    color: var(--blue-link);
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

.note {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-faint);
}

.profile-wrapper {
    width: fit-content;
    max-width: min(92vw, 820px);
    padding: 1rem;
    box-sizing: border-box;
}

.profile-container {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10);
    padding: 1.5rem 1.6rem;
}

.profile-layout {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.profile-main {
    flex: 1 1 auto;
    min-width: 0;
}

.profile-title {
    margin-top: 0;
    margin-bottom: 0.05rem;
    color: var(--blue);
}

.profile-intro {
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
    color: var(--text-muted);
    font-size: 1.02rem;
}

.profile-grid {
    display: grid;
    grid-template-columns: 145px 1fr;
    column-gap: 0.55rem;
    row-gap: 0.35rem;
    align-items: center;
}

.profile-label {
    font-weight: 700;
    color: #374151;
    font-size: 0.92rem;
}

.profile-label.group-start {
    margin-top: 0.45rem;
}

.profile-value {
    word-break: break-word;
    font-size: 0.88rem;
}

.profile-value.group-start {
    margin-top: 0.45rem;
}

.profile-link,
.profile-link:visited,
.profile-link:hover,
.profile-link:active {
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
}

.profile-sidebar {
    width: 168px;
    flex: 0 0 168px;
    display: flex;
    flex-direction: column;
    margin-top: 10px;
}

.profile-avatar-card {
    background: #f8fafc;
    border: none;
    border-radius: 16px;
    padding: 0.4rem;
}

.profile-avatar-frame {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(180deg, #e5e7eb 0%, #dbe4f0 100%);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #e5e7eb;
}

.profile-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    color: #6b7280;
    text-align: center;
    padding: 1rem;
    box-sizing: border-box;
}

.profile-avatar-fallback svg {
    width: 72px;
    height: 72px;
    color: #9ca3af;
}

.profile-avatar-fallback span {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.35;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.35rem;
}

.profile-actions form {
    margin: 0;
    display: flex;
}

@media (max-width: 900px) {
    .profile-layout {
        flex-direction: column;
    }

    .profile-sidebar {
        order: -1;
    }
}

@media (max-width: 640px) {
    .profile-grid {
        grid-template-columns: 1fr;
        row-gap: 0.25rem;
    }

    .profile-label {
        margin-top: 0.55rem;
    }

    .profile-label.group-start {
        margin-top: 0.8rem;
    }

    .profile-value.group-start {
        margin-top: 0;
    }
}