:root {
    --glass-bg: rgba(15, 23, 42, 0.5);
    --glass-strong: rgba(15, 23, 42, 0.82);
    --glass-border: rgba(255, 255, 255, 0.08);
    --primary: #8b5cf6;
    --primary-dark: #4c1d95;
    --accent: #f59e0b;
    --emerald: #10b981;
    --blue: #3b82f6;
    --danger: #ef4444;
    --text: #ffffff;
    --muted: #cbd5e1;
    --deep: #020617;
    --panel-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100vw;
    min-height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden !important;
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
}

html.modal-open {
    overflow: hidden !important;
}

body.play-app-root {
    min-height: 100dvh;
    color: var(--text);
    font-family: Vazirmatn, Tahoma, Arial, sans-serif;
    user-select: none;
    -webkit-user-select: none;
    background: radial-gradient(circle at 50% 0%, #31104e 0%, #0f172a 40%, #020617 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
a {
    touch-action: manipulation;
}

button,
input {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

svg {
    display: block;
}

.game-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    transform: translateZ(0);
}

.game-bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    transform: translateZ(0);
}

.game-orb {
    position: fixed;
    z-index: 0;
    pointer-events: none;
    border-radius: 999px;
    filter: blur(90px);
    animation: orbFloat 20s infinite alternate ease-in-out;
    will-change: transform;
    transform: translateZ(0);
}

.game-orb-1 {
    width: 40vw;
    height: 40vw;
    top: -10%;
    right: -10%;
    background: rgba(139, 92, 246, 0.25);
}

.game-orb-2 {
    width: 50vw;
    height: 50vw;
    bottom: -20%;
    left: -10%;
    background: rgba(245, 158, 11, 0.15);
    animation-delay: -5s;
}

.game-orb-3 {
    width: 30vw;
    height: 30vw;
    top: 30%;
    left: 20%;
    background: rgba(56, 189, 248, 0.15);
    animation-delay: -10s;
}

@keyframes orbFloat {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(3vw, 3vh, 0) scale(1.1); }
    100% { transform: translate3d(-2vw, 5vh, 0) scale(0.9); }
}

.fade-up {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    animation: fadeUpAnim 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    will-change: transform, opacity;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

@keyframes fadeUpAnim {
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.game-header {
    position: relative;
    z-index: 20;
    width: 100%;
    flex: 0 0 auto;
    padding: 16px 12px 8px;
}

.game-header-line {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 2px;
    opacity: 0.6;
    background: linear-gradient(90deg, transparent, #8b5cf6, transparent);
}

.game-header-glow {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 48px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.1), transparent);
}

.game-topbar {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.game-profile-card,
.guest-auth-panel {
    position: relative;
    height: 56px;
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    max-width: min(55%, 320px);
    min-width: 0;
    border-radius: 999px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(90deg, rgba(49, 46, 129, 0.9), rgba(76, 29, 149, 0.78), rgba(15, 23, 42, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-bottom: 3px solid rgba(76, 29, 149, 0.5);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), inset 0 2px 5px rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.game-profile-card::after,
.guest-auth-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.10), transparent);
    transform: skewX(-12deg) translateX(-150%);
    transition: transform 0.9s ease-in-out;
}

.game-profile-card:hover,
.game-profile-card:focus-visible,
.guest-auth-panel:hover {
    transform: translateY(-2px);
    border-color: rgba(167, 139, 250, 0.55);
    box-shadow: 0 12px 30px rgba(139, 92, 246, 0.3), inset 0 2px 5px rgba(255, 255, 255, 0.1);
}

.game-profile-card:hover::after,
.guest-auth-panel:hover::after {
    transform: skewX(-12deg) translateX(150%);
}

.profile-avatar-wrap {
    position: relative;
    z-index: 1;
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    margin-right: -4px;
    filter: drop-shadow(0 4px 10px rgba(139, 92, 246, 0.5));
}

.profile-avatar-spin {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #a855f7 0deg, #ec4899 120deg, #3b82f6 240deg, #a855f7 360deg);
    animation: avatarSpin 3s linear infinite;
}

@keyframes avatarSpin {
    to { transform: rotate(360deg); }
}

.profile-avatar-frame {
    position: absolute;
    inset: 3px;
    display: block;
    overflow: hidden;
    border-radius: 50%;
    background: #0f172a;
    border: 2px solid rgba(224, 231, 255, 0.4);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-level {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: -7px;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    transform: translateX(-50%) rotate(45deg);
    background: linear-gradient(135deg, #fcd34d, #facc15, #ea580c);
    border: 2px solid #0f172a;
    color: #451a03;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.58);
    font-weight: 900;
}

.profile-level span {
    transform: rotate(-45deg);
    font-size: 11px;
    line-height: 1;
    margin-top: 1px;
}

.profile-info {
    position: relative;
    z-index: 1;
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 14px 0 12px;
    overflow: hidden;
}

.profile-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    margin: 2px 0 5px;
}

.profile-name {
    min-width: 0;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 7px;
    padding: 2px 7px;
    color: #451a03;
    font-size: 9px;
    font-weight: 900;
    background: linear-gradient(90deg, #fef3c7, #fbbf24, #ca8a04);
    border: 1px solid rgba(254, 240, 138, 0.5);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.45);
}

.profile-xp-track {
    position: relative;
    width: 100%;
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

.profile-xp-bar {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    min-width: 8px;
    border-radius: 999px;
    background: linear-gradient(270deg, #a78bfa, #e879f9, #6366f1);
    box-shadow: 0 0 10px rgba(217, 70, 239, 0.8);
}

.profile-xp-bar::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 12px;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.6);
    filter: blur(2px);
}

.profile-xp-text {
    display: block;
    width: 100%;
    margin-top: 4px;
    color: rgba(224, 231, 255, 0.9);
    font-size: 9px;
    font-weight: 800;
    text-align: left;
    white-space: nowrap;
}

.guest-auth-panel {
    padding: 0 14px;
    justify-content: space-between;
    gap: 10px;
}

.guest-auth-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
    display: grid;
    gap: 2px;
}

.guest-auth-copy strong {
    font-size: 13px;
    font-weight: 900;
}

.guest-auth-copy small {
    max-width: 160px;
    color: #cbd5e1;
    font-size: 10px;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guest-auth-buttons {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.guest-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 30px;
    border-radius: 999px;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.guest-login {
    background: rgba(255, 255, 255, 0.08);
}

.guest-register {
    background: linear-gradient(135deg, #8b5cf6, #d946ef);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.28);
}

.game-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex: 0 0 auto;
}

.game-resource-coin {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    width: auto;
    max-width: 166px;
    padding: 0 6px 0 6px;
    border-radius: 999px;
    color: #fff;
    background: rgba(2, 6, 23, 0.90);
    border: 1px solid rgba(180, 83, 9, 0.45);
    box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.88), 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.game-resource-coin:hover,
.game-resource-coin:focus-visible {
    border-color: rgba(245, 158, 11, 0.82);
    transform: translateY(-1px);
}

.coin-icon {
    position: relative;
    z-index: 1;
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    display: grid;
    place-items: center;
    margin-right: -12px;
    filter: drop-shadow(0 4px 8px rgba(245, 158, 11, 0.6));
    transition: transform 0.25s ease;
}

.game-resource-coin:hover .coin-icon {
    transform: scale(1.08) rotate(6deg);
}

.coin-icon::before {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.38);
    filter: blur(10px);
    animation: subtlePulse 1.8s infinite alternate ease-in-out;
}

.coin-icon svg {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
}

.coin-value {
    display: block;
    min-width: 54px;
    padding: 3px 6px 0;
    color: #fde68a;
    font-family: Lalezar, Vazirmatn, Tahoma, sans-serif;
    font-size: 20px;
    line-height: 1;
    letter-spacing: 0.08em;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
}

.coin-plus {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(180deg, #fbbf24, #ea580c);
    border: 1px solid rgba(254, 240, 138, 0.58);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.coin-plus svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.game-icon-button {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    color: #c4b5fd;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(99, 102, 241, 0.34);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.game-icon-button:hover,
.game-icon-button:focus-visible {
    color: #fff;
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(129, 140, 248, 0.85);
}

.game-icon-button svg {
    width: 26px;
    height: 26px;
    transition: transform 0.35s ease;
}

.game-icon-button:hover svg {
    transform: rotate(90deg);
}

@keyframes subtlePulse {
    from { opacity: 0.48; transform: scale(0.92); }
    to { opacity: 0.88; transform: scale(1.05); }
}

.game-main-scroll {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.game-main-scroll::-webkit-scrollbar {
    display: none;
}

.game-main-content {
    width: 100%;
    max-width: 1280px;
    min-height: 100%;
    margin: 0 auto;
    padding: 32px 16px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
}

.game-hero-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.game-season-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 7px 14px;
    border-radius: 999px;
    color: #c4b5fd;
    font-size: 12px;
    font-weight: 900;
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3), var(--panel-shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.live-dot {
    position: relative;
    display: inline-flex;
    width: 12px;
    height: 12px;
}

.live-dot::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #a78bfa;
    opacity: 0.75;
    animation: livePing 1.2s infinite cubic-bezier(0, 0, 0.2, 1);
}

.live-dot span {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: #8b5cf6;
}

@keyframes livePing {
    75%, 100% { transform: scale(2); opacity: 0; }
}

.game-main-title {
    margin: 0;
    font-family: Lalezar, Vazirmatn, Tahoma, sans-serif;
    font-weight: 400;
    font-size: clamp(56px, 13vw, 120px);
    line-height: 0.98;
    letter-spacing: -0.03em;
    color: transparent;
    background: linear-gradient(180deg, #ffffff, #fde047 45%, #d97706 100%);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 10px 40px rgba(245, 158, 11, 0.5), 0 2px 5px rgba(255, 255, 255, 0.5);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}

.game-sub-title {
    max-width: 560px;
    margin: 10px auto 0;
    color: rgba(203, 213, 225, 0.9);
    font-size: 15px;
    line-height: 1.9;
    font-weight: 600;
}

.game-menu-container {
    width: 100%;
    max-width: 448px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.menu-card {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    overflow: hidden;
    border-radius: 20px;
    color: #fff;
    text-align: right;
    transform: perspective(500px) translate3d(0, 0, 0);
    transition: transform 0.28s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.28s ease, border-color 0.28s ease, background 0.28s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    will-change: transform, box-shadow;
}

.menu-card::before {
    content: '';
    position: absolute;
    z-index: 1;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-25deg) translate3d(-300%, 0, 0);
    transition: transform 0.5s ease-out;
}

.menu-card:hover::before,
.menu-card:focus-visible::before {
    transform: skewX(-25deg) translate3d(300%, 0, 0);
}

.menu-card:active {
    transform: perspective(500px) scale(0.96) translate3d(0, 0, 0);
}

.menu-card > * {
    position: relative;
    z-index: 2;
}

.menu-card-body,
.menu-row,
.news-row {
    display: flex;
    align-items: center;
    min-width: 0;
}

.menu-card-body {
    justify-content: space-between;
    gap: 16px;
}

.menu-row,
.news-row {
    justify-content: flex-start;
    gap: 10px;
}

.card-primary {
    padding: 20px;
    background: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%);
    border: 1px solid rgba(196, 181, 253, 0.5);
    border-top: 2px solid rgba(255, 255, 255, 0.4);
    border-bottom: 4px solid rgba(0, 0, 0, 0.3);
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.5), inset 0 2px 10px rgba(255, 255, 255, 0.2);
    animation: btnBreatheGlow 3s infinite alternate ease-in-out;
}

@keyframes btnBreatheGlow {
    0% { box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4), inset 0 2px 10px rgba(255,255,255,0.1); border-color: rgba(196, 181, 253, 0.4); }
    100% { box-shadow: 0 15px 40px rgba(168, 85, 247, 0.8), inset 0 2px 20px rgba(255,255,255,0.4); border-color: rgba(255,255,255,0.8); }
}

.card-primary:hover,
.card-primary:focus-visible {
    animation-play-state: paused;
    transform: perspective(500px) translateY(-3px) translate3d(0, 0, 0);
    border-color: #fff;
    background: linear-gradient(135deg, #8b5cf6 0%, #5b21b6 100%);
}

.card-secondary,
.card-tertiary {
    padding: 14px 12px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.92));
}

.card-secondary {
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-right: 4px solid var(--accent);
}

.card-tertiary {
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-right: 4px solid var(--emerald);
}

.card-secondary:hover,
.card-secondary:focus-visible {
    border-color: #fcd34d;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.4);
    transform: perspective(500px) translate3d(-2px, -2px, 0) scale(1.02);
}

.card-tertiary:hover,
.card-tertiary:focus-visible {
    border-color: #34d399;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
    transform: perspective(500px) translate3d(-2px, -2px, 0) scale(1.02);
}

.card-news {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px;
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.82));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 3px solid var(--blue);
}

.card-news:hover,
.card-news:focus-visible {
    border-color: rgba(59, 130, 246, 0.42);
    border-right-color: #60a5fa;
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.92));
    transform: perspective(500px) translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5), 0 0 15px rgba(59, 130, 246, 0.3);
}

