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

body {
    font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
    background: #0a0a0c;
    color: #fff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@font-face {
    font-family: 'Montserrat';
    src: url("/fonts/Montserrat-Bold.woff2") format('woff2');
}

@font-face {
    font-family: 'Montserrat-Light';
    src: url("/fonts/Montserrat-Light.woff2") format('woff2');
}

canvas {
    position: fixed;
    inset: 0;
    z-index: 10;
}

.debug-console {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483647;
    background: rgba(0, 0, 0, 0.85);
    color: #00ff66;
    font-family: "Courier New", monospace;
    font-size: 13px;
    line-height: 1.3;
    padding: 8px 12px;
    margin: 0;
    white-space: pre-wrap;
    max-height: 35vh;
    overflow: auto;
    pointer-events: auto;
    user-select: text;
}

.debug-console-copy {
    position: fixed;
    right: 12px;
    bottom: calc(35vh + 12px);
    z-index: 2147483647;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 14px;
    padding: 6px 10px;
    font-size: 12px;
    font-family: "Montserrat", system-ui, -apple-system, sans-serif;
}

.debug-console.hidden {
    display: none;
}

.debug-console-toggle {
    position: fixed;
    right: 12px;
    bottom: calc(35vh - 28px);
    z-index: 2147483647;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 14px;
    padding: 6px 10px;
    font-size: 12px;
    font-family: "Montserrat", system-ui, -apple-system, sans-serif;
    letter-spacing: 0.5px;
}

.landing {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.landing__bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.landing__glow {
    position: absolute;
    width: 60%;
    height: 60%;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.6;
}

.landing__glow--blue {
    top: -15%;
    right: -15%;
    background: rgba(37, 99, 235, 0.18);
}

.landing__glow--purple {
    bottom: -15%;
    left: -15%;
    background: rgba(147, 51, 234, 0.18);
}

.landing__content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 448px;
    padding: 24px 20px 120px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.landing__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.landing__avatar-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.landing__avatar {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.1);
    box-shadow: 0 18px 30px rgba(0,0,0,0.45);
}

.landing__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.landing__badge {
    position: absolute;
    right: -6px;
    bottom: -6px;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: #f5c542;
    color: #111;
    display: grid;
    place-items: center;
    border: 2px solid #0a0a0c;
}

.landing__badge svg {
    width: 14px;
    height: 14px;
}

.landing__header-text {
    flex: 1;
}

.landing__name {
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.landing__level {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    margin-top: 2px;
}

.landing__plus {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 4px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.6);
    display: grid;
    place-items: center;
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-card {
    padding: 20px;
    border-radius: 32px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.stat-card--gold {
    background: linear-gradient(135deg, rgba(234,179,8,0.12), rgba(10,10,12,0.05));
    border-color: rgba(234,179,8,0.25);
}

.stat-card--blue {
    background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(10,10,12,0.05));
    border-color: rgba(59,130,246,0.25);
}

.stat-card--clickable {
    cursor: pointer;
}

.stat-card--clickable:active {
    transform: scale(0.985);
}

.stat-card__label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: rgba(255,255,255,0.4);
    margin-bottom: 10px;
}

.stat-card__label img,
.stat-card__label svg {
    width: 16px;
    height: 16px;
}

