:root {
  color-scheme: dark;
  --bg: #0a0b0f;
  --panel: #12141b;
  --line: rgba(255, 255, 255, .095);
  --text: #f7f5f3;
  --muted: #92929a;
  --red: #f02232;
  --white-red: #ffb8bc;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
body.modal-open { overflow: hidden; }
body { min-height: 100vh; margin: 0; color: var(--text); background: radial-gradient(ellipse at 15% -10%, rgba(240,34,50,.28), transparent 42%), radial-gradient(ellipse at 100% 55%, rgba(125,11,22,.2), transparent 38%), var(--bg); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.noise { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .035; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.app-shell { width: min(calc(100% - 28px), 720px); min-width: 0; margin: auto; padding: 20px 0 105px; }
.topbar, .brand, .screen-heading, .metric-row, .player-row, .row-between { display: flex; align-items: center; }
.topbar, .screen-heading, .row-between { justify-content: space-between; gap: 16px; }
.brand { gap: 10px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--red); border-radius: 10px; color: var(--red); font-size: 18px; box-shadow: 0 0 25px rgba(240,34,50,.25); }
.brand b { display: block; letter-spacing: .22em; font-size: 15px; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; letter-spacing: .08em; line-height: 1.35; }
.round-button, .modal-close { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); }
.round-button { width: 38px; height: 38px; font-size: 20px; }
.screen, .screen-heading, .screen-heading > div, .list { min-width: 0; max-width: 100%; }
.screen-heading { margin: 34px 0 16px; }
h1, h2, p { margin: 0; }
h1 { margin-top: 4px; font-size: clamp(27px, 7vw, 38px); letter-spacing: -.045em; }
h2 { font-size: 22px; }
.kicker { color: var(--red); font-size: 10px; font-weight: 850; letter-spacing: .19em; }
.panel, .profile-card, .bio-card, .player-row, .achievement, .comment-card, .edit-card { border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(145deg, rgba(27,29,38,.96), rgba(14,16,22,.96)); box-shadow: 0 15px 40px rgba(0,0,0,.16); }
.loading { margin-top: 40px; padding: 34px; color: var(--muted); text-align: center; }
.profile-card { position: relative; overflow: hidden; padding: 20px; }
.profile-card:before { content: ""; position: absolute; top: -70px; right: -60px; width: 190px; height: 190px; border: 1px solid rgba(240,34,50,.2); border-radius: 50%; box-shadow: 0 0 0 18px rgba(240,34,50,.035), 0 0 0 38px rgba(240,34,50,.025); }
.identity { position: relative; display: flex; align-items: center; gap: 13px; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: 64px; height: 64px; overflow: hidden; border: 2px solid rgba(240,34,50,.8); border-radius: 19px; background: #27151a; color: var(--white-red); font-size: 26px; font-weight: 850; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.identity h2 { max-width: 270px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.username { margin-top: 5px; color: var(--muted); font-size: 13px; }
.status { display: inline-flex; margin-top: 9px; padding: 4px 8px; border-radius: 99px; background: rgba(255,255,255,.07); color: #c5c6cc; font-size: 10px; }
.status.verified { background: rgba(51,188,112,.14); color: #6fe19c; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; position: relative; margin-top: 22px; }
.metric { padding: 13px 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(0,0,0,.14); }
.metric b { display: block; font-size: 18px; }
.metric span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.bio-card { margin-top: 11px; padding: 17px; }
.bio-card p { color: #d0d0d4; font-size: 14px; line-height: 1.55; white-space: pre-wrap; }
.empty-bio { color: var(--muted) !important; }
.classes-title { display: flex; justify-content: space-between; align-items: center; margin: 22px 2px 10px; }
.classes-title small, small { color: var(--muted); font-size: 11px; }
.class-list { display: flex; flex-wrap: wrap; gap: 7px; }
.class-badge { padding: 8px 10px; border: 1px solid rgba(240,34,50,.35); border-radius: 10px; background: rgba(157,20,34,.14); color: #f0c5c7; font-size: 12px; }
.class-badge em { margin-left: 5px; color: var(--red); font-style: normal; font-size: 10px; }
.primary-button, .outline-button, .danger-button { border-radius: 11px; padding: 10px 14px; font-size: 12px; font-weight: 800; }
.primary-button { border: 1px solid var(--red); background: var(--red); color: white; }
.outline-button { border: 1px solid rgba(240,34,50,.5); background: transparent; color: var(--white-red); }
.danger-button { border: 1px solid rgba(240,34,50,.35); background: rgba(157,20,34,.12); color: #ff8990; }
.wide { width: 100%; margin-top: 5px; }
.search-box { display: flex; align-items: center; gap: 9px; min-width: 0; max-width: 100%; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.search-box span { color: var(--red); font-size: 24px; }
.search-box input { width: 100%; padding: 14px 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.list { display: grid; gap: 8px; max-height: calc(100vh - 230px); margin-top: 12px; overflow-x: hidden; overflow-y: auto; padding: 1px 2px 2px 0; }
.player-row { width: 100%; min-width: 0; gap: 11px; padding: 12px; cursor: pointer; transition: transform .15s, border-color .15s; }
.player-row:hover { transform: translateY(-1px); border-color: rgba(240,34,50,.55); }
.player-row .avatar { width: 43px; height: 43px; flex: 0 0 43px; border-radius: 13px; font-size: 17px; }
.player-copy { min-width: 0; flex: 1 1 auto; overflow: hidden; }
.player-copy b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-copy small { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-days { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; white-space: nowrap; color: var(--white-red); font-weight: 800; font-size: 13px; }
.player-days .verify-icon { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; font-size: 13px; }
.player-days.verified { color: #74e5a0; }
.player-days.verified .verify-icon { background: rgba(58, 207, 117, .16); color: #74e5a0; }
.player-days.unverified { color: #ff858d; }
.player-days.unverified .verify-icon { background: rgba(240, 34, 50, .16); color: #ff858d; }
.player-days small { display: block; margin-top: 3px; color: var(--muted); font-weight: 400; }
.place { width: 26px; color: var(--red); font-size: 13px; font-weight: 850; text-align: center; }
.achievement-list { display: grid; gap: 9px; }
.achievement { display: flex; align-items: center; gap: 12px; padding: 15px; }
.achievement-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: rgba(240,34,50,.14); color: var(--red); font-size: 18px; }
.achievement small { display: block; margin-top: 3px; }
.shop-balance { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; padding: 14px 16px; border: 1px solid rgba(240,34,50,.25); border-radius: 15px; background: rgba(157,20,34,.12); }
.shop-balance b { color: var(--white-red); font-size: 19px; }
.shop-balance span { color: var(--muted); font-size: 11px; }
.shop-list { display: grid; gap: 10px; }
.shop-item { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 15px; }
.shop-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(240,34,50,.45); border-radius: 14px; background: rgba(157,20,34,.18); color: var(--red); font-size: 22px; }
.shop-copy { min-width: 0; }
.shop-copy b { display: block; }
.shop-copy small { display: block; margin-top: 4px; line-height: 1.35; }
.shop-price { color: var(--white-red); font-size: 12px; font-weight: 850; white-space: nowrap; }
.shop-owned { color: #74e5a0; font-size: 11px; font-weight: 750; white-space: nowrap; }
.referral-hero { padding: 20px; }
.referral-hero h2 { margin: 8px 0; }
.referral-hero p { color: #c6c6cc; font-size: 13px; line-height: 1.5; }
.referral-link { display: flex; gap: 8px; margin-top: 16px; }
.referral-link input { min-width: 0; flex: 1; border: 1px solid var(--line); border-radius: 11px; padding: 10px; background: #0a0c11; color: var(--muted); font-size: 12px; }
.referral-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 10px; }
.referral-stat { padding: 14px 10px; text-align: center; }
.referral-stat b { display: block; color: var(--white-red); font-size: 19px; }
.referral-stat small { display: block; margin-top: 4px; }
.run-form { display: grid; gap: 13px; padding: 18px; }
.run-list { display: grid; gap: 10px; margin-bottom: 12px; }
.run-card { padding: 16px; }
.run-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.run-card-head h3 { margin: 0; font-size: 16px; }
.run-card-head small { display: block; margin-top: 4px; }
.run-days { color: var(--white-red); font-size: 13px; font-weight: 850; white-space: nowrap; }
.run-card p { margin: 13px 0 10px; color: #d1d1d6; font-size: 13px; line-height: 1.45; }
.run-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.run-meta span { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 10px; }
.run-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.run-actions .danger-button { width: 38px; height: 36px; padding: 0; font-size: 18px; }
.run-form label { display: grid; gap: 7px; color: #dedde0; font-size: 12px; font-weight: 700; }
.run-form input, .run-form textarea, .run-form select { width: 100%; border: 1px solid var(--line); border-radius: 12px; outline: 0; background: #0a0c11; color: var(--text); padding: 12px; }
.run-form textarea { min-height: 72px; resize: vertical; }
.run-form select option { background: #111319; }
.run-form input:focus, .run-form textarea:focus, .run-form select:focus { border-color: var(--red); }
.days-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; }
.day-chip { border: 1px solid var(--line); border-radius: 10px; padding: 9px 4px; background: #0d0f14; color: var(--muted); font-size: 11px; }
.day-chip.selected { border-color: rgba(240,34,50,.75); background: rgba(157,20,34,.18); color: #ffced0; }
.time-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-note { min-height: 18px; margin: 0; color: #74e5a0; font-size: 12px; line-height: 1.4; }
.verify-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 13px; border: 1px solid rgba(240,34,50,.28); border-radius: 14px; background: rgba(157,20,34,.11); }
.verify-box span { color: #ffb9bd; font-size: 12px; line-height: 1.35; }
.bottom-nav { position: fixed; right: 14px; bottom: 14px; left: 14px; z-index: 5; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 4px; margin: auto; width: min(calc(100% - 28px), 692px); padding: 6px; border: 1px solid var(--line); border-radius: 18px; background: rgba(17,18,24,.92); backdrop-filter: blur(18px); box-shadow: 0 10px 35px rgba(0,0,0,.45); }
.nav-item { display: grid; gap: 3px; place-items: center; border: 0; border-radius: 13px; padding: 8px 3px; background: transparent; color: var(--muted); font-size: 10px; }
.nav-item span { color: inherit; font-size: 18px; line-height: 1; }
.nav-item.active { background: rgba(240,34,50,.14); color: var(--white-red); }
.modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: end center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(5px); }
.modal-card { position: relative; width: min(100%,720px); max-height: 90vh; overflow: auto; padding: 55px 18px 28px; border: 1px solid var(--line); border-radius: 24px 24px 0 0; background: #111319; box-shadow: 0 -20px 80px rgba(0,0,0,.55); }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; border-color: rgba(240,34,50,.45); background: #1a151b; color: #ffb8bc; font-size: 25px; line-height: 1; }
.edit-card { display: grid; gap: 13px; }
.edit-card h2 { margin-bottom: 7px; }
.edit-card label { display: grid; gap: 7px; color: #dedde0; font-size: 12px; font-weight: 700; }
.edit-card input, .edit-card textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; outline: 0; background: #0a0c11; color: var(--text); padding: 12px; }
.edit-card textarea { min-height: 82px; resize: vertical; }
.edit-card input:focus, .edit-card textarea:focus { border-color: var(--red); }
.label-line { display: flex; justify-content: space-between; align-items: center; margin-top: 3px; }
.class-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.class-chip { display: flex; justify-content: space-between; gap: 5px; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: #0d0f14; color: #c5c5ca; font-size: 11px; text-align: left; }
.class-chip.selected { border-color: rgba(240,34,50,.75); background: rgba(157,20,34,.18); color: #ffced0; }
.class-chip em { color: var(--red); font-style: normal; white-space: nowrap; }
.rating-box { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.stars { display: flex; gap: 5px; margin: 10px 0; }
.star { border: 0; padding: 0; background: transparent; color: #555762; font-size: 25px; }
.star.active { color: var(--red); }
.comment-input { width: 100%; min-height: 74px; border: 1px solid var(--line); border-radius: 12px; padding: 11px; outline: 0; resize: vertical; background: #0a0c11; color: var(--text); }
.comment-input:focus { border-color: var(--red); }
.comment-card { margin-top: 9px; padding: 13px; }
.comment-card p { margin-top: 7px; color: #d0d0d4; font-size: 13px; line-height: 1.45; }
.comment-card small { display: block; margin-top: 3px; }
.notice { position: fixed; top: 14px; right: 14px; left: 14px; z-index: 30; margin: auto; width: min(calc(100% - 28px), 692px); padding: 13px 15px; border: 1px solid rgba(240,34,50,.55); border-radius: 13px; background: #35131a; color: #ffd1d3; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.hidden { display: none !important; }
@media (min-width:650px) { .app-shell { padding-top: 32px; } .modal { place-items: center; } .modal-card { border-radius: 24px; } }
@media (max-width:440px) { .class-grid { grid-template-columns: 1fr; } .metrics { gap: 5px; } .metric { padding: 11px 7px; } .shop-item { grid-template-columns: 38px minmax(0,1fr); } .shop-icon { width: 38px; height: 38px; } .shop-price, .shop-owned { grid-column: 2; } .nav-item { font-size: 9px; } .nav-item span { font-size: 16px; } .verify-box { align-items: flex-start; flex-direction: column; } }