.duo-menu-grid,
.mini-menu-grid {
    display: grid;
    width: 100%;
    gap: 12px;
}

.duo-menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-mini {
    min-height: 96px;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    text-align: center;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.62), rgba(15, 23, 42, 0.82));
    border: 1px solid rgba(255,255,255,0.1);
    border-bottom: 3px solid rgba(255,255,255,0.1);
}

.card-mini:hover,
.card-mini:focus-visible {
    background: linear-gradient(180deg, rgba(51, 65, 85, 0.82), rgba(30, 41, 59, 0.92));
    border-color: rgba(255,255,255,0.3);
    border-bottom-color: var(--primary);
    transform: perspective(500px) translate3d(0, -5px, 0);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5), 0 0 15px rgba(139, 92, 246, 0.3);
}

.card-mini.exit:hover,
.card-mini.exit:focus-visible {
    border-bottom-color: var(--danger);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5), 0 0 15px rgba(239, 68, 68, 0.3);
}

.menu-title,
.card-mini strong {
    display: block;
    color: #fff;
    font-family: Lalezar, Vazirmatn, Tahoma, sans-serif;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.65);
}

.menu-title {
    font-size: 22px;
}

.menu-title.big {
    font-size: 34px;
}

.card-mini strong {
    font-size: 20px;
}

.menu-desc {
    display: block;
    margin-top: 5px;
    color: rgba(226, 232, 240, 0.9);
    font-size: 11px;
    line-height: 1.7;
    font-weight: 800;
}

.menu-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #334155, #0f172a);
    border: 1px solid rgba(100, 116, 139, 0.8);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.45);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
    will-change: transform;
}

.primary-icon {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    border: 2px solid #fde68a;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.6), inset 0 2px 10px rgba(255, 255, 255, 0.5);
}

.primary-icon svg {
    width: 36px;
    height: 36px;
    margin-left: 4px;
}

.menu-icon svg {
    width: 24px;
    height: 24px;
}

.amber-icon { color: #fbbf24; }
.green-icon { color: #34d399; }

.news-icon {
    position: relative;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.18);
    border: 1px solid rgba(59, 130, 246, 0.32);
    box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.25);
}

.news-icon svg {
    width: 23px;
    height: 23px;
}

.news-dot {
    position: absolute;
    top: -1px;
    right: -1px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #ef4444;
    border: 1px solid #0f172a;
    box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.65);
    animation: dotPulse 1.3s infinite;
}

@keyframes dotPulse {
    70% { box-shadow: 0 0 0 8px rgba(248, 113, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); }
}

.news-arrow {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    color: #64748b;
    transition: transform 0.3s ease, color 0.3s ease;
}

.card-news:hover .news-arrow,
.card-news:focus-visible .news-arrow {
    color: #60a5fa;
    transform: translateX(-4px);
}

.menu-card:hover .menu-icon,
.menu-card:focus-visible .menu-icon,
.menu-card:hover .mini-icon,
.menu-card:focus-visible .mini-icon {
    transform: translate3d(0, -3px, 0) scale(1.1);
    filter: drop-shadow(0 5px 10px rgba(255, 255, 255, 0.35));
}

.mini-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

.mini-icon svg {
    width: 30px;
    height: 30px;
}

.cyan-icon { color: #22d3ee; }
.pink-icon { color: #f472b6; }
.emerald-icon { color: #34d399; }
.red-icon { color: #f87171; }

.game-footer {
    position: relative;
    z-index: 20;
    flex: 0 0 auto;
    width: 100%;
}

.footer-card {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 24px;
}

.footer-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
    white-space: nowrap;
}

.footer-status span {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #4ade80;
    border: 1px solid #bbf7d0;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.82);
    animation: subtlePulse 1.2s infinite alternate ease-in-out;
}

.footer-credit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 58%;
    min-width: 0;
    padding: 8px 14px;
    border-radius: 14px;
    color: #fff;
    background: rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom-color: rgba(255, 255, 255, 0.10);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.35);
    transition: background 0.25s ease, border-color 0.25s ease;
}

.footer-credit:hover,
.footer-credit:focus-visible {
    background: rgba(0, 0, 0, 0.62);
    border-color: rgba(217, 70, 239, 0.45);
}

.footer-credit small {
    color: rgba(199, 210, 254, 0.82);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.footer-credit strong {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: #fff;
    font-family: Lalezar, Vazirmatn, Tahoma, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
}

.footer-credit-icon {
    color: #e879f9;
    filter: drop-shadow(0 0 8px rgba(232, 121, 249, 0.8));
}

.game-modal {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    opacity: 0;
    visibility: hidden;
    background: rgba(2, 6, 23, 0.90);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.game-modal.is-active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    position: relative;
    width: min(90vw, 390px);
    max-height: calc(100dvh - 36px);
    overflow: auto;
    border-radius: 28px;
    padding: 26px;
    color: #fff;
    text-align: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 0 60px rgba(245, 158, 11, 0.12), var(--panel-shadow);
    transform: translate3d(0, 30px, 0) scale(0.82);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.game-modal.is-active .modal-card {
    transform: translate3d(0, 0, 0) scale(1);
}

.modal-card::before,
.modal-card::after {
    content: '';
    position: absolute;
    width: 128px;
    height: 128px;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(42px);
}

.modal-card::before {
    top: -64px;
    right: -64px;
    background: rgba(245, 158, 11, 0.16);
}

.modal-card::after {
    left: -64px;
    bottom: -64px;
    background: rgba(139, 92, 246, 0.16);
}

.modal-card > * {
    position: relative;
    z-index: 1;
}

.modal-card-violet {
    border-color: rgba(245, 158, 11, 0.3);
}

.modal-card-red {
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 45px rgba(239, 68, 68, 0.18), var(--panel-shadow);
}

.modal-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: inset 0 0 20px rgba(245, 158, 11, 0.14), 0 10px 20px rgba(0, 0, 0, 0.4);
    transform: rotate(3deg);
}

.modal-icon svg {
    width: 40px;
    height: 40px;
    transform: rotate(-3deg);
}

.modal-icon-violet {
    color: #fbbf24;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(249, 115, 22, 0.14));
}

.modal-icon-blue {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.16);
}

.modal-icon-red {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.3);
}

.modal-card h2 {
    margin: 0 0 12px;
    font-family: Lalezar, Vazirmatn, Tahoma, sans-serif;
    font-size: 32px;
    font-weight: 400;
    line-height: 1.2;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
}

.modal-card p,
.modal-message-text {
    margin: 0;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 2;
    font-weight: 600;
    white-space: pre-line;
}

.coming-soon-message {
    display: grid;
    gap: 12px;
    margin: 0 0 18px;
}

.coming-soon-date-box {
    border-radius: 18px;
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.28);
}

.coming-soon-date-box span {
    display: block;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.7;
}

.coming-soon-date-box strong {
    display: block;
    margin-top: 4px;
    color: transparent;
    background: linear-gradient(90deg, #fde68a, #facc15, #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    font-family: Lalezar, Vazirmatn, Tahoma, sans-serif;
    font-size: 34px;
    font-weight: 400;
    line-height: 1.1;
    filter: drop-shadow(0 2px 10px rgba(245, 158, 11, 0.55));
}

.coming-soon-message p {
    margin: 0;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 2;
}

.coming-soon-message small {
    display: block;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.9;
}

.support-actions {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.support-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 14px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(90deg, #10b981, #059669);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.credits-message {
    display: grid;
    gap: 16px;
    margin-bottom: 20px;
}

.credits-team-badge {
    color: #fff;
    font-family: Lalezar, Vazirmatn, Tahoma, sans-serif;
    font-size: 30px;
    line-height: 1;
}

.credits-list {
    display: grid;
    gap: 12px;
}

.credits-member {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    text-align: right;
    background: rgba(15, 23, 42, 0.56);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.22);
}

.credits-avatar {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #e879f9;
    background: rgba(217, 70, 239, 0.16);
    font-size: 24px;
}

.credits-info {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.credits-role {
    color: rgba(245, 208, 254, 0.75);
    font-size: 12px;
    font-weight: 800;
}

.credits-name {
    color: #fff;
    font-family: Lalezar, Vazirmatn, Tahoma, sans-serif;
    font-size: 25px;
    font-weight: 400;
    line-height: 1.1;
}

.modal-primary,
.modal-secondary,
.modal-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    border-radius: 15px;
    padding: 12px 18px;
    color: #fff;
    font-weight: 900;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.modal-primary {
    margin-top: 18px;
    background: linear-gradient(90deg, #f59e0b, #ea580c);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.36);
}

.modal-primary:hover,
.modal-primary:focus-visible,
.modal-secondary:hover,
.modal-secondary:focus-visible,
.modal-danger:hover,
.modal-danger:focus-visible,
.support-link:hover,
.support-link:focus-visible {
    transform: scale(1.03);
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 22px;
}

.modal-secondary {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-danger {
    background: linear-gradient(90deg, #dc2626, #e11d48);
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.38);
}

.settings-card {
    text-align: right;
    border-color: rgba(255, 255, 255, 0.10);
}

.settings-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.settings-head h2 {
    margin: 0;
}

.settings-close {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.06);
    font-size: 28px;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease;
}

.settings-close:hover,
.settings-close:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.10);
}

.settings-list {
    display: grid;
    gap: 12px;
}

.settings-row {
    position: relative;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.settings-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 900;
}

.settings-badge {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-weight: 900;
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.18);
}

