/* =========================================================
   MatchMate — профиль игрока из мэтча (/match-profile).
   Короткая статичная карточка: фото, ник, о себе, игры и ранги,
   контакты. Украшения из магазина (рамка, цвет ника, значок,
   тема карточки, фон профиля) применяются теми же классами,
   что и в своём профиле (styles.css), фон и тема — ниже.
   ========================================================= */
.mp{
  --mp-panel:linear-gradient(180deg,rgba(17,25,41,.94),rgba(10,15,26,.96));
  --mp-line:rgba(255,255,255,.08);
  --mp-line-2:rgba(255,255,255,.13);
  --mp-text:#eef3fb;--mp-muted:#97a6bb;--mp-dim:#6f7f96;
  --mp-grad:linear-gradient(135deg,#4fd6f7,#8f7bff);
  position:relative;width:100%;max-width:680px;margin:0 auto;
  padding:14px 16px calc(112px + env(safe-area-inset-bottom,0px));
  color:var(--mp-text);
}
.mp *{box-sizing:border-box}

/* верхняя строка */
.mp-bar{display:flex;align-items:center;gap:10px;margin:0 0 12px}
.mp-back{
  display:grid;place-items:center;flex:none;width:40px;height:40px;border-radius:13px;
  border:1px solid var(--mp-line-2);background:rgba(255,255,255,.04);color:#dbe6f4;text-decoration:none;
}
.mp-back svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.mp-bar-title{flex:1;min-width:0;font-size:17px;font-weight:850;letter-spacing:-.01em}
.mp-status{
  display:inline-flex;align-items:center;gap:6px;flex:none;height:30px;padding:0 11px;border-radius:999px;
  background:rgba(63,224,163,.1);border:1px solid rgba(63,224,163,.28);color:#7ff0c6;font-size:12.5px;font-weight:800;
}
.mp-status::before{content:"";width:7px;height:7px;border-radius:50%;background:#3fe0a3;box-shadow:0 0 8px #3fe0a3}
.mp-status.is-like{background:rgba(255,93,140,.1);border-color:rgba(255,93,140,.3);color:#ff9fbd}
.mp-status.is-like::before{background:#ff5d8c;box-shadow:0 0 8px #ff5d8c}

/* главная карточка */
.mp-hero{
  position:relative;overflow:hidden;padding:26px 18px 18px;border-radius:26px;text-align:center;
  border:1px solid var(--mp-line-2);background:#0b111d;
  box-shadow:0 24px 60px rgba(0,0,0,.45);
}
.mp-hero-bg{
  position:absolute;inset:-30px;z-index:0;pointer-events:none;
  background:radial-gradient(70% 60% at 50% 0%,rgba(143,123,255,.32),transparent 70%),radial-gradient(60% 50% at 0% 100%,rgba(79,214,247,.14),transparent 70%);
}
.mp-hero-bg.has-photo{background-size:cover;background-position:center;filter:blur(28px) saturate(1.2);opacity:.45;transform:scale(1.1)}
.mp-hero::after{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background:linear-gradient(180deg,rgba(11,17,29,.15),rgba(11,17,29,.86) 62%,#0b111d)}
.mp-hero > *:not(.mp-hero-bg){position:relative;z-index:1}

.mp-ava-wrap{display:flex;justify-content:center}
.mp-ava{
  position:relative;display:grid;place-items:center;width:124px;height:124px;border-radius:50%;overflow:hidden;
  border:3px solid rgba(255,255,255,.14);background:linear-gradient(145deg,#2a3352,#121a2b);
  box-shadow:0 16px 40px rgba(0,0,0,.5);
}
.mp-ava img{display:block;width:100%;height:100%;object-fit:cover;border-radius:50%}
.mp-ava-letter{font-size:46px;font-weight:900;color:#fff}

.mp-name{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:2px 6px;
  margin:16px 0 0;font-size:26px;font-weight:900;line-height:1.15;letter-spacing:-.02em;word-break:break-word;
}
.mp-name .nickname-text{max-width:100%;color:#fff}
.mp-name .user-group-tag{
  display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:7px;
  background:color-mix(in srgb,var(--group-color,#5ad4ff) 18%,transparent);
  border:1px solid color-mix(in srgb,var(--group-color,#5ad4ff) 45%,transparent);
  color:var(--group-color,#5ad4ff);font-size:11.5px;font-weight:850;letter-spacing:.02em;
}
.mp-meta{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:10px 0 0;padding:0;list-style:none}
.mp-meta li{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 11px;border-radius:999px;background:rgba(255,255,255,.05);border:1px solid var(--mp-line);color:#c9d6e6;font-size:13px;font-weight:700}
.mp-meta svg{width:14px;height:14px;fill:none;stroke:#6edff8;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.mp-meta:empty{display:none}

.mp-actions{display:grid;grid-template-columns:1fr;gap:10px;margin-top:18px}
.mp-actions.is-two{grid-template-columns:minmax(0,1fr) minmax(0,1.6fr)}
.mp-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:52px;padding:0 18px;border-radius:16px;cursor:pointer;
  border:1px solid var(--mp-line-2);background:rgba(255,255,255,.05);color:#e6eef8;font:inherit;font-size:16px;font-weight:850;text-decoration:none;
  transition:transform .15s ease,filter .15s ease;-webkit-tap-highlight-color:transparent;
}
.mp-btn:active{transform:scale(.98)}
.mp-btn:disabled{opacity:.6;cursor:default}
.mp-btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round}
.mp-btn-primary{border:0;background:var(--mp-grad);color:#04070f;box-shadow:0 14px 32px rgba(95,150,255,.28)}
.mp-btn-like svg{fill:currentColor;stroke:none}
.mp-btn-pass{color:#ff8a98}
.mp-error{margin:10px 0 0;color:#ff8a98;font-size:13.5px}

/* музыка профиля (магазин) */
#match-profile-music:empty{display:none}
#match-profile-music{margin-top:12px}
.mp .profile-music-toggle{
  display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 14px;border-radius:999px;cursor:pointer;
  border:1px solid rgba(143,123,255,.35);background:rgba(143,123,255,.12);color:#cfc5ff;font:inherit;font-size:13px;font-weight:800;
}

/* секции */
.mp-card{margin-top:12px;padding:16px;border-radius:22px;border:1px solid var(--mp-line);background:var(--mp-panel)}
.mp-card h2{display:flex;align-items:center;gap:8px;margin:0 0 12px;color:var(--mp-muted);font-size:12px;font-weight:900;letter-spacing:.1em;text-transform:uppercase}
.mp-bio{margin:0;color:#dbe4f1;font-size:15.5px;line-height:1.55;white-space:pre-line;overflow-wrap:anywhere}
.mp-empty{margin:0;color:var(--mp-dim);font-size:14.5px;line-height:1.5}

/* игры и ранги */
.mp-games{display:flex;flex-direction:column;gap:8px}
.mp-game{display:flex;align-items:center;gap:12px;min-height:54px;padding:8px 10px 8px 8px;border-radius:15px;background:rgba(255,255,255,.035);border:1px solid var(--mp-line)}
.mp-game-icon{display:grid;place-items:center;flex:none;width:38px;height:38px;overflow:hidden}
.mp-game-icon img{width:38px;height:38px;object-fit:contain}
.mp-game-icon b{font-size:12px;font-weight:900;color:#cfe7f7}
.mp-game-name{flex:1;min-width:0;font-size:15px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mp-rank{display:inline-flex;align-items:center;gap:6px;flex:none;max-width:52%;height:32px;padding:0 10px 0 6px;border-radius:10px;background:rgba(79,214,247,.1);border:1px solid rgba(79,214,247,.22);color:#fff;font-size:13px;font-weight:850}
.mp-rank img{width:22px;height:22px;object-fit:contain}
.mp-rank span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mp-rank.is-empty{padding:0 10px;background:transparent;border-color:var(--mp-line);color:var(--mp-dim);font-weight:700}

/* статистика Tracker.gg */
.mp-stats{margin-top:10px;border-radius:15px;border:1px solid var(--mp-line);background:rgba(255,255,255,.02)}
.mp-stats summary{display:flex;align-items:center;gap:8px;padding:12px 14px;cursor:pointer;list-style:none;font-size:14px;font-weight:800;color:#c9d6e6}
.mp-stats summary::-webkit-details-marker{display:none}
.mp-stats summary::after{content:"";margin-left:auto;width:8px;height:8px;border-right:2px solid var(--mp-muted);border-bottom:2px solid var(--mp-muted);transform:rotate(45deg) translateY(-2px);transition:transform .2s ease}
.mp-stats[open] summary::after{transform:rotate(-135deg)}
.mp-stats-body{display:flex;flex-direction:column;gap:10px;padding:0 12px 12px}
.mp-stat-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;font-size:13.5px;font-weight:850}
.mp-stat-head small{color:var(--mp-dim);font-size:11.5px;font-weight:700}
.mp-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.mp-stat-grid div{padding:9px 4px;border-radius:11px;background:rgba(0,0,0,.22);text-align:center}
.mp-stat-grid b{display:block;font-size:16px;font-weight:900}
.mp-stat-grid span{display:block;margin-top:1px;color:var(--mp-dim);font-size:10.5px;font-weight:700}
.mp-stats-link{display:block;padding:4px;color:var(--mp-muted);font-size:12.5px;text-align:center;text-decoration:none}

/* контакты */
.mp-contacts{display:flex;flex-direction:column;gap:8px}
.mp-contact{
  display:flex;align-items:center;gap:12px;width:100%;min-height:58px;padding:8px 12px 8px 8px;border-radius:15px;cursor:pointer;
  border:1px solid var(--mp-line);background:rgba(255,255,255,.035);color:inherit;font:inherit;text-align:left;text-decoration:none;
  transition:background .15s ease,border-color .15s ease;-webkit-tap-highlight-color:transparent;
}
.mp-contact:hover{background:rgba(255,255,255,.06);border-color:var(--mp-line-2)}
.mp-contact-icon{display:grid;place-items:center;flex:none;width:42px;height:42px;border-radius:12px;background:var(--c,#2b3550);color:#fff}
.mp-contact-icon svg{width:22px;height:22px}
.mp-contact-text{flex:1;min-width:0}
.mp-contact-text b{display:block;font-size:14.5px;font-weight:850}
.mp-contact-text span{display:block;margin-top:1px;color:var(--mp-muted);font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mp-contact-go{flex:none;color:var(--mp-dim);font-size:12.5px;font-weight:800}
.mp-contact-go svg{display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}

/* загрузка: место занято заранее, ничего не прыгает */
.mp.is-loading .mp-name .nickname-text,.mp.is-loading .mp-bio,.mp.is-loading .mp-games,.mp.is-loading .mp-contacts{
  color:transparent;border-radius:10px;
  background:linear-gradient(90deg,rgba(255,255,255,.05),rgba(255,255,255,.1),rgba(255,255,255,.05)) 0 0/200% 100%;
  animation:mp-shimmer 1.2s linear infinite;
}
.mp.is-loading .mp-games,.mp.is-loading .mp-contacts{min-height:54px}
.mp.is-loading .mp-bio{min-height:46px}
@keyframes mp-shimmer{to{background-position:-200% 0}}

/* !important: theme.css makes every div in <body> position:relative */
.mp-toast{
  position:fixed !important;left:50%;bottom:calc(96px + env(safe-area-inset-bottom,0px));z-index:1200 !important;transform:translate(-50%,20px);opacity:0;pointer-events:none;
  padding:11px 16px;border-radius:14px;background:rgba(14,21,35,.97);border:1px solid rgba(79,214,247,.35);color:#fff;font-size:14px;font-weight:700;
  box-shadow:0 14px 36px rgba(0,0,0,.5);transition:opacity .2s ease,transform .2s ease;
}
.mp-toast.show{opacity:1;transform:translate(-50%,0)}

/* тема карточки из магазина */
.mp-hero.card-theme-fire{border-color:rgba(255,122,54,.58);box-shadow:0 24px 60px rgba(0,0,0,.5),0 0 0 1px rgba(255,122,54,.35),0 0 28px rgba(255,122,54,.32)}
.mp-hero.card-theme-fire .mp-hero-bg:not(.has-photo){background:radial-gradient(70% 60% at 50% 0%,rgba(255,122,54,.38),transparent 70%)}
.mp-hero.card-theme-neon{border-color:rgba(0,214,255,.58);box-shadow:0 24px 60px rgba(0,0,0,.5),0 0 0 1px rgba(0,214,255,.35),0 0 30px rgba(0,214,255,.34)}
.mp-hero.card-theme-neon .mp-hero-bg:not(.has-photo){background:radial-gradient(70% 60% at 50% 0%,rgba(0,214,255,.36),transparent 70%)}
.mp-hero.card-theme-aurora{border-color:rgba(117,255,178,.58);box-shadow:0 24px 60px rgba(0,0,0,.5),0 0 0 1px rgba(117,255,178,.35),0 0 32px rgba(176,113,255,.34)}
.mp-hero.card-theme-aurora .mp-hero-bg:not(.has-photo){background:radial-gradient(60% 60% at 20% 0%,rgba(117,255,178,.3),transparent 70%),radial-gradient(60% 60% at 90% 10%,rgba(176,113,255,.34),transparent 70%)}
.mp-hero.card-theme-hologram{border-color:rgba(225,181,255,.58);box-shadow:0 24px 60px rgba(0,0,0,.5),0 0 0 1px rgba(225,181,255,.35),0 0 32px rgba(119,218,255,.32)}
.mp-hero.card-theme-hologram .mp-hero-bg:not(.has-photo){background:linear-gradient(120deg,rgba(119,218,255,.3),rgba(225,181,255,.3),rgba(255,236,150,.22))}

/* фон профиля из магазина: вся страница за карточками */
.mp[class*="profile-bg-"]::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none}
.mp.profile-bg-neon-city::before{background:radial-gradient(120% 70% at 20% 0%,rgba(0,207,255,.22),transparent 58%),radial-gradient(120% 70% at 90% 8%,rgba(255,79,198,.2),transparent 62%)}
.mp.profile-bg-sakura::before{background:radial-gradient(130% 70% at 15% 0%,rgba(255,178,214,.24),transparent 58%),radial-gradient(120% 70% at 100% 15%,rgba(255,226,152,.2),transparent 64%)}
.mp.profile-bg-midnight::before{background:radial-gradient(120% 70% at 80% 0%,rgba(94,124,255,.24),transparent 56%),radial-gradient(130% 70% at 0% 12%,rgba(0,214,187,.17),transparent 64%)}

@media (min-width:760px){
  .mp{padding-top:24px}
  .mp-hero{padding:30px 28px 22px}
  .mp-ava{width:136px;height:136px}
  .mp-name{font-size:30px}
  .mp-actions{max-width:420px;margin-left:auto;margin-right:auto}
}
/* ПК: две колонки — карточка с фото слева (не уезжает при прокрутке),
   «О себе», игры и контакты справа; страница во всю ширину сайта */
@media (min-width:1000px){
  .mp{max-width:1120px;padding:28px 24px 120px}
  .mp-bar{margin-bottom:16px}
  .mp-body{display:grid;grid-template-columns:360px minmax(0,1fr);gap:18px;align-items:start}
  .mp-hero{position:sticky;top:92px;padding:34px 24px 24px}
  .mp-ava{width:156px;height:156px}
  .mp-name{font-size:28px}
  .mp-actions{max-width:none}
  .mp-info > .mp-card:first-child{margin-top:0}
  .mp-card{padding:20px 22px;border-radius:24px}
  .mp-bio{font-size:16px}
  .mp-games{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .mp-contacts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .mp-games > .mp-empty,.mp-contacts > .mp-empty{grid-column:1 / -1}
}
@media (max-width:360px){
  .mp{padding-left:12px;padding-right:12px}
  .mp-ava{width:108px;height:108px}
  .mp-name{font-size:23px}
  .mp-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (prefers-reduced-motion:reduce){
  .mp.is-loading *{animation:none !important}
}
