:root {
    --bs-body-font-family: "Nunito", sans-serif;
    --bg-main: linear-gradient(180deg, #75bbe9 0%, #a8e8da 43%, #e6f7d3 72%, #fbffd3 100%);
    --bg-navbar: linear-gradient(180deg, #66afdff0 0%, #93dfd3e8 100%);
    --surface: #ffffff72;
    --surface-strong: #ffffffe0;
    --line: #65a9b56e;
    --text-main: #17383d;
    --text-soft: #17383dcc;
    --accent: #69b9e8;
    --accent-strong: #85dfd3;
    --accent-soft: #e8f8cf;
    --shadow: 0 20px 50px #48879c33;
}

body.theme-alt {
    --bg-main: linear-gradient(180deg, #1b22a4 0%, #4d31b8 43%, #b253dc 72%, #ea67c5 100%);
    --bg-navbar: linear-gradient(180deg, #171f95f2 0%, #4a2db0ed 100%);
    --surface: #221c8a66;
    --surface-strong: #3525a694;
    --line: #f3c0ef5c;
    --text-main: #fffffff2;
    --text-soft: #ffffffc9;
    --accent: #b253dc;
    --accent-strong: #ea67c5;
    --accent-soft: #4d31b8;
    --shadow: 0 22px 56px #13075f69;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Nunito", sans-serif;
    background: #3f3f3f;
    color: var(--text-main);
}

.profile-page-root,
.profile-body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.auth-root,
.auth-page {
    -ms-overflow-style: none;
    scrollbar-width: none;
    overflow: hidden;
}

.profile-page-root::-webkit-scrollbar,
.profile-body::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.auth-root::-webkit-scrollbar,
.auth-page::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.site-shell {
    background: var(--bg-main);
}

.app-navbar {
    background: var(--bg-navbar);
    box-shadow: 0 8px 22px #00000024;
}

.app-navbar__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    position: relative;
}

.app-navbar__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 2;
    justify-self: center;
}

.nav-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 118px;
    padding: 0.7rem 1.3rem;
    border-radius: 0.8rem;
    background: #ffffff29;
    border: 1px solid #ffffff33;
    color: #ffffffe6;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1;
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 16px #180f2d29;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.nav-chip--button {
    font-family: inherit;
    cursor: pointer;
}

.nav-pills-demo {
    gap: 1rem;
}

.auth-actions {
    gap: 1rem;
}

.grid-action-wrap {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.grid-action-button {
    min-width: 180px;
    color: #5f6670;
}

body.theme-alt .grid-action-button {
    color: #ffffff;
}

.nav-chip:hover {
    transform: translateY(-2px);
    background: #ffffff42;
    border-color: #ffffff6b;
    box-shadow: 0 0 0 1px #ffffff29, 0 0 22px #c4b0ff73;
}

.nav-chip--active {
    background: color-mix(in srgb, var(--accent) 64%, #ffffff 12%);
    border-color: color-mix(in srgb, var(--accent) 82%, #ffffff 18%);
    color: #5f6670;
    box-shadow: 0 0 0 1px #ffffff33, 0 8px 22px color-mix(in srgb, var(--accent) 38%, transparent);
}

body.theme-alt .nav-chip--active {
    color: #ffffff;
}

.theme-toggle {
    position: relative;
    width: 110px;
    height: 40px;
    padding: 6px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(90deg, #7ee0ff 0%, #84e6ff 100%);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    transition: background 0.28s ease, box-shadow 0.28s ease, border-color 0.2s ease;
}

.theme-toggle::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.toggle-dot {
    position: absolute;
    top: 50%;
    left: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff176 0%, #ffd54f 35%, #ffb300 100%);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22), inset 0 -5px 10px rgba(0, 0, 0, 0.06);
    transform: translateY(-50%);
    transition: transform 0.24s cubic-bezier(.2, .9, .3, 1), background 0.24s ease, box-shadow 0.24s ease;
}

/* stars for dark mode (initially hidden) */
.theme-toggle::after {
    content: "";
    position: absolute;
    left: 12px;
    top: 8px;
    width: 56px;
    height: 28px;
    pointer-events: none;
    background-image:
        radial-gradient(circle at 12% 60%, #ffea58 0 3px, transparent 4px),
        radial-gradient(circle at 34% 45%, #ffea58 0 5px, transparent 6px),
        radial-gradient(circle at 56% 55%, #ffea58 0 4px, transparent 5px),
        radial-gradient(circle at 78% 35%, #ffea58 0 3px, transparent 4px);
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

body.theme-alt .theme-toggle {
    background: linear-gradient(90deg, #0b3350 0%, #022b3a 100%);
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

body.theme-alt .theme-toggle::after {
    opacity: 1;
    transform: translateY(0);
}

body.theme-alt .toggle-dot {
    transform: translate(58px, -50%);
    background: radial-gradient(circle at 35% 30%, #f2f2f2 0%, #cfcfcf 35%, #9e9e9e 100%);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45), inset -5px -5px 10px rgba(255, 255, 255, 0.03);
}

/* show stars in dark mode; positioned left so they don't overlap the moon */
body.theme-alt .theme-toggle::after {
    opacity: 1;
}

main {
    padding-bottom: 6.5rem;
}

#cards {
    max-width: 1180px;
}

.profile-page {
    max-width: 1180px;
}

.logic-card {
    overflow: hidden;
    border-radius: 1.15rem;
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
    transition: transform 0.25s ease;
}

.logic-card:hover {
    transform: translateY(-6px);
}

.logic-card__visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 190px;
    border: 0;
    padding: 0;
    text-decoration: none;
    background-color: transparent;
    background-position: center;
    background-size: cover;
    cursor: pointer;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.logic-card__visual::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(10, 28, 31, 0.18));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.logic-card__visual::after {
    content: attr(data-description);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.25s ease;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
    pointer-events: none;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.logic-card__visual:hover,
.logic-card__visual:focus-visible {
    transform: scale(1.02);
}

.logic-card__visual:hover::before {
    opacity: 1;
    backdrop-filter: blur(3px) grayscale(100%) brightness(0.7);
    -webkit-backdrop-filter: blur(3px) grayscale(100%) brightness(0.7);
}

.logic-card__visual:hover::after {
    opacity: 1;
}

.logic-card__visual:focus-visible {
    outline: 2px solid #ffffffe6;
    outline-offset: -6px;
}

.logic-card__visual--hacking,
.logic-card__visual--network,
.logic-card__visual--linux,
.logic-card__visual--math,
.logic-card__visual--electronics {
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-position: center center, center, center;
    background-size: cover, cover, cover;
}

.logic-card__visual--hacking {
    background-image:
        url("../img/TryHack.svg"),
        linear-gradient(135deg, #10112238, #1011221a),
        linear-gradient(135deg, #1a2142 0%, #00d4ff 100%);
}

.logic-card__visual--network {
    background-image:
        url("../img/Networking.svg"),
        linear-gradient(135deg, #1b314533, #0c1b2a33),
        linear-gradient(135deg, #74ebd5 0%, #4a69bd 100%);
}

.logic-card__visual--linux {
    background-image:
        url("../img/Linux.svg"),
        linear-gradient(135deg, #171b1e38, #171b1e1f),
        linear-gradient(135deg, #1d1d1d 0%, #f6b93b 100%);
}

.logic-card__visual--math {
    background-image:
        url("../img/Mathematrix.svg"),
        linear-gradient(135deg, #290f403d, #290f401f),
        linear-gradient(135deg, #c471ed 0%, #12c2e9 100%);
}

.logic-card__visual--electronics {
    background-image:
        url("../img/Electronics.svg"),
        linear-gradient(135deg, #112e1e33, #112e1e14),
        linear-gradient(135deg, #42e695 0%, #3b82f6 100%);
}

.logic-card__body {
    padding: 1rem 1.3rem 1.1rem;
    text-align: center;
    border-top: 1px solid var(--line);
}

body.theme-alt .logic-card__body {
    background: #5d3bc9;
}

.logic-card__title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-soft);
}

body.theme-alt .logic-card__title {
    color: #ead7ff;
}


.site-footer {
    padding: 1.25rem 0 5.75rem;
    background: #0714202e;
    border-top: 1px solid #ffffff24;
    text-align: center;
    backdrop-filter: blur(10px);
}

.site-footer__copy,
.site-footer__names {
    margin: 0;
    color: #ffffffe0;
}

.site-footer__copy {
    font-size: 0.92rem;
}

.site-footer__names {
    margin-top: 0.35rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.mobile-nav {
    position: fixed;
    right: 0;
    bottom: 1rem;
    left: 0;
    padding: 0 0 0.35rem;
    z-index: 20;
}

.mobile-nav__inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
}

.auth-layout {
    max-width: 1120px;
}

.auth-layout--single .row {
    justify-content: center;
}

.auth-layout--single .col-12 {
    max-width: 1000px;
}

.auth-card {
    height: 100%;
    padding: 1.75rem;
    border: 1px solid #ffffff2e;
    border-radius: 1.5rem;
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.auth-card--intro {
    background:
        linear-gradient(160deg, #ffffff26, #ffffff12),
        var(--surface);
}

.auth-title {
    margin: 0.35rem 0 1rem;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.05;
    color: var(--text-main);
}

.auth-text,
.auth-switch {
    margin: 0;
    color: var(--text-soft);
    font-size: 1rem;
    line-height: 1.6;
}

.auth-feature-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.75rem;
}

.auth-feature {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    border: 1px solid var(--line);
    background: #ffffff24;
}

.auth-feature__number {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.95rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #ffffff;
    font-weight: 700;
}

.auth-feature__title {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-main);
}

.auth-feature__text {
    margin: 0.35rem 0 0;
    color: var(--text-soft);
}

.auth-form {
    display: grid;
    gap: 0.85rem;
    margin-top: 1.5rem;
}

.auth-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
}

.auth-input {
    width: 100%;
    padding: 0.95rem 1rem;
    border: 1px solid var(--line);
    border-radius: 0.95rem;
    background: #ffffff38;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-input:focus {
    border-color: color-mix(in srgb, var(--accent) 70%, transparent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
    transform: translateY(-1px);
}

.auth-input::placeholder {
    color: var(--text-soft);
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.35rem 0 0.25rem;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text-soft);
}

.auth-check input {
    width: 1rem;
    height: 1rem;
}

.auth-link {
    color: #0d6f90;
    font-weight: 600;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-switch {
    margin-top: 1.2rem;
}

.auth-feedback {
    min-height: 1.5rem;
    margin: 1rem 0 0;
    color: var(--text-soft);
    font-weight: 600;
}

.auth-feedback[data-type="success"] {
    color: #0f6f3b;
}

.auth-feedback[data-type="error"] {
    color: #9d1732;
}

.profile-hero,
.profile-xp-panel,
.profile-panel {
    background: var(--surface);
    border: 1px solid #ffffff2e;
    border-radius: 1.4rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.profile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.75rem;
}

.profile-hero__identity,
.profile-hero__meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-avatar {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 1.5rem;
    background:
        linear-gradient(135deg, #ffffff38, #ffffff0f),
        linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: white;
    font-size: 1.7rem;
    font-weight: 700;
    box-shadow: 0 14px 32px #0a2b2c33;
}

.profile-label,
.profile-panel__eyebrow,
.profile-badge__label,
.profile-info-card__key,
.stat-tile__label {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.profile-name,
.profile-panel__title {
    margin: 0;
    color: var(--text-main);
}

.profile-name {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    font-weight: 700;
}

.profile-handle {
    margin: 0.35rem 0 0;
    color: var(--text-soft);
    font-size: 1rem;
}

.profile-badge {
    min-width: 132px;
    padding: 0.95rem 1rem;
    border-radius: 1.1rem;
    background: #ffffff29;
    border: 1px solid #ffffff29;
}

.profile-badge strong {
    display: block;
    margin-top: 0.3rem;
    font-size: 1.35rem;
    color: var(--text-main);
}

.profile-panel {
    height: 100%;
    padding: 1.6rem;
}

.profile-xp-panel {
    padding: 1.35rem 1.5rem;
}

.profile-xp-panel__header,
.profile-panel__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.profile-xp-panel__header {
    align-items: end;
    margin-bottom: 1rem;
}

.profile-xp-panel__numbers {
    color: var(--text-main);
    font-size: 1rem;
}

.profile-xp-bar {
    width: 100%;
    height: 1rem;
    border-radius: 999px;
    background: #ffffff2e;
    overflow: hidden;
    border: 1px solid #ffffff24;
}

.profile-xp-bar__fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-soft) 0%, var(--accent-strong) 52%, var(--accent) 100%);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 28%, transparent);
    transition: width 0.45s ease;
}

.profile-xp-panel__hint {
    margin: 0.8rem 0 0;
    color: var(--text-soft);
}

.profile-panel__header {
    align-items: flex-start;
    margin-bottom: 1.35rem;
}

.profile-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    background: #55f1682e;
    color: var(--text-main);
    font-size: 0.92rem;
    font-weight: 600;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.profile-info-card,
.stat-tile,
.profile-security-note {
    border-radius: 1rem;
    border: 1px solid var(--line);
    background: #ffffff24;
}

.profile-info-card__value,
.stat-tile__value {
    display: block;
    margin-top: 0.45rem;
    font-size: 1.12rem;
    font-weight: 600;
    color: var(--text-main);
}

.profile-info-card__value--blurred {
    filter: blur(0.28rem);
    user-select: none;
    cursor: pointer;
    transition: filter 0.45s ease, opacity 0.45s ease, transform 0.45s ease;
}

.profile-info-card__value--blurred:hover {
    transform: translateY(-1px);
}

.profile-info-card__value--blurred.is-revealing {
    opacity: 0.96;
}

.profile-info-card__value--blurred.is-visible {
    filter: blur(0);
    opacity: 1;
}

.profile-info-card,
.profile-security-note,
.stat-tile {
    padding: 1rem 1.1rem;
}

.profile-security-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    margin-top: 1rem;
    align-items: stretch;
}

.profile-security-note__key {
    display: inline-block;
    margin-bottom: 0.45rem;
    font-weight: 600;
    color: var(--text-main);
}

.profile-security-note__text {
    margin: 0;
    color: var(--text-soft);
}

.profile-action-button {
    align-self: center;
    border: 1px solid #ffffff2e;
    border-radius: 1rem;
    background: color-mix(in srgb, var(--accent) 22%, transparent);
    color: var(--text-main);
    font-size: 0.98rem;
    font-weight: 600;
    padding: 0.95rem 1.15rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.profile-action-button:hover {
    transform: translateY(-1px);
    background: color-mix(in srgb, var(--accent) 32%, transparent);
}

.profile-action-button--full {
    width: 100%;
}

.profile-modal[hidden] {
    display: none;
}

.profile-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
}

.profile-modal__backdrop {
    position: absolute;
    inset: 0;
    background: #08121c94;
    backdrop-filter: blur(8px);
}

.profile-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(92vw, 540px);
    margin: 10vh auto 0;
    padding: 1.5rem;
    border-radius: 1.35rem;
    border: 1px solid #ffffff2e;
    background: var(--surface-strong);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.profile-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: 0;
    background: transparent;
    color: var(--text-main);
    font-size: 1.25rem;
    line-height: 1;
}

.profile-modal__eyebrow,
.profile-modal__label {
    margin: 0 0 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.profile-modal__title {
    margin: 0;
    color: var(--text-main);
}

.profile-modal__text {
    margin: 0.75rem 0 1.25rem;
    color: var(--text-soft);
}

.profile-modal__form {
    display: grid;
    gap: 0.85rem;
}

.profile-modal__input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 0.95rem;
    padding: 0.9rem 1rem;
    background: #ffffff38;
    color: var(--text-main);
    outline: none;
}

.profile-modal__input::placeholder {
    color: var(--text-soft);
}

.profile-modal__feedback {
    margin: 1rem 0 0;
    color: var(--text-soft);
    min-height: 1.5rem;
}

.stats-stack {
    display: grid;
    gap: 1rem;
}

.stat-tile__value {
    font-size: 1.65rem;
}

body.theme-alt :is(.auth-title,
    .auth-feature__title,
    .profile-name,
    .profile-panel__title,
    .profile-xp-panel__numbers,
    .profile-badge strong,
    .profile-info-card__value,
    .stat-tile__value,
    .profile-security-note__key,
    .profile-status) {
    color: #fffffff2;
}

body.theme-alt :is(.auth-text,
    .auth-switch,
    .auth-feature__text,
    .profile-label,
    .profile-panel__eyebrow,
    .profile-badge__label,
    .profile-handle,
    .profile-xp-panel__hint,
    .profile-info-card__key,
    .stat-tile__label,
    .profile-security-note__text,
    .profile-modal__eyebrow,
    .profile-modal__label,
    .profile-modal__text,
    .profile-modal__feedback) {
    color: #ffffffb8;
}

body.theme-alt :is(.auth-label,
    .auth-input,
    .profile-action-button,
    .profile-modal__close,
    .profile-modal__title,
    .profile-modal__input) {
    color: #fffffff2;
}

body.theme-alt .auth-input::placeholder,
body.theme-alt .profile-modal__input::placeholder {
    color: #ffffffb8;
}

body.theme-alt .profile-action-button {
    background: #ffffff1f;
}

body.theme-alt .profile-action-button:hover {
    background: #ffffff2e;
}

body.theme-alt .auth-input,
body.theme-alt .profile-modal__input {
    background: #ffffff1a;
}

body.theme-alt .auth-link {
    color: #9be7ff;
}

.auth-reset-box {
    margin-top: 1rem;
    border: 1px solid var(--line);
    border-radius: 0.75rem;
    padding: 0.9rem 1rem;
    background: #ffffff1f;
    color: var(--text-main);
    word-break: break-word;
}

.auth-reset-box p {
    margin: 0 0 0.45rem;
    color: var(--text-soft);
    font-weight: 700;
}

@media (min-width: 768px) {
    .navbar-brand {
        justify-self: start;
    }

    .theme-toggle {
        justify-self: end;
    }

    .app-navbar__actions {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: max-content;
    }

    .site-shell {
        min-height: 100vh;
        box-shadow: var(--shadow);
    }

    .app-navbar {
        padding-top: 1.1rem;
        padding-bottom: 1.1rem;
    }

    main {
        padding-bottom: 2rem;
    }

    .site-footer {
        padding: 1.25rem 0;
    }
}

@media (max-width: 767.98px) {
    .app-navbar__inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .app-navbar__actions {
        justify-self: auto;
    }

    html,
    body {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    body::-webkit-scrollbar {
        display: none;
    }

    .navbar-brand {
        font-size: 1rem;
    }

    .theme-toggle {
        width: 52px;
        height: 30px;
    }

    .toggle-dot {
        width: 20px;
        height: 20px;
    }

    body.theme-alt .toggle-dot {
        transform: translateX(22px);
    }

    .logic-card {
        max-width: 320px;
        margin: 0 auto;
    }

    .profile-hero,
    .profile-hero__identity,
    .profile-hero__meta,
    .profile-panel__header,
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .profile-hero,
    .profile-hero__identity,
    .profile-hero__meta,
    .profile-xp-panel__header,
    .profile-panel__header {
        display: grid;
    }

    .profile-avatar {
        width: 76px;
        height: 76px;
        font-size: 1.45rem;
    }

    .profile-panel {
        padding: 1.2rem;
    }

    .auth-card {
        padding: 1.25rem;
    }

    .auth-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-security-row {
        grid-template-columns: 1fr;
    }

    .logic-card__visual {
        min-height: 170px;
    }

    .mobile-nav .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .mobile-nav .nav-chip {
        min-width: 0;
        min-height: 3.35rem;
        padding: 0.8rem 0.75rem;
        border-radius: 0.9rem;
        font-size: 1.02rem;
        font-weight: 600;
        box-shadow: 0 12px 24px #00000029;
    }

    .game-hero,
    .game-layout,
    .answer-grid,
    .quiz-panel__top,
    .quiz-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .quiz-actions {
        justify-items: end;
    }

    .game-hero,
    .topic-panel,
    .quiz-panel {
        border-radius: 1rem;
    }

    .game-hero__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .game-stat {
        min-width: 0;
        padding: 0.75rem 0.55rem;
    }

    .game-stat strong {
        font-size: 1.25rem;
    }

    .topic-panel {
        position: static;
    }

    .question-visual {
        min-height: 190px;
    }
}