.settings-badge.violet { color: #c4b5fd; background: rgba(139, 92, 246, 0.18); }
.settings-badge.green { color: #34d399; background: rgba(16, 185, 129, 0.18); }
.settings-badge.amber { color: #fbbf24; background: rgba(245, 158, 11, 0.18); }

.toggle-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-ui {
    position: relative;
    width: 48px;
    height: 24px;
    flex: 0 0 48px;
    border-radius: 999px;
    background: #475569;
    cursor: pointer;
    transition: background 0.25s ease;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35);
}

.toggle-ui::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toggle-input:checked + .toggle-ui {
    background: var(--primary);
}

.toggle-input:checked + .toggle-ui::after {
    transform: translateX(24px);
}

@media (min-width: 768px) {
    .game-header {
        padding: 24px 24px 10px;
    }

    .game-profile-card,
    .guest-auth-panel {
        height: 64px;
    }

    .profile-avatar-wrap {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
        margin-right: -8px;
    }

    .profile-level {
        width: 32px;
        height: 32px;
    }

    .profile-name {
        font-size: 15px;
    }

    .profile-xp-track {
        height: 10px;
    }

    .game-resource-coin,
    .game-icon-button {
        height: 56px;
    }

    .game-icon-button {
        width: 56px;
        flex-basis: 56px;
    }

    .coin-icon {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
    }

    .coin-value {
        min-width: 70px;
        font-size: 26px;
    }

    .coin-plus {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .game-main-content {
        padding: 34px 24px 42px;
        gap: 34px;
    }

    .game-season-badge {
        margin-bottom: 24px;
        padding: 9px 16px;
        font-size: 14px;
    }

    .game-sub-title {
        display: block;
        font-size: 20px;
    }

    .game-menu-container {
        gap: 16px;
    }

    .card-primary {
        padding: 24px;
    }

    .menu-title.big {
        font-size: 42px;
    }

    .menu-title {
        font-size: 25px;
    }

    .menu-desc {
        font-size: 12px;
    }

    .card-mini {
        min-height: 106px;
    }

    .footer-card {
        padding: 18px 32px;
    }
}

@media (min-width: 1024px) {
    .game-main-content {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 48px;
        padding-top: 24px;
        padding-bottom: 24px;
    }

    .game-hero-section {
        flex: 1 1 0;
        align-items: flex-start;
        text-align: right;
    }

    .game-sub-title {
        margin-right: 0;
        margin-left: 0;
    }

    .game-menu-container {
        flex: 0 0 min(448px, 43vw);
    }
}

@media (max-width: 640px) {
    .profile-badge,
    .profile-xp-text,
    .guest-auth-copy small,
    .footer-credit small {
        display: none;
    }

    .guest-auth-panel {
        max-width: 56%;
    }

    .guest-auth-btn {
        min-width: 46px;
        height: 29px;
        padding: 0 10px;
    }

    .game-sub-title {
        display: none;
    }

    .game-main-content {
        padding-top: 28px;
        gap: 22px;
    }

    .menu-title.big {
        font-size: 32px;
    }

    .primary-icon {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
    }
}

@media (max-width: 380px) {
    .game-header {
        padding-right: 8px;
        padding-left: 8px;
    }

    .game-profile-card,
    .guest-auth-panel {
        max-width: 54%;
    }

    .game-header-actions {
        gap: 4px;
    }

    .game-resource-coin {
        max-width: 136px;
    }

    .coin-value {
        min-width: 42px;
        font-size: 17px;
        padding-inline: 3px;
    }

    .coin-plus {
        width: 25px;
        height: 25px;
        flex-basis: 25px;
    }

    .game-icon-button {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .menu-title {
        font-size: 20px;
    }

    .menu-desc {
        font-size: 10px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .game-header {
        padding: 8px 16px 4px;
    }

    .game-profile-card,
    .guest-auth-panel {
        height: 48px;
        max-width: min(45%, 300px);
    }

    .profile-avatar-wrap {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
    }

    .profile-level {
        width: 22px;
        height: 22px;
        bottom: -4px;
        border-radius: 6px;
    }

    .profile-level span {
        font-size: 9px;
    }

    .profile-name {
        font-size: 11px;
    }

    .profile-xp-track {
        height: 7px;
    }

    .profile-xp-text,
    .profile-badge,
    .guest-auth-copy small {
        display: none;
    }

    .game-resource-coin {
        height: 40px;
        max-width: 136px;
    }

    .game-icon-button {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .game-icon-button svg {
        width: 22px;
        height: 22px;
    }

    .coin-icon {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
        margin-right: -9px;
    }

    .coin-value {
        min-width: 48px;
        font-size: 15px;
        padding-inline: 3px;
    }

    .coin-plus {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
    }

    .game-main-content {
        flex-direction: row;
        align-items: flex-start;
        justify-content: center;
        gap: 16px;
        padding: 14px 16px 18px;
        min-height: auto;
    }

    .game-hero-section {
        width: 45%;
        flex: 0 1 45%;
        align-items: flex-start;
        text-align: right;
    }

    .game-season-badge {
        margin-bottom: 8px;
        padding: 5px 9px;
        font-size: 11px;
    }

    .live-dot {
        width: 8px;
        height: 8px;
    }

    .game-main-title {
        font-size: clamp(44px, 12vh, 56px);
        line-height: 0.96;
    }

    .game-sub-title {
        display: none;
    }

    .game-menu-container {
        width: 55%;
        max-width: 520px;
        gap: 8px;
    }

    .card-primary {
        padding: 10px 12px;
    }

    .menu-title.big {
        font-size: 25px;
    }

    .menu-title {
        font-size: 18px;
    }

    .menu-desc {
        margin-top: 2px;
        font-size: 9px;
        line-height: 1.4;
    }

    .duo-menu-grid,
    .mini-menu-grid {
        gap: 8px;
    }

    .mini-menu-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .card-secondary,
    .card-tertiary,
    .card-news {
        padding: 8px;
    }

    .menu-icon {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
        border-radius: 10px;
    }

    .menu-icon svg {
        width: 18px;
        height: 18px;
    }

    .primary-icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        border-radius: 13px;
    }

    .primary-icon svg {
        width: 23px;
        height: 23px;
    }

    .news-icon {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    .news-icon svg {
        width: 18px;
        height: 18px;
    }

    .news-dot {
        width: 9px;
        height: 9px;
    }

    .news-arrow {
        width: 18px;
        height: 18px;
        flex-basis: 18px;
    }

    .card-mini {
        min-height: 56px;
        padding: 8px 5px;
        gap: 4px;
        border-radius: 15px;
    }

    .mini-icon {
        width: 22px;
        height: 22px;
    }

    .mini-icon svg {
        width: 21px;
        height: 21px;
    }

    .card-mini strong {
        font-size: 15px;
    }

    .footer-card {
        padding: 5px 20px 7px;
    }

    .footer-status {
        font-size: 11px;
    }

    .footer-credit {
        padding: 6px 10px;
        border-radius: 12px;
    }

    .footer-credit strong {
        font-size: 15px;
    }

    .modal-card {
        width: min(90vw, 360px);
        padding: 16px;
        border-radius: 22px;
    }

    .modal-icon {
        width: 54px;
        height: 54px;
        margin-bottom: 8px;
        border-radius: 16px;
    }

    .modal-icon svg {
        width: 28px;
        height: 28px;
    }

    .modal-card h2 {
        font-size: 23px;
        margin-bottom: 8px;
    }

    .coming-soon-message {
        gap: 8px;
        margin-bottom: 12px;
    }

    .coming-soon-date-box {
        padding: 8px 12px;
    }

    .coming-soon-date-box strong {
        font-size: 24px;
    }

    .coming-soon-message p,
    .modal-card p,
    .modal-message-text {
        font-size: 12px;
        line-height: 1.7;
    }

    .modal-primary,
    .modal-secondary,
    .modal-danger {
        min-height: 38px;
        padding: 8px 14px;
    }
}

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

/* ===== Patch 3.1.1: guest header, original background, direct-link menu, polished modals ===== */
body.play-app-root {
    background: radial-gradient(circle at 50% 0%, #31104e 0%, #0f172a 40%, #020617 100%);
}

.game-orb-1 {
    width: min(40vw, 460px);
    height: min(40vw, 460px);
}

.game-orb-2 {
    width: min(50vw, 560px);
    height: min(50vw, 560px);
}

.game-orb-3 {
    width: min(30vw, 360px);
    height: min(30vw, 360px);
}

.game-topbar.is-guest {
    gap: 10px;
}

.game-topbar.is-guest .guest-auth-panel {
    max-width: none;
    flex: 1 1 auto;
    min-width: 0;
    height: 58px;
    padding: 0 66px 0 12px;
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(30, 27, 75, 0.96), rgba(76, 29, 149, 0.82) 48%, rgba(15, 23, 42, 0.96)),
        radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.20), transparent 36%);
    border: 1px solid rgba(196, 181, 253, 0.30);
    border-bottom: 3px solid rgba(139, 92, 246, 0.45);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.48), inset 0 1px 16px rgba(255, 255, 255, 0.10);
}

.game-topbar.is-guest .guest-auth-panel::before {
    content: '♫';
    position: absolute;
    z-index: 1;
    right: 14px;
    top: 50%;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #fff7ed;
    font-family: Lalezar, Vazirmatn, Tahoma, sans-serif;
    font-size: 24px;
    line-height: 1;
    background: linear-gradient(135deg, #f59e0b, #d946ef);
    box-shadow: 0 0 22px rgba(245, 158, 11, 0.32), inset 0 1px 8px rgba(255, 255, 255, 0.24);
    transform: translateY(-50%) rotate(-8deg);
    pointer-events: none;
}

.game-topbar.is-guest .guest-auth-copy {
    gap: 1px;
}

.game-topbar.is-guest .guest-auth-copy strong {
    font-size: 15px;
    letter-spacing: -0.01em;
}

.game-topbar.is-guest .guest-auth-copy small {
    max-width: none;
    color: rgba(226, 232, 240, 0.86);
    font-size: 11px;
}

.game-topbar.is-guest .guest-auth-buttons {
    gap: 8px;
}

.game-topbar.is-guest .guest-auth-btn {
    min-width: 76px;
    height: 38px;
    padding: 0 16px;
    border-radius: 14px;
    font-size: 12px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.game-topbar.is-guest .guest-auth-btn:hover,
.game-topbar.is-guest .guest-auth-btn:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.38);
}

.game-topbar.is-guest .guest-login {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.16);
}

.game-topbar.is-guest .guest-register {
    background: linear-gradient(135deg, #f59e0b, #d946ef 56%, #7c3aed);
    box-shadow: 0 10px 24px rgba(217, 70, 239, 0.24), 0 0 18px rgba(245, 158, 11, 0.18);
}

.game-topbar.is-guest .game-resource-coin {
    display: none !important;
}

.mini-menu-grid-guest {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.game-modal {
    padding: 14px;
}

.modal-card {
    width: min(92vw, 430px);
    padding: clamp(18px, 4vw, 30px);
    border-radius: 32px;
    background:
        linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(30, 27, 75, 0.82)),
        radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.12), transparent 42%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.62),
        0 0 50px rgba(139, 92, 246, 0.14),
        inset 0 1px 18px rgba(255, 255, 255, 0.06);
}

.modal-card-blue {
    border-color: rgba(96, 165, 250, 0.30);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.62), 0 0 54px rgba(59, 130, 246, 0.18), inset 0 1px 18px rgba(255, 255, 255, 0.06);
}

.modal-card-violet {
    border-color: rgba(245, 158, 11, 0.30);
}

.modal-card h2 {
    font-size: clamp(26px, 7vw, 36px);
    margin-bottom: 10px;
}

.modal-icon {
    position: relative;
    isolation: isolate;
    width: clamp(60px, 17vw, 82px);
    height: clamp(60px, 17vw, 82px);
    margin-bottom: 14px;
}

.modal-icon::after {
    content: '';
    position: absolute;
    inset: -7px;
    z-index: -1;
    border-radius: 28px;
    background: radial-gradient(circle, currentColor 0%, transparent 64%);
    opacity: 0.18;
    filter: blur(10px);
}

.modal-icon-amber {
    color: #fbbf24;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.20), rgba(249, 115, 22, 0.14));
}

.coming-soon-message {
    gap: 12px;
    margin-bottom: 20px;
}

.coming-soon-kicker {
    display: inline-flex;
    justify-content: center;
    justify-self: center;
    padding: 5px 12px;
    border-radius: 999px;
    color: #fde68a;
    font-size: 11px;
    font-weight: 900;
    background: rgba(245, 158, 11, 0.10);
    border: 1px solid rgba(245, 158, 11, 0.22);
}

.coming-soon-date-box {
    position: relative;
    overflow: hidden;
    padding: 16px;
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(49, 46, 129, 0.48)),
        radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.16), transparent 55%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: inset 0 2px 18px rgba(0, 0, 0, 0.35), 0 10px 28px rgba(0, 0, 0, 0.24);
}

.coming-soon-date-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transform: skewX(-18deg) translateX(-135%);
    animation: modalShine 3.4s infinite ease-in-out;
}

@keyframes modalShine {
    0%, 35% { transform: skewX(-18deg) translateX(-135%); }
    75%, 100% { transform: skewX(-18deg) translateX(135%); }
}

.coming-soon-date-box > * {
    position: relative;
    z-index: 1;
}

.coming-soon-date-box span {
    color: rgba(226, 232, 240, 0.88);
}

.coming-soon-date-box strong {
    font-size: clamp(28px, 9vw, 40px);
}

.coming-soon-progress {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 7px;
    direction: ltr;
}

.coming-soon-progress span {
    display: block;
    height: 5px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.28), rgba(245, 158, 11, 0.72));
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.18);
}

.coming-soon-message p {
    color: rgba(226, 232, 240, 0.90);
    font-size: 13px;
    line-height: 1.95;
}