.stat-card__value {
    font-size: 28px;
    font-weight: 800;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.stat-card__value span {
    font-size: 10px;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section__title svg {
    width: 20px;
    height: 20px;
    color: #f5c542;
}

.section__title--between {
    justify-content: space-between;
}

.section__title-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.section__meta {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

.quest-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quest-card__left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quest-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
}

.quest-card__icon img,
.quest-card__icon svg {
    width: 24px;
    height: 24px;
}

.quest-card__icon--gold {
    background: rgba(234,179,8,0.18);
    border-color: rgba(234,179,8,0.3);
}

.quest-card__icon--blue {
    background: rgba(59,130,246,0.18);
    border-color: rgba(59,130,246,0.3);
    color: #60a5fa;
}

.quest-card__icon--purple {
    background: rgba(99,102,241,0.18);
    border-color: rgba(99,102,241,0.3);
    color: #a5b4fc;
}

.quest-card__title {
    font-size: 14px;
    font-weight: 600;
}

.quest-card__sub {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}

.pill {
    border: none;
    border-radius: 12px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
}

.pill--gold { background: #f5c542; color: #0a0a0c; }
.pill--blue { background: #3b82f6; color: #fff; }
.pill--purple { background: #6366f1; color: #fff; }
.pill--pulse { animation: pillPulse 0.6s ease-in-out 3; }

@keyframes pillPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(99,102,241,0.5); }
    50% { transform: scale(1.06); box-shadow: 0 0 18px rgba(99,102,241,0.7); }
    100% { transform: scale(1); box-shadow: 0 0 0 rgba(99,102,241,0.5); }
}

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

.prop-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.prop-card__img {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(255,255,255,0.05);
    cursor: pointer;
    position: relative;
}

.prop-card__img img {
    width: auto;
    height: auto;
    max-width: 72%;
    max-height: 72%;
    object-fit: contain;
    filter: none !important;
}

.prop-card__owned {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: rgba(0,0,0,0.65);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
}

.prop-card__price {
    width: 100%;
    border: none;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.prop-card__price img {
    width: 16px;
    height: 16px;
    filter: none !important;
}

.prop-card__price span {
    font-size: 12px;
    font-weight: 700;
    color: #f5c542;
}

.section--squad {
    margin-bottom: 120px;
}

.squad-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    overflow: hidden;
}

.squad-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.squad-row:last-child {
    border-bottom: none;
}

.squad-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
}

.squad-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
}

.squad-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.squad-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #0a0a0c;
}

.squad-tag {
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.5);
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 10px;
    font-weight: 700;
}

.squad-tag--joined {
    background: rgba(34,197,94,0.1);
    border-color: rgba(34,197,94,0.2);
    color: #4ade80;
}

.squad-footer {
    width: 100%;
    border: none;
    background: transparent;
    color: #60a5fa;
    padding: 16px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.squad-footer svg {
    width: 16px;
    height: 16px;
}

.cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px 0 28px;
    background: linear-gradient(to top, rgba(10,10,12,1), rgba(10,10,12,0.95), transparent);
    z-index: 5;
    pointer-events: none;
}

.cta__inner {
    max-width: 448px;
    margin: 0 auto;
    padding: 0 20px;
    pointer-events: auto;
}

.cta__button {
    width: 100%;
    border: none;
    border-radius: 32px;
    padding: 18px 20px;
    background: #f5c542;
    color: #111;
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 20px 50px rgba(234,179,8,0.5);
}

.cta__button svg {
    width: 22px;
    height: 22px;
}

.landing--gone {
    display: none;
}

.refill-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.refill-modal.is-open {
    display: block;
}

.refill-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
}

.refill-modal__card {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    background: #121521;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 24px 48px rgba(0,0,0,0.45);
}

.refill-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 800;
    font-size: 18px;
    margin-bottom: 4px;
}

.refill-modal__x {
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.8);
    font-size: 24px;
    line-height: 1;
}

.refill-modal__sub {
    color: rgba(255,255,255,0.65);
    font-size: 12px;
    margin-bottom: 8px;
}

.refill-modal__bonus {
    color: #ff5a5a;
    font-weight: 700;
}

.refill-modal__legal {
    font-size: 12px;
    color: rgba(255,255,255,0.78);
    margin-top: 8px;
    margin-bottom: 2px;
    line-height: 1.35;
}

.refill-modal__legal a,
.legal-footer a {
    color: #76a7ff;
    text-decoration: none;
}

.refill-option {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    color: #fff;
    border-radius: 12px;
    padding: 12px;
    text-align: left;
    margin-bottom: 8px;
    font-weight: 700;
}

.legal-footer {
    width: 100%;
    max-width: 448px;
    margin: 0 auto;
    padding: 0 20px 96px;
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

.legal-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
}

.legal-modal.is-open {
    display: block;
}

.legal-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

.legal-modal__card {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 10%;
    bottom: 10%;
    background: #121521;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
}

.legal-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 800;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.legal-modal__x {
    border: none;
    background: transparent;
    color: rgba(255,255,255,0.8);
    font-size: 24px;
}

.legal-modal__body {
    padding: 12px 14px 20px;
    overflow: auto;
    line-height: 1.45;
    color: rgba(255,255,255,0.9);
    font-size: 13px;
}