.coming-soon-message small {
    padding: 10px 12px;
    border-radius: 16px;
    color: rgba(203, 213, 225, 0.92);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 640px) {
    .game-topbar.is-guest .guest-auth-panel {
        height: 54px;
        padding-right: 58px;
        border-radius: 22px;
    }

    .game-topbar.is-guest .guest-auth-panel::before {
        right: 12px;
        width: 34px;
        height: 34px;
        border-radius: 14px;
        font-size: 21px;
    }

    .game-topbar.is-guest .guest-auth-copy small {
        display: block;
        max-width: 120px;
        font-size: 9px;
    }

    .game-topbar.is-guest .guest-auth-copy strong {
        font-size: 13px;
    }

    .game-topbar.is-guest .guest-auth-buttons {
        gap: 6px;
    }

    .game-topbar.is-guest .guest-auth-btn {
        min-width: 57px;
        height: 34px;
        padding: 0 10px;
        border-radius: 13px;
        font-size: 11px;
    }

    .mini-menu-grid-guest {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .mini-menu-grid-guest .card-mini {
        min-height: 84px;
        padding-inline: 6px;
    }

    .mini-menu-grid-guest .card-mini strong {
        font-size: 16px;
    }
}

@media (max-width: 380px) {
    .game-topbar.is-guest {
        gap: 6px;
    }

    .game-topbar.is-guest .guest-auth-panel {
        padding-right: 50px;
        padding-left: 8px;
    }

    .game-topbar.is-guest .guest-auth-panel::before {
        right: 9px;
        width: 32px;
        height: 32px;
    }

    .game-topbar.is-guest .guest-auth-copy small {
        display: none;
    }

    .game-topbar.is-guest .guest-auth-btn {
        min-width: 50px;
        padding: 0 8px;
        font-size: 10px;
    }

    .mini-menu-grid-guest .card-mini strong {
        font-size: 14px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .game-topbar.is-guest .guest-auth-panel {
        height: 46px;
        padding-right: 54px;
    }

    .game-topbar.is-guest .guest-auth-panel::before {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .game-topbar.is-guest .guest-auth-copy small {
        display: block;
        font-size: 9px;
    }

    .game-topbar.is-guest .guest-auth-btn {
        height: 31px;
        min-width: 60px;
        border-radius: 12px;
    }

    .mini-menu-grid-guest {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .modal-card {
        width: min(92vw, 390px);
        max-height: calc(100dvh - 22px);
        padding: 14px 16px;
        border-radius: 24px;
    }

    .coming-soon-message {
        gap: 7px;
        margin-bottom: 10px;
    }

    .coming-soon-date-box {
        padding: 9px 12px;
    }

    .coming-soon-date-box strong {
        font-size: 25px;
    }

    .coming-soon-message p,
    .coming-soon-message small {
        font-size: 11px;
        line-height: 1.55;
    }
}

@media (prefers-reduced-motion: reduce) {
    .coming-soon-date-box::before {
        animation: none !important;
    }
}

/* ===== Patch 3.1.2: visitor-friendly copy, game-team credits modal, landscape title placement ===== */
.modal-card-credits {
    border-color: rgba(232, 121, 249, 0.36);
    background:
        radial-gradient(circle at 50% -20%, rgba(245, 158, 11, 0.20), transparent 35%),
        radial-gradient(circle at 15% 12%, rgba(59, 130, 246, 0.16), transparent 32%),
        linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(49, 46, 129, 0.86) 52%, rgba(15, 23, 42, 0.96));
    box-shadow:
        0 26px 78px rgba(0, 0, 0, 0.68),
        0 0 56px rgba(217, 70, 239, 0.18),
        inset 0 1px 20px rgba(255, 255, 255, 0.08);
}

.modal-card-credits::before {
    background: rgba(217, 70, 239, 0.20);
}

.modal-card-credits::after {
    background: rgba(245, 158, 11, 0.18);
}

.credits-game-team {
    text-align: right;
    gap: 14px;
}

.credits-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(76, 29, 149, 0.58), rgba(15, 23, 42, 0.76)),
        radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.22), transparent 42%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 18px rgba(255, 255, 255, 0.06), 0 12px 28px rgba(0, 0, 0, 0.26);
}

.credits-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.10), transparent);
    transform: skewX(-18deg) translateX(-140%);
    animation: modalShine 4.2s infinite ease-in-out;
}

.credits-hero-icon {
    position: relative;
    z-index: 1;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    color: #fff7ed;
    font-family: Lalezar, Vazirmatn, Tahoma, sans-serif;
    font-size: 38px;
    line-height: 1;
    background: conic-gradient(from 20deg, #f59e0b, #d946ef, #3b82f6, #f59e0b);
    box-shadow: 0 0 26px rgba(217, 70, 239, 0.26), inset 0 2px 12px rgba(255, 255, 255, 0.22);
    transform: rotate(-8deg);
}

.credits-hero-text {
    position: relative;
    z-index: 1;
    min-width: 0;
    display: grid;
    gap: 7px;
}

.credits-hero-text strong {
    color: #fff;
    font-family: Lalezar, Vazirmatn, Tahoma, sans-serif;
    font-size: clamp(28px, 8vw, 38px);
    font-weight: 400;
    line-height: 1;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.42);
}

.credits-hero-text small {
    color: rgba(226, 232, 240, 0.92);
    font-size: 12px;
    line-height: 1.85;
    font-weight: 700;
}

.credits-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.credits-chips span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ddd6fe;
    font-size: 11px;
    font-weight: 900;
    background: rgba(139, 92, 246, 0.14);
    border: 1px solid rgba(196, 181, 253, 0.18);
}

.credits-game-team .credits-list {
    gap: 10px;
}

.credits-game-team .credits-member {
    align-items: stretch;
    gap: 12px;
    padding: 12px;
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.66), rgba(30, 41, 59, 0.50)),
        radial-gradient(circle at 0% 0%, rgba(232, 121, 249, 0.12), transparent 38%);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.credits-game-team .credits-avatar {
    width: 52px;
    height: auto;
    min-height: 58px;
    flex: 0 0 52px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(217, 70, 239, 0.26));
    box-shadow: inset 0 1px 12px rgba(255, 255, 255, 0.10), 0 8px 18px rgba(0, 0, 0, 0.22);
}

.credits-game-team .credits-info {
    justify-content: center;
    gap: 4px;
}

.credits-game-team .credits-role {
    color: rgba(253, 230, 138, 0.92);
    font-size: 11px;
}

.credits-game-team .credits-name {
    font-size: 24px;
}


@media (max-height: 500px) and (orientation: landscape) {
    .game-main-content {
        align-items: center;
        padding-top: 8px;
        padding-bottom: 10px;
    }

    .game-hero-section {
        align-self: stretch;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding-bottom: 4px;
    }

    .game-season-badge {
        margin-bottom: 6px;
    }

    .game-logo-wrap {
        width: 100%;
    }

    .game-main-title {
        width: 100%;
        max-width: 260px;
        margin: 0 auto;
        font-size: clamp(42px, 15vh, 64px);
        line-height: 0.92;
        text-align: center;
    }

    .credits-hero {
        padding: 11px 12px;
        border-radius: 20px;
    }

    .credits-hero-icon {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
        border-radius: 16px;
        font-size: 30px;
    }

    .credits-hero-text strong {
        font-size: 25px;
    }

    .credits-hero-text small {
        font-size: 10px;
        line-height: 1.55;
    }

    .credits-chips {
        gap: 5px;
    }

    .credits-chips span {
        padding: 4px 8px;
        font-size: 10px;
    }

    .credits-game-team .credits-member {
        padding: 9px;
        border-radius: 17px;
    }

    .credits-game-team .credits-avatar {
        width: 42px;
        min-height: 48px;
        flex-basis: 42px;
    }

    .credits-game-team .credits-name {
        font-size: 20px;
    }
}

@media (max-width: 420px) and (orientation: portrait) {
    .credits-hero {
        align-items: flex-start;
        gap: 11px;
        padding: 13px;
    }

    .credits-hero-icon {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
        border-radius: 17px;
        font-size: 31px;
    }

    .credits-hero-text small {
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .credits-hero::after {
        animation: none !important;
    }
}

/* ===== Patch 3.1.3: compact pro credits modal + stable first paint ===== */
.modal-card-credits {
    width: min(94vw, 440px);
    max-height: calc(100svh - 22px);
    overflow: hidden;
    padding: clamp(16px, 3.4vw, 24px);
    border-radius: 30px;
    background:
        radial-gradient(circle at 85% 0%, rgba(245, 158, 11, 0.24), transparent 35%),
        radial-gradient(circle at 8% 18%, rgba(59, 130, 246, 0.18), transparent 35%),
        linear-gradient(145deg, rgba(2, 6, 23, 0.98), rgba(30, 27, 75, 0.94) 48%, rgba(15, 23, 42, 0.98));
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow:
        0 28px 80px rgba(0, 0, 0, 0.72),
        0 0 60px rgba(217, 70, 239, 0.18),
        inset 0 1px 22px rgba(255, 255, 255, 0.08);
}

.modal-card-credits::before {
    width: 150px;
    height: 150px;
    background: rgba(245, 158, 11, 0.18);
}

.modal-card-credits::after {
    width: 150px;
    height: 150px;
    background: rgba(59, 130, 246, 0.18);
}

.modal-card-credits .modal-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 8px;
    border-radius: 18px;
    color: #fde68a;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(217, 70, 239, 0.16));
}

.modal-card-credits .modal-icon svg {
    width: 30px;
    height: 30px;
}

.modal-card-credits h2 {
    margin-bottom: 10px;
    font-size: clamp(24px, 6vw, 32px);
}

.credits-pro-team {
    gap: 10px;
    margin-bottom: 12px;
}

.credits-pro-team .credits-hero {
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(124, 58, 237, 0.36), rgba(15, 23, 42, 0.84)),
        radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.24), transparent 42%);
    border-color: rgba(255, 255, 255, 0.14);
}

.credits-pro-team .credits-hero-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 18px;
    font-size: 28px;
    transform: rotate(-6deg);
}

.credits-pro-team .credits-hero-text {
    gap: 4px;
}

.credits-pro-team .credits-hero-text small {
    order: -1;
    display: block;
    color: rgba(253, 230, 138, 0.94);
    font-size: 10px;
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    direction: ltr;
    text-align: right;
}

.credits-pro-team .credits-hero-text strong {
    font-size: clamp(28px, 8vw, 38px);
    line-height: 1;
}

.credits-pro-team .credits-chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.credits-pro-team .credits-chips span {
    min-height: 28px;
    padding: 4px 6px;
    font-size: 10px;
    line-height: 1.3;
    color: #ede9fe;
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.18), rgba(15, 23, 42, 0.34));
    border-color: rgba(196, 181, 253, 0.18);
}

.credits-pro-team .credits-list {
    gap: 8px;
}

.credits-pro-team .credits-member {
    align-items: center;
    gap: 10px;
    min-height: 62px;
    padding: 10px;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.74), rgba(30, 41, 59, 0.48)),
        radial-gradient(circle at 100% 0%, rgba(217, 70, 239, 0.13), transparent 42%);
}

.credits-pro-team .credits-avatar {
    width: 46px;
    height: 46px;
    min-height: 46px;
    flex: 0 0 46px;
    border-radius: 16px;
    font-size: 24px;
}

.credits-pro-team .credits-info {
    gap: 2px;
}

.credits-pro-team .credits-role {
    font-size: 11px;
    line-height: 1.45;
}

.credits-pro-team .credits-name {
    font-size: 23px;
    line-height: 1.1;
}

.modal-card-credits .modal-primary {
    min-height: 42px;
    margin-top: 10px;
    border-radius: 14px;
}

@media (max-width: 480px) and (orientation: portrait) {
    .modal-card-credits {
        width: min(92vw, 360px);
        max-height: calc(100svh - 14px);
        padding: 13px;
        border-radius: 24px;
    }

    .modal-card-credits .modal-icon {
        display: none;
    }

    .modal-card-credits h2 {
        margin-bottom: 8px;
        font-size: 24px;
    }

    .credits-pro-team {
        gap: 7px;
        margin-bottom: 8px;
    }

    .credits-pro-team .credits-hero {
        gap: 10px;
        padding: 10px;
        border-radius: 18px;
    }

    .credits-pro-team .credits-hero-icon {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
        border-radius: 14px;
        font-size: 23px;
    }

    .credits-pro-team .credits-hero-text small {
        font-size: 9px;
    }

    .credits-pro-team .credits-hero-text strong {
        font-size: 28px;
    }

    .credits-pro-team .credits-chips {
        gap: 5px;
    }

    .credits-pro-team .credits-chips span {
        min-height: 24px;
        padding: 3px 4px;
        font-size: 9px;
        border-radius: 999px;
    }

    .credits-pro-team .credits-list {
        gap: 7px;
    }

    .credits-pro-team .credits-member {
        min-height: 54px;
        padding: 8px;
        border-radius: 16px;
    }

    .credits-pro-team .credits-avatar {
        width: 38px;
        height: 38px;
        min-height: 38px;
        flex-basis: 38px;
        border-radius: 13px;
        font-size: 20px;
    }

    .credits-pro-team .credits-role {
        font-size: 10px;
    }

    .credits-pro-team .credits-name {
        font-size: 21px;
    }

    .modal-card-credits .modal-primary {
        min-height: 38px;
        margin-top: 8px;
        padding: 8px 14px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .modal-card-credits {
        width: min(82vw, 620px);
        max-height: calc(100svh - 10px);
        padding: 10px 12px;
        border-radius: 20px;
    }

    .modal-card-credits .modal-icon {
        display: none;
    }

    .modal-card-credits h2 {
        margin-bottom: 5px;
        font-size: 21px;
    }

    .credits-pro-team {
        gap: 6px;
        margin-bottom: 7px;
    }

    .credits-pro-team .credits-hero {
        padding: 8px 10px;
        border-radius: 16px;
    }

    .credits-pro-team .credits-hero-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        border-radius: 12px;
        font-size: 20px;
    }

    .credits-pro-team .credits-hero-text small {
        font-size: 8px;
    }

    .credits-pro-team .credits-hero-text strong {
        font-size: 24px;
    }

    .credits-pro-team .credits-chips {
        display: none;
    }

    .credits-pro-team .credits-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .credits-pro-team .credits-member {
        min-height: 44px;
        padding: 7px;
        border-radius: 14px;
    }

    .credits-pro-team .credits-avatar {
        width: 34px;
        height: 34px;
        min-height: 34px;
        flex-basis: 34px;
        border-radius: 11px;
        font-size: 18px;
    }

    .credits-pro-team .credits-role {
        font-size: 9px;
        line-height: 1.3;
    }

    .credits-pro-team .credits-name {
        font-size: 18px;
    }

    .modal-card-credits .modal-primary {
        min-height: 34px;
        margin-top: 6px;
        padding: 6px 12px;
    }
}

/* ===== Patch 3.2.6: smarter, game-like graphics quality settings ===== */
.settings-card {
    width: min(94vw, 520px);
}

.settings-badge.blue {
    color: #bae6fd;
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.42), transparent 30%),
        linear-gradient(145deg, rgba(14, 165, 233, 0.34), rgba(124, 58, 237, 0.22));
    border-color: rgba(125, 211, 252, 0.22);
    box-shadow: 0 10px 24px rgba(14, 165, 233, 0.15);
}

.settings-quality {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    gap: 13px;
    padding: 15px;
    border-radius: 24px;
    background:
        radial-gradient(circle at 92% 0%, rgba(14, 165, 233, 0.19), transparent 38%),
        radial-gradient(circle at 8% 100%, rgba(245, 158, 11, 0.14), transparent 38%),
        linear-gradient(145deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.50));
    border: 1px solid rgba(125, 211, 252, 0.16);
    box-shadow: inset 0 1px 18px rgba(255, 255, 255, 0.045), 0 18px 44px rgba(2, 6, 23, 0.24);
}

.settings-quality::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.34;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), transparent 82%);
}

.settings-quality-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-quality-head > span:last-child {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.settings-quality-head strong {
    color: #f8fafc;
    font-size: 15px;
    font-weight: 950;
    letter-spacing: -0.01em;
}

.settings-quality-head small,
.graphics-quality-intro {
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.85;
}

.graphics-quality-intro {
    padding: 9px 11px;
    border-radius: 16px;
    color: #ddd6fe;
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(167, 139, 250, 0.13);
}

.graphics-quality-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.graphics-quality-option {
    position: relative;
    min-width: 0;
    display: block;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.graphics-quality-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.quality-option-body {
    min-height: 146px;
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr auto;
    align-content: start;
    justify-items: center;
    gap: 8px;
    padding: 13px 10px 11px;
    border-radius: 20px;
    text-align: center;
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.085), transparent 44%),
        rgba(15, 23, 42, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.075);
    box-shadow: inset 0 1px 14px rgba(255, 255, 255, 0.045), 0 10px 24px rgba(2, 6, 23, 0.16);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.quality-option-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    color: #fff7ed;
    font-size: 18px;
    font-weight: 950;
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.34), rgba(124, 58, 237, 0.28));
    border: 1px solid rgba(255, 255, 255, 0.11);
    box-shadow: 0 10px 22px rgba(245, 158, 11, 0.12);
}

.quality-option-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.quality-option-body strong {
    color: #fff;
    font-size: 14px;
    font-weight: 950;
}

.quality-option-body small {
    color: #aebed3;
    font-size: 10.5px;
    font-weight: 750;
    line-height: 1.7;
}

.quality-option-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 3px 9px;
    border-radius: 999px;
    color: #bae6fd;
    font-size: 9.5px;
    font-weight: 950;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(125, 211, 252, 0.14);
}

.graphics-quality-option:hover .quality-option-body,
.graphics-quality-option input:focus-visible + .quality-option-body {
    transform: translateY(-2px);
    border-color: rgba(125, 211, 252, 0.34);
    box-shadow: inset 0 1px 14px rgba(255, 255, 255, 0.06), 0 16px 28px rgba(2, 6, 23, 0.22);
}

.graphics-quality-option.is-active .quality-option-body,
.graphics-quality-option input:checked + .quality-option-body {
    transform: translateY(-2px);
    border-color: rgba(251, 191, 36, 0.58);
    background:
        radial-gradient(circle at 50% 0%, rgba(251, 191, 36, 0.20), transparent 42%),
        linear-gradient(145deg, rgba(245, 158, 11, 0.18), rgba(124, 58, 237, 0.18)),
        rgba(15, 23, 42, 0.82);
    box-shadow: 0 12px 32px rgba(245, 158, 11, 0.16), inset 0 1px 18px rgba(255, 255, 255, 0.085);
}

.graphics-quality-option.is-active .quality-option-icon,
.graphics-quality-option input:checked + .quality-option-body .quality-option-icon {
    background: linear-gradient(145deg, #fbbf24, #7c3aed);
    box-shadow: 0 12px 26px rgba(245, 158, 11, 0.24);
}

.graphics-quality-option.is-active .quality-option-pill,
.graphics-quality-option input:checked + .quality-option-body .quality-option-pill {
    color: #422006;
    background: linear-gradient(90deg, #fef3c7, #fde68a);
    border-color: rgba(251, 191, 36, 0.52);
}

.graphics-auto-button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 17px;
    color: #07111f;
    font-size: 13px;
    font-weight: 950;
    background:
        radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.82), transparent 34%),
        linear-gradient(90deg, #7dd3fc, #fef3c7 52%, #c4b5fd);
    box-shadow: 0 13px 28px rgba(14, 165, 233, 0.20);
    transition: transform 0.22s ease, opacity 0.22s ease, box-shadow 0.22s ease;
}

.graphics-auto-button::before {
    content: '⚙';
    font-size: 15px;
    line-height: 1;
}

.graphics-auto-button:hover,
.graphics-auto-button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(14, 165, 233, 0.27);
}

.graphics-auto-button:disabled {
    cursor: wait;
    opacity: 0.76;
    transform: none;
}

.graphics-quality-status {
    margin: 0;
    padding: 8px 10px;
    border-radius: 14px;
    color: #bae6fd;
    font-size: 11px;
    font-weight: 850;
    line-height: 1.85;
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(125, 211, 252, 0.10);
}

html[data-graphics-quality="low"] body.play-app-root {
    background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
}

html[data-graphics-quality="low"] .game-bg-grid {
    opacity: 0.15;
    background-size: 42px 42px;
}

html[data-graphics-quality="low"] .game-orb {
    display: none;
}

html[data-graphics-quality="low"] .fade-up {
    opacity: 1;
    transform: none;
    animation: none;
}

html[data-graphics-quality="low"] .game-profile-card,
html[data-graphics-quality="low"] .guest-auth-panel,
html[data-graphics-quality="low"] .game-menu-container,
html[data-graphics-quality="low"] .menu-card,
html[data-graphics-quality="low"] .footer-card,
html[data-graphics-quality="low"] .modal-card,
html[data-graphics-quality="low"] .settings-row,
html[data-graphics-quality="low"] .settings-quality,
html[data-graphics-quality="low"] .quality-option-body,
html[data-graphics-quality="low"] .graphics-quality-intro,
html[data-graphics-quality="low"] .graphics-quality-status {
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.26);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

html[data-graphics-quality="low"] .settings-quality::before {
    opacity: 0.12;
}

html[data-graphics-quality="low"] .game-modal {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(2, 6, 23, 0.94);
}

html[data-graphics-quality="low"] .modal-card::before,
html[data-graphics-quality="low"] .modal-card::after,
html[data-graphics-quality="low"] .menu-card::before,
html[data-graphics-quality="low"] .menu-card::after,
html[data-graphics-quality="low"] .game-profile-card::after,
html[data-graphics-quality="low"] .guest-auth-panel::after,
html[data-graphics-quality="low"] .coming-soon-date-box::before,
html[data-graphics-quality="low"] .modal-icon::after,
html[data-graphics-quality="low"] .credits-hero::after {
    display: none !important;
}

html[data-graphics-quality="low"] .game-main-title,
html[data-graphics-quality="low"] .coin-icon,
html[data-graphics-quality="low"] .profile-avatar-wrap,
html[data-graphics-quality="low"] .primary-icon,
html[data-graphics-quality="low"] .mini-icon,
html[data-graphics-quality="low"] .modal-icon,
html[data-graphics-quality="low"] .coming-soon-date-box strong,
html[data-graphics-quality="low"] .quality-option-icon {
    filter: none !important;
}

html[data-graphics-quality="low"] .live-dot span,
html[data-graphics-quality="low"] .card-primary,
html[data-graphics-quality="low"] .news-dot,
html[data-graphics-quality="low"] .footer-dot,
html[data-graphics-quality="low"] .modal-card-credits,
html[data-graphics-quality="low"] .modal-card-credits *,
html[data-graphics-quality="low"] .quality-option-icon {
    animation: none !important;
}

html[data-graphics-quality="low"] .menu-card:hover,
html[data-graphics-quality="low"] .menu-card:focus-visible,
html[data-graphics-quality="low"] .game-profile-card:hover,
html[data-graphics-quality="low"] .game-profile-card:focus-visible,
html[data-graphics-quality="low"] .guest-auth-panel:hover,
html[data-graphics-quality="low"] .modal-primary:hover,
html[data-graphics-quality="low"] .modal-primary:focus-visible,
html[data-graphics-quality="low"] .support-link:hover,
html[data-graphics-quality="low"] .support-link:focus-visible,
html[data-graphics-quality="low"] .graphics-auto-button:hover,
html[data-graphics-quality="low"] .graphics-auto-button:focus-visible,
html[data-graphics-quality="low"] .graphics-quality-option:hover .quality-option-body,
html[data-graphics-quality="low"] .graphics-quality-option input:focus-visible + .quality-option-body,
html[data-graphics-quality="low"] .graphics-quality-option.is-active .quality-option-body,
html[data-graphics-quality="low"] .graphics-quality-option input:checked + .quality-option-body {
    transform: none;
}

html[data-graphics-quality="high"] .game-bg-grid {
    opacity: 0.62;
    background-size: 26px 26px;
}

html[data-graphics-quality="high"] .game-orb {
    filter: blur(105px);
    animation-duration: 16s;
}

html[data-graphics-quality="high"] .game-orb-1 {
    background: rgba(139, 92, 246, 0.32);
}

html[data-graphics-quality="high"] .game-orb-2 {
    background: rgba(245, 158, 11, 0.22);
}

html[data-graphics-quality="high"] .game-orb-3 {
    background: rgba(56, 189, 248, 0.22);
}

html[data-graphics-quality="high"] .menu-card,
html[data-graphics-quality="high"] .game-profile-card,
html[data-graphics-quality="high"] .guest-auth-panel,
html[data-graphics-quality="high"] .footer-card,
html[data-graphics-quality="high"] .modal-card {
    backdrop-filter: blur(22px) saturate(1.12);
    -webkit-backdrop-filter: blur(22px) saturate(1.12);
}

html[data-graphics-quality="high"] .card-primary {
    animation-duration: 2.6s;
}

@media (max-width: 520px) {
    .settings-card {
        width: min(94vw, 400px);
    }

    .settings-quality {
        padding: 12px;
        border-radius: 20px;
        gap: 10px;
    }

    .settings-quality-head small {
        font-size: 10.5px;
        line-height: 1.65;
    }

    .graphics-quality-intro {
        font-size: 10.5px;
        line-height: 1.65;
        padding: 8px 10px;
    }

    .graphics-quality-options {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .quality-option-body {
        min-height: auto;
        grid-template-columns: 42px 1fr auto;
        grid-template-rows: auto;
        align-items: center;
        justify-items: stretch;
        text-align: right;
        padding: 10px 11px;
        gap: 9px;
    }

    .quality-option-icon {
        width: 36px;
        height: 36px;
        border-radius: 14px;
        font-size: 16px;
    }

    .quality-option-body small {
        font-size: 10px;
        line-height: 1.55;
    }

    .quality-option-pill {
        font-size: 9px;
        padding-inline: 8px;
    }
}

@media (max-width: 360px) {
    .quality-option-body {
        grid-template-columns: 38px 1fr;
    }

    .quality-option-pill {
        grid-column: 1 / -1;
        justify-self: start;
        margin-right: 47px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .settings-card {
        width: min(92vw, 660px);
    }

    .settings-list {
        gap: 8px;
    }

    .settings-quality {
        gap: 8px;
        padding: 10px;
        border-radius: 16px;
    }

    .settings-quality-head small,
    .graphics-quality-intro,
    .quality-option-body small {
        display: none;
    }

    .graphics-quality-options {
        gap: 6px;
    }

    .quality-option-body {
        min-height: 66px;
        padding: 8px;
        gap: 5px;
    }

    .quality-option-icon {
        width: 32px;
        height: 32px;
        border-radius: 12px;
        font-size: 14px;
    }

    .graphics-auto-button {
        min-height: 34px;
        border-radius: 12px;
        font-size: 11px;
    }

    .graphics-quality-status {
        font-size: 10px;
        line-height: 1.45;
        padding: 6px 8px;
    }
}

/* ===== Patch 3.2.7: story-style loading screen for Main Menu ===== */
#playLoadingScreen {
    transition: opacity 0.65s ease-in-out, visibility 0.65s ease-in-out;
}

.play-loading-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.28), transparent 34%),
        radial-gradient(circle at 78% 80%, rgba(245, 158, 11, 0.18), transparent 32%),
        linear-gradient(180deg, #160827 0%, #0f172a 46%, #020617 100%);
}

html.play-css-ready .play-loading-screen {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-loading-screen .story-loading-grid {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    background-image:
        linear-gradient(rgba(255,255,255,0.10) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.10) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(circle at center, #000 0%, transparent 74%);
    -webkit-mask-image: radial-gradient(circle at center, #000 0%, transparent 74%);
    animation: playLoadingGridMove 8s linear infinite;
}

.play-loading-screen .story-loading-aurora {
    position: absolute;
    width: min(62vw, 560px);
    height: min(62vw, 560px);
    border-radius: 50%;
    filter: blur(42px);
    opacity: 0.48;
    animation: playLoadingAurora 6s ease-in-out infinite alternate;
}

.play-loading-screen .story-loading-aurora-one {
    top: -18%;
    right: -12%;
    background: rgba(168, 85, 247, 0.55);
}

.play-loading-screen .story-loading-aurora-two {
    bottom: -22%;
    left: -14%;
    background: rgba(251, 191, 36, 0.34);
    animation-delay: -2s;
}

.play-loading-screen .story-loading-card {
    position: relative;
    z-index: 2;
    width: min(88vw, 380px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
    border-radius: 2rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.74), rgba(15, 23, 42, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-bottom: 3px solid rgba(139, 92, 246, 0.42);
    box-shadow: 0 28px 80px rgba(0,0,0,0.66), inset 0 1px 0 rgba(255,255,255,0.12);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.play-loading-screen .story-loading-logo {
    position: relative;
    width: 104px;
    height: 104px;
    display: grid;
    place-items: center;
    margin-bottom: 0.25rem;
    filter: drop-shadow(0 18px 28px rgba(245, 158, 11, 0.28));
}

.play-loading-screen .story-loading-logo svg {
    position: relative;
    z-index: 2;
    width: 82px;
    height: 82px;
    animation: playLoadingCoinFloat 1.6s ease-in-out infinite alternate;
}

.play-loading-screen .story-loading-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(251, 191, 36, 0.34);
    box-shadow: 0 0 26px rgba(251, 191, 36, 0.22);
}

.play-loading-screen .story-loading-ring-a {
    animation: playLoadingRing 1.65s ease-out infinite;
}

.play-loading-screen .story-loading-ring-b {
    animation: playLoadingRing 1.65s ease-out infinite 0.55s;
}

.play-loading-screen .story-loading-title {
    margin: 0;
    font-family: Lalezar, Vazirmatn, Tahoma, sans-serif;
    font-size: clamp(32px, 9vw, 52px);
    line-height: 1;
    color: #fef3c7;
    text-shadow: 0 8px 28px rgba(245, 158, 11, 0.38), 0 2px 7px rgba(0,0,0,0.72);
}

.play-loading-screen .story-loading-text {
    margin: 0;
    color: #ddd6fe;
    font-weight: 900;
    font-size: 13px;
    line-height: 1.8;
}

.play-loading-screen .story-loading-progress {
    position: relative;
    width: min(260px, 72vw);
    height: 10px;
    margin-top: 0.45rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.88);
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.82);
}

.play-loading-screen .story-loading-progress span {
    position: absolute;
    inset: 0 auto 0 0;
    width: 44%;
    border-radius: inherit;
    background: linear-gradient(90deg, #fbbf24, #e879f9, #8b5cf6);
    box-shadow: 0 0 18px rgba(232, 121, 249, 0.72);
    animation: playLoadingProgress 1.25s ease-in-out infinite;
}

.play-loading-screen .story-loading-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 20px;
}

.play-loading-screen .story-loading-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fbbf24;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.78);
    animation: playLoadingDot 0.85s ease-in-out infinite alternate;
}

.play-loading-screen .story-loading-dots span:nth-child(2) { animation-delay: 0.16s; }
.play-loading-screen .story-loading-dots span:nth-child(3) { animation-delay: 0.32s; }

html[data-graphics-quality="low"] .play-loading-screen .story-loading-grid,
html[data-graphics-quality="low"] .play-loading-screen .story-loading-aurora,
html[data-graphics-quality="low"] .play-loading-screen .story-loading-logo svg,
html[data-graphics-quality="low"] .play-loading-screen .story-loading-ring,
html[data-graphics-quality="low"] .play-loading-screen .story-loading-progress span,
html[data-graphics-quality="low"] .play-loading-screen .story-loading-dots span {
    animation: none !important;
}

html[data-graphics-quality="low"] .play-loading-screen .story-loading-aurora {
    display: none;
}

html[data-graphics-quality="low"] .play-loading-screen .story-loading-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 16px 42px rgba(0,0,0,0.44);
}

@keyframes playLoadingGridMove { to { transform: translate3d(34px, 34px, 0); } }
@keyframes playLoadingAurora { from { transform: translate3d(0, 0, 0) scale(0.9); } to { transform: translate3d(4vw, -2vh, 0) scale(1.1); } }
@keyframes playLoadingCoinFloat { from { transform: translateY(0) rotate(-3deg); } to { transform: translateY(-8px) rotate(5deg); } }
@keyframes playLoadingRing { 0% { opacity: 0.85; transform: scale(0.7); } 100% { opacity: 0; transform: scale(1.28); } }
@keyframes playLoadingProgress { 0% { transform: translateX(-130%); } 55%, 100% { transform: translateX(230%); } }
@keyframes playLoadingDot { to { transform: translateY(-8px); opacity: 0.58; } }

@media (max-width: 420px) {
    .play-loading-screen .story-loading-card {
        width: min(88vw, 340px);
        padding: 1.75rem 1.25rem 1.35rem;
        border-radius: 1.7rem;
    }

    .play-loading-screen .story-loading-logo {
        width: 92px;
        height: 92px;
    }

    .play-loading-screen .story-loading-logo svg {
        width: 74px;
        height: 74px;
    }
}

/* VIP badge state for paid subscriptions */
.profile-badge-vip,
.game-profile-card[data-profile-badge="vip"] .profile-badge {
    color: #451a03;
    background: linear-gradient(90deg, #fde68a, #f59e0b 55%, #fef08a);
    border-color: rgba(254,243,199,.72);
    box-shadow: 0 0 16px rgba(245,158,11,.34);
}
.game-profile-card[data-profile-badge="vip"] {
    border-color: rgba(245,158,11,.72);
    box-shadow: 0 12px 30px rgba(245,158,11,.18), inset 0 2px 5px rgba(255,255,255,.10);
}

/* ===== Patch 3.5.0: V3 welcome modal, premium profile card and compact settings ===== */
.game-version-badge {
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.10);
    cursor: pointer;
}

.game-version-badge-link {
    color: #fde68a;
    font-weight: 950;
    text-decoration: none;
}

.game-version-badge:hover,
.game-version-badge:focus-visible {
    border-color: rgba(196, 181, 253, 0.45);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 24px rgba(139, 92, 246, 0.28);
}

.game-profile-card.game-profile-card-user {
    height: 58px;
    max-width: min(58%, 348px);
    border-radius: 28px;
    overflow: visible;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.84) 0%, rgba(15, 23, 42, 0.96) 100%);
    border: 1px solid rgba(139, 92, 246, 0.32);
    border-top-color: rgba(196, 181, 253, 0.42);
    border-bottom-color: rgba(15, 23, 42, 0.94);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.60), inset 0 1px 1px rgba(255, 255, 255, 0.11), inset 0 -2px 6px rgba(0, 0, 0, 0.42);
    padding-inline-end: 5px;
}

.game-profile-card.game-profile-card-user::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 6%, rgba(255,255,255,0.06), transparent 42%);
    opacity: 0.85;
}

.game-profile-card.game-profile-card-user:hover,
.game-profile-card.game-profile-card-user:focus-visible {
    border-color: rgba(196, 181, 253, 0.70);
    box-shadow: 0 16px 44px rgba(124, 58, 237, 0.30), 0 10px 34px rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.18);
    transform: translateY(-2px) translateZ(0);
}

.game-profile-card.game-profile-card-user .profile-avatar-wrap {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
    margin-right: -2px;
    filter: drop-shadow(0 0 12px rgba(192, 132, 252, 0.42));
}

.game-profile-card.game-profile-card-user .profile-frame-ring {
    inset: 0;
    border: 0;
    box-shadow: 0 0 18px rgba(192, 132, 252, 0.48);
}

.game-profile-card.game-profile-card-user .profile-avatar-frame {
    inset: 4px;
    border-width: 0;
    background: #0f172a;
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.92), 0 0 0 1px rgba(255,255,255,0.10);
}

.game-profile-card.game-profile-card-user .profile-level {
    bottom: -5px;
    min-width: 32px;
    width: auto;
    height: 21px;
    padding: 0 7px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(180deg, #334155 0%, #0f172a 100%);
    border: 2px solid rgba(168, 85, 247, 0.92);
    box-shadow: 0 5px 12px rgba(0,0,0,0.76), inset 0 2px 4px rgba(255,255,255,0.18);
    transform: translateX(-50%);
}

.game-profile-card.game-profile-card-user .profile-level span {
    transform: none;
    color: #fff;
    font-size: 11px;
    font-weight: 950;
    text-shadow: 0 1px 3px rgba(0,0,0,0.75);
}

.game-profile-card.game-profile-card-user .profile-info {
    padding: 0 14px 0 16px;
}

.game-profile-card.game-profile-card-user .profile-title-row {
    margin-bottom: 5px;
}

.game-profile-card.game-profile-card-user .profile-name {
    font-size: 14px;
    letter-spacing: -0.01em;
}

.profile-badge-vip,
.game-profile-card.game-profile-card-user .profile-badge-vip {
    color: #451a03;
    background: linear-gradient(135deg, #fef08a 0%, #f59e0b 52%, #b45309 100%);
    border-color: rgba(253, 230, 138, 0.88);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.46), inset 0 1px 1px rgba(255,255,255,0.72);
}

.game-profile-card.game-profile-card-user .profile-xp-track {
    height: 8px;
    border-color: rgba(255,255,255,0.07);
    background: rgba(2, 6, 23, 0.92);
}

.game-profile-card.game-profile-card-user .profile-xp-bar {
    background: linear-gradient(270deg, #8b5cf6, #d946ef, #ec4899);
    box-shadow: -2px 0 10px rgba(244, 114, 182, 0.82), inset 0 1px 0 rgba(255,255,255,0.36);
}

.game-profile-card.game-profile-card-user .profile-xp-bar::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 12px;
    border-radius: inherit;
    background: rgba(255,255,255,0.62);
    filter: blur(2px);
}

.game-profile-card.game-profile-card-user .profile-xp-text {
    margin-top: 3px;
    color: rgba(221, 214, 254, 0.78);
    font-size: 9px;
    font-weight: 900;
}

.welcome-modal {
    z-index: 130;
    padding: 12px;
    background: rgba(2, 6, 23, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.welcome-card {
    width: min(95vw, 560px);
    max-height: min(90dvh, 760px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 24px;
    border-radius: 32px;
    text-align: right;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(17, 24, 39, 0.96));
    border: 2px solid rgba(139, 92, 246, 0.46);
    box-shadow: 0 0 54px rgba(139, 92, 246, 0.28), 0 28px 86px rgba(0,0,0,0.72);
}

.welcome-card::before,
.welcome-card::after {
    display: none;
}

.welcome-card-bg,
.welcome-orb {
    position: absolute;
    pointer-events: none;
}

.welcome-card-bg {
    inset: 0;
    opacity: 0.20;
    background-image: radial-gradient(rgba(255,255,255,0.16) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), transparent 86%);
}

.welcome-orb {
    width: 180px;
    height: 180px;
    border-radius: 999px;
    filter: blur(55px);
    opacity: 0.55;
}

.welcome-orb-one { top: -70px; right: -70px; background: rgba(217, 70, 239, 0.45); }
.welcome-orb-two { bottom: -80px; left: -70px; background: rgba(124, 58, 237, 0.42); }

.welcome-head {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    display: grid;
    justify-items: center;
    gap: 6px;
    margin-bottom: 16px;
    text-align: center;
}

.welcome-party-icon {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    margin-bottom: 2px;
    border-radius: 999px;
    font-size: 34px;
    background: linear-gradient(145deg, #fef08a, #f59e0b 58%, #b45309);
    box-shadow: 0 0 26px rgba(245, 158, 11, 0.52), inset 0 1px 1px rgba(255,255,255,0.72);
    animation: welcomeIconBounce 2s ease-in-out infinite;
}

@keyframes welcomeIconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.welcome-kicker {
    margin: 0;
    color: #c4b5fd;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: 0.04em;
}

.welcome-head h2 {
    margin: 0;
    color: transparent;
    background: linear-gradient(180deg, #fff 0%, #fde68a 42%, #d97706 100%);
    -webkit-background-clip: text;
    background-clip: text;
    font-family: Lalezar, Vazirmatn, Tahoma, sans-serif;
    font-size: clamp(30px, 8vw, 43px);
    line-height: 1.05;
    font-weight: 400;
    filter: drop-shadow(0 10px 26px rgba(245, 158, 11, 0.34));
}

.welcome-head p:not(.welcome-kicker) {
    margin: 0;
    color: #d1d5db;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.8;
}

.welcome-scroll {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 2px 0 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.55) rgba(255,255,255,0.05);
}

.welcome-scroll::-webkit-scrollbar { width: 5px; }
.welcome-scroll::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 999px; }
.welcome-scroll::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.58); border-radius: 999px; }

.welcome-intro {
    margin: 0 0 14px;
    color: #aebed3;
    font-size: 13px;
    font-weight: 750;
    line-height: 2;
}

.welcome-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.welcome-feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255,255,255,0.055);
    border: 1px solid rgba(255,255,255,0.09);
    box-shadow: inset 0 1px 14px rgba(255,255,255,0.035);
}

.welcome-feature-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
}

.welcome-feature-icon svg {
    width: 19px;
    height: 19px;
}

.welcome-feature-icon.violet { color: #c4b5fd; background: rgba(139, 92, 246, 0.18); }
.welcome-feature-icon.amber { color: #fbbf24; background: rgba(245, 158, 11, 0.16); }
.welcome-feature-icon.emerald { color: #34d399; background: rgba(16, 185, 129, 0.16); }
.welcome-feature-icon.cyan { color: #67e8f9; background: rgba(6, 182, 212, 0.16); }

.welcome-feature strong,
.welcome-performance-note strong {
    display: block;
    color: #fff;
    font-size: 13px;
    font-weight: 950;
    line-height: 1.5;
}

.welcome-feature small,
.welcome-performance-note small {
    display: block;
    margin-top: 3px;
    color: #aebed3;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.75;
}

.welcome-performance-note {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-top: 14px;
    padding: 14px 14px 14px 16px;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(245, 158, 11, 0.10);
    border: 1px solid rgba(245, 158, 11, 0.28);
}

.welcome-performance-note::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: #f59e0b;
}

.welcome-alert-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    color: #fbbf24;
}

.welcome-alert-icon svg {
    width: 100%;
    height: 100%;
}

.welcome-performance-note strong { color: #fcd34d; }
.welcome-performance-note small { color: rgba(254, 243, 199, 0.78); }

.welcome-actions {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.10);
}

.welcome-primary {
    min-height: 52px;
    margin-top: 0;
    border-radius: 16px;
    font-family: Lalezar, Vazirmatn, Tahoma, sans-serif;
    font-size: 22px;
    font-weight: 400;
    background: linear-gradient(90deg, #7c3aed, #d946ef, #db2777);
    box-shadow: 0 8px 28px rgba(192, 132, 252, 0.36);
}

.settings-card {
    border-color: rgba(139, 92, 246, 0.24);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.90), rgba(30, 41, 59, 0.76));
}

.settings-quality-v3 {
    gap: 12px;
    padding: 14px;
    border-color: rgba(99, 102, 241, 0.36);
    background: radial-gradient(circle at 100% 0%, rgba(99, 102, 241, 0.22), transparent 35%), rgba(30, 41, 59, 0.64);
}

.graphics-quality-warning {
    color: #ddd6fe;
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(165, 180, 252, 0.14);
}

.graphics-quality-segmented {
    display: flex;
    gap: 6px;
    padding: 6px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.58);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.30);
}

.graphics-quality-segment {
    flex: 1 1 0;
}

.quality-segment-body {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    min-height: 52px;
    padding: 8px 6px;
    overflow: hidden;
    border-radius: 13px;
    color: #94a3b8;
    text-align: center;
    border: 1px solid transparent;
    transition: color .22s ease, transform .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
}

.quality-segment-body::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, #8b5cf6, #4f46e5);
    transition: opacity .22s ease;
}

.quality-segment-title {
    font-size: 12px;
    font-weight: 950;
    line-height: 1.25;
}

.quality-segment-sub {
    margin-top: 3px;
    font-size: 10px;
    font-weight: 850;
    opacity: .82;
}

.graphics-quality-segment:hover .quality-segment-body,
.graphics-quality-segment input:focus-visible + .quality-segment-body {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.graphics-quality-segment.is-active .quality-segment-body,
.graphics-quality-segment input:checked + .quality-segment-body {
    color: #fff;
    border-color: rgba(139, 92, 246, 0.38);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.28);
    transform: translateY(-1px);
}

.graphics-quality-segment.is-active .quality-segment-body::before,
.graphics-quality-segment input:checked + .quality-segment-body::before {
    opacity: 1;
}

html[data-graphics-quality="low"] .welcome-card,
html[data-graphics-quality="low"] .welcome-feature,
html[data-graphics-quality="low"] .welcome-performance-note,
html[data-graphics-quality="low"] .quality-segment-body {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
}

html[data-graphics-quality="low"] .welcome-orb,
html[data-graphics-quality="low"] .welcome-card-bg,
html[data-graphics-quality="low"] .welcome-party-icon,
html[data-graphics-quality="low"] .profile-frame-ring {
    animation: none !important;
}

@media (min-width: 768px) {
    .game-profile-card.game-profile-card-user {
        height: 64px;
        max-width: min(55%, 360px);
        border-radius: 32px;
    }

    .game-profile-card.game-profile-card-user .profile-avatar-wrap {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
        margin-right: -6px;
    }

    .game-profile-card.game-profile-card-user .profile-level {
        min-width: 34px;
        height: 23px;
    }

    .game-profile-card.game-profile-card-user .profile-name {
        font-size: 15px;
    }
}

@media (max-width: 640px) {
    .game-profile-card.game-profile-card-user {
        max-width: min(56%, 330px);
        height: 52px;
        border-radius: 26px;
    }

    .game-profile-card.game-profile-card-user .profile-avatar-wrap {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
    }

    .game-profile-card.game-profile-card-user .profile-info {
        padding-right: 11px;
        padding-left: 12px;
    }

    .game-profile-card.game-profile-card-user .profile-title-row {
        margin-bottom: 4px;
    }

    .game-profile-card.game-profile-card-user .profile-name {
        font-size: 12px;
    }

    .game-profile-card.game-profile-card-user .profile-xp-track {
        height: 7px;
    }

    .welcome-card {
        width: min(95vw, 440px);
        padding: 18px 16px 16px;
        border-radius: 26px;
        max-height: 90dvh;
    }

    .welcome-party-icon {
        width: 62px;
        height: 62px;
        font-size: 29px;
    }

    .welcome-head {
        margin-bottom: 12px;
    }

    .welcome-head p:not(.welcome-kicker),
    .welcome-intro {
        font-size: 12px;
    }

    .welcome-feature-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .welcome-feature {
        padding: 10px;
        border-radius: 15px;
    }

    .welcome-performance-note {
        margin-top: 10px;
        padding: 12px;
        border-radius: 15px;
    }

    .welcome-actions {
        margin-top: 12px;
        padding-top: 12px;
    }

    .welcome-primary {
        min-height: 46px;
        font-size: 20px;
    }

    .graphics-quality-segmented {
        gap: 4px;
        padding: 5px;
    }

    .quality-segment-body {
        min-height: 48px;
        padding-inline: 4px;
    }

    .quality-segment-title {
        font-size: 11px;
    }

    .quality-segment-sub {
        font-size: 9px;
    }
}

@media (max-width: 380px) {
    .game-profile-card.game-profile-card-user {
        max-width: 53%;
    }

    .welcome-card {
        padding: 15px 13px 13px;
    }

    .welcome-feature small,
    .welcome-performance-note small {
        font-size: 10px;
        line-height: 1.65;
    }
}

@media (max-height: 540px) and (orientation: landscape) {
    .welcome-card {
        width: min(94vw, 720px);
        max-height: 92dvh;
        padding: 14px;
    }

    .welcome-head {
        grid-template-columns: auto 1fr;
        justify-items: start;
        text-align: right;
        column-gap: 12px;
        margin-bottom: 10px;
    }

    .welcome-party-icon {
        grid-row: 1 / span 3;
        width: 52px;
        height: 52px;
        font-size: 25px;
    }

    .welcome-head h2 {
        font-size: 30px;
    }

    .welcome-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .welcome-feature small,
    .welcome-performance-note small,
    .welcome-intro {
        display: none;
    }

    .welcome-primary {
        min-height: 40px;
    }
}

/* v3.0.0 profile card: matches the provided standalone HTML mockup more closely. */
.game-profile-card.profile-card-v3,
.game-profile-card.game-profile-card-user.profile-card-v3 {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    height: 48px;
    max-width: min(55%, 340px);
    min-width: 0;
    padding: 0 4px;
    border-radius: 2rem;
    overflow: visible;
    cursor: pointer;
    color: #fff;
    text-decoration: none;
    z-index: 20;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6), inset 0 1px 1px rgba(255,255,255,0.1), inset 0 -2px 5px rgba(0,0,0,0.5);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-top-color: rgba(168, 85, 247, 0.5);
    border-bottom-color: rgba(139, 92, 246, 0.3);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.game-profile-card.profile-card-v3::before,
.game-profile-card.profile-card-v3::after,
.game-profile-card.game-profile-card-user.profile-card-v3::before,
.game-profile-card.game-profile-card-user.profile-card-v3::after {
    display: none !important;
    content: none !important;
}

.game-profile-card.profile-card-v3:hover,
.game-profile-card.profile-card-v3:focus-visible,
.game-profile-card.game-profile-card-user.profile-card-v3:hover,
.game-profile-card.game-profile-card-user.profile-card-v3:focus-visible {
    border-color: rgba(168, 85, 247, 0.7);
    box-shadow: 0 15px 40px rgba(124, 58, 237, 0.3), inset 0 1px 1px rgba(255,255,255,0.2);
    transform: translateY(-1px) translateZ(0);
}

.premium-avatar-box {
    position: relative;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    z-index: 30;
}

.avatar-border-anim {
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    opacity: 0.8;
    background: conic-gradient(from 0deg, transparent 0%, transparent 50%, #c084fc 80%, #e879f9 100%);
    animation: spin 3s linear infinite;
    filter: drop-shadow(0 0 8px rgba(192, 132, 252, 0.6));
    transition: opacity 0.25s ease;
}

.profile-card-v3:hover .avatar-border-anim,
.profile-card-v3:focus-visible .avatar-border-anim {
    opacity: 1;
}

.premium-avatar-bg {
    position: absolute;
    inset: 3px;
    border-radius: 9999px;
    background: #0f172a;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

.premium-avatar-img {
    position: absolute;
    inset: 4px;
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    border-radius: 9999px;
    object-fit: cover;
    display: block;
}

.level-shield {
    position: absolute;
    bottom: -6px;
    left: 50%;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 18px;
    padding: 0 6px;
    border-radius: 9999px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #334155 0%, #0f172a 100%);
    border: 2px solid #a855f7;
    box-shadow: 0 4px 10px rgba(0,0,0,0.8), inset 0 2px 4px rgba(255,255,255,0.2);
}

.level-shield span {
    color: #fff;
    font-size: 10px;
    line-height: 1;
    font-weight: 950;
    text-shadow: 0 1px 3px rgba(0,0,0,0.72);
}

.premium-profile-info {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1 1 auto;
    height: 100%;
    min-width: 0;
    padding-left: 12px;
    padding-right: 5px;
}

.premium-profile-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    margin-bottom: 3px;
    min-width: 0;
}

.premium-profile-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 3px rgba(0,0,0,0.75);
    transition: color 0.25s ease;
}

.profile-card-v3:hover .premium-profile-name,
.profile-card-v3:focus-visible .premium-profile-name {
    color: #ddd6fe;
}

.vip-badge.premium-profile-badge {
    position: relative;
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    max-width: 76px;
    overflow: hidden;
    padding: 2px 6px 1px;
    border-radius: 0.25rem;
    color: #451a03;
    background: linear-gradient(135deg, #fef08a 0%, #f59e0b 50%, #b45309 100%);
    border: 1px solid #fde68a;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.5), inset 0 1px 1px rgba(255,255,255,0.8);
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    font-size: 8px;
    font-weight: 950;
    line-height: 1.2;
    white-space: nowrap;
}

.premium-badge-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.50), transparent);
    transform: translateX(100%);
    pointer-events: none;
}

.profile-card-v3:hover .premium-badge-shimmer,
.profile-card-v3:focus-visible .premium-badge-shimmer {
    animation: premiumBadgeShimmer 1.5s infinite;
}

.premium-xp-track {
    position: relative;
    display: block;
    width: 100%;
    height: 6px;
    overflow: hidden;
    border-radius: 9999px;
    background: rgba(2, 6, 23, 0.80);
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.8);
}

.premium-xp-bar {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    min-width: 0;
    max-width: 100%;
    border-radius: 9999px;
    overflow: hidden;
    background: linear-gradient(to left, #8b5cf6, #d946ef, #ec4899);
}

.premium-xp-bar::after,
.glossy-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-20deg) translate3d(-150%, 0, 0);
    animation: shimmerBar 3s infinite;
    pointer-events: none;
}

.xp-glow-tip {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 8px;
    border-radius: 9999px;
    background: rgba(255,255,255,0.60);
    filter: blur(1px);
    box-shadow: -2px 0 10px 3px rgba(244, 114, 182, 0.8), -1px 0 4px 1px #fff;
}

.premium-xp-meta {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 3px;
    color: rgba(221, 214, 254, 0.80);
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.05em;
}

.premium-xp-meta span:first-child {
    color: rgba(221, 214, 254, 0.60);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes premiumBadgeShimmer {
    100% { transform: translateX(-100%); }
}

@keyframes shimmerBar {
    100% { transform: skewX(-20deg) translate3d(150%, 0, 0); }
}

@media (min-width: 640px) {
    .vip-badge.premium-profile-badge {
        display: flex;
    }

    .premium-xp-meta {
        display: flex;
    }
}

@media (min-width: 768px) {
    .game-profile-card.profile-card-v3,
    .game-profile-card.game-profile-card-user.profile-card-v3 {
        height: 56px;
        max-width: min(55%, 340px);
        padding-left: 8px;
        padding-right: 4px;
    }

    .premium-avatar-box {
        width: 60px;
        height: 60px;
        flex-basis: 60px;
    }

    .premium-avatar-bg {
        inset: 4px;
    }

    .premium-avatar-img {
        inset: 5px;
        width: calc(100% - 10px);
        height: calc(100% - 10px);
    }

    .level-shield {
        bottom: -8px;
        min-width: 32px;
        height: 22px;
    }

    .level-shield span {
        font-size: 12px;
    }

    .premium-profile-info {
        padding-left: 16px;
    }

    .premium-profile-topline {
        margin-bottom: 4px;
    }

    .premium-profile-name {
        font-size: 14px;
    }

    .vip-badge.premium-profile-badge {
        padding-left: 8px;
        padding-right: 8px;
        font-size: 10px;
    }

    .xp-glow-tip {
        width: 12px;
    }
}

@media (max-width: 380px) {
    .game-profile-card.profile-card-v3,
    .game-profile-card.game-profile-card-user.profile-card-v3 {
        max-width: 53%;
    }

    .premium-profile-info {
        padding-left: 8px;
    }

    .premium-profile-name {
        font-size: 10px;
    }
}


/* Dynamic diagonal role ribbon for the main-menu premium profile card. */
.profile-card-v3 .profile-role-ribbon-container {
    position: absolute;
    inset: 0;
    z-index: 10;
    overflow: hidden;
    border-radius: 2rem;
    pointer-events: none;
}

.profile-card-v3 .corner-ribbon {
    position: absolute;
    top: 9px;
    left: -28px;
    width: 80px;
    display: block;
    overflow: hidden;
    padding: 1px 0 0;
    transform: rotate(-45deg);
    text-align: center;
    color: #fff;
    font-family: Lalezar, Vazirmatn, Tahoma, sans-serif;
    font-size: 10px;
    line-height: 1.4;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.82);
    box-shadow: 0 2px 5px rgba(0,0,0,0.50), inset 0 1px 1px rgba(255,255,255,0.40);
}

.profile-card-v3 .corner-ribbon-label {
    position: relative;
    z-index: 2;
    display: block;
    white-space: nowrap;
}

.profile-card-v3 .ribbon-shimmer {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.50), transparent);
    transform: translateX(-100%);
    pointer-events: none;
}

.profile-card-v3:hover .ribbon-shimmer,
.profile-card-v3:focus-visible .ribbon-shimmer {
    animation: profileRibbonShimmer 1.5s infinite;
}

.profile-card-v3 .ribbon-normal {
    background: linear-gradient(135deg, #94a3b8 0%, #475569 100%);
    border-top: 1px solid #cbd5e1;
    border-bottom: 1px solid #334155;
}

.profile-card-v3 .ribbon-vip {
    background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 50%, #b45309 100%);
    border-top: 1px solid #fef08a;
    border-bottom: 1px solid #78350f;
}

.profile-card-v3 .ribbon-admin {
    background: linear-gradient(135deg, #f87171 0%, #dc2626 50%, #7f1d1d 100%);
    border-top: 1px solid #fca5a5;
    border-bottom: 1px solid #450a0a;
}

.profile-card-v3 .ribbon-helper {
    background: linear-gradient(135deg, #34d399 0%, #059669 50%, #064e3b 100%);
    border-top: 1px solid #6ee7b7;
    border-bottom: 1px solid #022c22;
}

.profile-card-v3[data-profile-ribbon="normal"] {
    border-color: rgba(148, 163, 184, 0.36);
}

.profile-card-v3[data-profile-ribbon="vip"] {
    border-color: rgba(245, 158, 11, 0.56);
    box-shadow: 0 12px 34px rgba(245, 158, 11, 0.14), 0 10px 30px rgba(0,0,0,0.58), inset 0 1px 1px rgba(255,255,255,0.12), inset 0 -2px 5px rgba(0,0,0,0.48);
}

.profile-card-v3[data-profile-ribbon="admin"] {
    border-color: rgba(248, 113, 113, 0.56);
    box-shadow: 0 12px 34px rgba(220, 38, 38, 0.14), 0 10px 30px rgba(0,0,0,0.58), inset 0 1px 1px rgba(255,255,255,0.12), inset 0 -2px 5px rgba(0,0,0,0.48);
}

.profile-card-v3[data-profile-ribbon="helper"] {
    border-color: rgba(52, 211, 153, 0.52);
    box-shadow: 0 12px 34px rgba(5, 150, 105, 0.13), 0 10px 30px rgba(0,0,0,0.58), inset 0 1px 1px rgba(255,255,255,0.12), inset 0 -2px 5px rgba(0,0,0,0.48);
}

.game-profile-card.profile-card-v3 .premium-profile-info,
.game-profile-card.game-profile-card-user.profile-card-v3 .premium-profile-info {
    z-index: 20;
    padding-left: clamp(24px, 7vw, 34px);
}

.game-profile-card.profile-card-v3 .premium-profile-badge,
.game-profile-card.game-profile-card-user.profile-card-v3 .premium-profile-badge {
    display: none !important;
}

@keyframes profileRibbonShimmer {
    100% { transform: translateX(100%); }
}

@media (min-width: 768px) {
    .profile-card-v3 .corner-ribbon {
        width: 90px;
        font-size: 11px;
        padding-top: 2px;
    }

    .game-profile-card.profile-card-v3 .premium-profile-info,
    .game-profile-card.game-profile-card-user.profile-card-v3 .premium-profile-info {
        padding-left: 34px;
    }
}

@media (max-width: 380px) {
    .profile-card-v3 .corner-ribbon {
        top: 8px;
        left: -30px;
        width: 78px;
        font-size: 9px;
    }

    .game-profile-card.profile-card-v3 .premium-profile-info,
    .game-profile-card.game-profile-card-user.profile-card-v3 .premium-profile-info {
        padding-left: 24px;
    }
}

html[data-graphics-quality="low"] .profile-card-v3 .ribbon-shimmer,
html[data-graphics-quality="medium"] .profile-card-v3 .ribbon-shimmer {
    animation: none !important;
}

html[data-graphics-quality="low"] .avatar-border-anim,
html[data-graphics-quality="low"] .premium-xp-bar::after,
html[data-graphics-quality="low"] .glossy-bar::after,
html[data-graphics-quality="medium"] .premium-xp-bar::after,
html[data-graphics-quality="medium"] .glossy-bar::after {
    animation: none !important;
}

html[data-graphics-quality="low"] .avatar-border-anim {
    display: none !important;
}
