:root {
      --profileBackground: #000;
      --button-style-background: #000000;
      --button-style-text: #ffffff;
      --button-style-contrast-color: #ffffff;
      --header-text-color: #ffffff;
      --profileDescriptionText: #ffffff;
      --profileTitleText: #fff;
      --bodyText: #fff;
      --button-style-shadow-color: #ffffff;
      --bannerBackground: #000000;
      --bannerText: #FFF;
      --background-contrast-color: #ffffff;
      --backdrop-contrast-color: #ffffff;
      --defaultAvatarBackground: #F5F6F8;
      --defaultAvatarText: #000000;
      --socialLinkFill: #fff;
      --linkShadow: #fff;

      --bg: var(--profileBackground);
      --text: var(--bodyText);
      --muted: var(--profileDescriptionText);
      --button-bg: var(--button-style-background);
      --button-hover: #121212;
      --button-text: var(--button-style-text);
      --button-radius: 8px;
      --button-shadow: 0.3px 0.5px 0.7px hsl(0deg 0% 6.7% / 0.02), 0.9px 1.8px 2.5px -0.6px hsl(0deg 0% 6.7% / 0.03), 2px 4px 5.5px -1.2px hsl(0deg 0% 6.7% / 0.03);
      --max-width: 580px;
    }

    * { box-sizing: border-box; }

    html, body {
      margin: 0;
      background: radial-gradient(circle at center, #D59A18 0%, #191919 68%);
      color: var(--text);
      font-family: "Segoe UI", Arial, sans-serif;
    }

    body .topbar-wrap { position: sticky; top: 14px; z-index: 10; width: min(1260px, calc(100% - 96px)) !important; margin: 14px auto 0; }
    .topbar { display: flex; justify-content: space-between; gap: 8px; }
    .top-left, .top-right { display: flex; gap: 8px; }

    .pill, .circle {
      border: 1px solid rgba(255, 255, 255, 0.4);
      background: rgba(255, 255, 255, 0.72);
      color: #000;
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
      font-weight: 600;
      cursor: pointer;
    }

    .circle { width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; text-decoration: none; }
    .pill { border-radius: 999px; padding: 0 14px; min-height: 40px; display: inline-flex; align-items: center; text-decoration: none; font-size: 14px; }

    body .layout {
      width: min(1260px, calc(100% - 96px)) !important;
      margin: 0 auto;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 300px;
      gap: 18px;
      align-items: start;
    }
    .page { min-height: calc(100vh - 54px); width: 100%; max-width: none; margin: 0; padding: 24px 0 24px; position: relative; }
    .profile { position: relative; z-index: 2; margin-bottom: 20px; padding-top: 0; text-align: left; }
    .avatar { width: 96px; height: 96px; border-radius: 999px; object-fit: cover; display: block; margin: 0 auto 14px; }
    h1 { margin: 0; font-size: 1.5rem; font-weight: 700; color: var(--header-text-color); }
    .bio { margin: 6px 0 0; max-width: 680px; color: var(--muted); font-size: 1rem; line-height: 1.35; }

    .hero-panel {
      display: grid;
      grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
      border: 1px solid #334663;
      border-radius: 16px;
      padding: 0 0 20px;
      background: linear-gradient(180deg, rgba(17, 26, 43, 0.86), rgba(15, 22, 35, 0.96));
      box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
      margin-bottom: 18px;
      overflow: hidden;
    }

    .profile-cover {
      grid-column: 1 / -1;
      position: relative;
      min-height: 190px;
      background:
        linear-gradient(180deg, rgba(8, 12, 18, 0.1), rgba(8, 12, 18, 0.55)),
        url('/assets/img/qwertyhouse-header-site.png') center / cover no-repeat;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .profile-cover .avatar {
      position: absolute;
      left: 18px;
      bottom: -38px;
      width: 104px;
      height: 104px;
      margin: 0;
      border: 4px solid #0f1420;
      box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
    }

    .profile-body {
      padding: 48px 18px 0;
    }

    .profile-handle {
      margin-top: 6px;
      color: #9fb4d6;
      font-size: 0.95rem;
    }

    .profile-stats {
      display: flex;
      flex-wrap: wrap;
      gap: 14px;
      margin-top: 14px;
      padding-top: 14px;
      border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .profile-stat {
      display: inline-flex;
      gap: 6px;
      align-items: center;
      color: #bfd0ea;
      font-size: 0.9rem;
    }

    .profile-stat strong {
      color: #f8f5ea;
    }

    .profile-tabs {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      justify-content: flex-start;
      margin-top: 16px;
    }

    .profile-tab {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 10px 14px;
      border-radius: 999px;
      border: 1px solid #334663;
      background: rgba(16, 24, 38, 0.65);
      color: #d7e9ff;
      text-decoration: none;
      font-size: 0.88rem;
      font-weight: 600;
    }

    .hero-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      justify-content: flex-start;
      margin-top: 16px;
    }

    .hero-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 42px;
      padding: 10px 14px;
      border-radius: 10px;
      text-decoration: none;
      font-size: 14px;
      font-weight: 600;
      border: 1px solid #446086;
      color: #d7e9ff;
      background: #15243a;
    }

    .hero-btn:hover,
    .hero-btn:focus-visible {
      background: #20385b;
      border-color: #6b90c2;
      outline: none;
    }

    .hero-btn-primary {
      color: #10131a;
      background: linear-gradient(135deg, #f0d494, #d9a54c);
      border-color: rgba(240, 212, 148, 0.7);
    }

    .hero-btn-primary:hover,
    .hero-btn-primary:focus-visible {
      background: linear-gradient(135deg, #f5dfab, #e0b45f);
      border-color: rgba(245, 223, 171, 0.9);
    }

    .quick-grid {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 12px;
      margin-top: 20px;
    }

    .twitch-links-embed {
      margin: 0;
      overflow: hidden;
      border: 1px solid rgba(53, 218, 247, .28);
      border-radius: 16px;
      background: #080d14;
    }

    .twitch-links-embed iframe {
      display: block;
      width: 100%;
      min-height: 420px;
      border: 0;
    }

    .hero-panel > .profile-body,
    .hero-panel > .twitch-links-embed {
      grid-row: 2;
    }

    .hero-panel > .profile-body {
      grid-column: 1;
    }

    .hero-panel > .twitch-links-embed {
      grid-column: 2;
      align-self: start;
    }

    @media (max-width: 900px) {
      .hero-panel {
        grid-template-columns: 1fr;
      }

      .hero-panel > .profile-body,
      .hero-panel > .twitch-links-embed {
        grid-column: 1;
      }

      .hero-panel > .twitch-links-embed {
        grid-row: 3;
        margin-top: 20px;
      }
    }

    .quick-card {
      display: block;
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.035);
      color: inherit;
      padding: 14px;
      text-align: left;
      text-decoration: none;
      transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    }

    .quick-card:hover,
    .quick-card:focus-visible {
      border-color: #6b90c2;
      background: rgba(255, 255, 255, 0.07);
      outline: none;
      transform: translateY(-1px);
    }

    .quick-card strong {
      display: block;
      margin-bottom: 6px;
      color: #f8f5ea;
      font-size: 15px;
    }

    .quick-card span {
      color: #bfd0ea;
      font-size: 13px;
      line-height: 1.45;
    }

    .links { display: grid; gap: 14px; margin-top: 24px; }
    .link {
      display: grid;
      grid-template-columns: 48px 1fr 24px;
      align-items: center;
      gap: 10px;
      width: 100%;
      min-height: 64px;
      padding: 8px 12px 8px 8px;
      border-radius: var(--button-radius);
      background: var(--button-bg);
      color: var(--button-text);
      text-decoration: none;
      box-shadow: var(--button-shadow);
      border: 1px solid rgba(255, 255, 255, 0.08);
      transition: transform 0.2s ease, background-color 0.2s ease;
    }
    .link:hover, .link:focus-visible { background: var(--button-hover); transform: translateY(-1px); outline: none; }

    .icon { width: 48px; height: 48px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); display: grid; place-items: center; color: #fff; }
    .icon svg, .circle svg { width: 22px; height: 22px; display: block; fill: currentColor; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .label { text-align: center; font-size: 16px; font-weight: 500; line-height: 1.2; }
    .more { opacity: 0.6; font-size: 16px; text-align: right; letter-spacing: 1px; }

    .embed-block { margin-top: 6px; border-radius: 10px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.12); background: #000; box-shadow: var(--button-shadow); }
    .embed-title { margin: 0; padding: 10px 12px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
    .embed-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; background: #000; }

    .subhead { margin: 28px 0 12px; text-align: center; color: var(--muted); font-size: 14px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }
    .stroke-only { fill: none !important; }

    aside {
      position: sticky;
      top: 16px;
      border: 1px solid #334663;
      border-radius: 14px;
      background: linear-gradient(180deg, rgba(22, 33, 53, 0.95), rgba(14, 22, 36, 0.95));
      padding: 14px;
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
      margin-top: 24px;
    }

    .nav-title {
      margin: 2px 0 8px;
      font-size: 0.84rem;
      letter-spacing: 0.09em;
      color: #f0d494;
      text-transform: uppercase;
    }

    .nav-list {
      list-style: none;
      margin: 0 0 14px;
      padding: 0;
      display: grid;
      gap: 8px;
    }

    .nav-list a {
      display: block;
      border-radius: 8px;
      border: 1px solid #314663;
      padding: 8px 10px;
      color: #d9e7fb;
      text-decoration: none;
      background: #17263e;
      font-size: 0.92rem;
    }

    .nav-list a:hover,
    .nav-list a:focus-visible {
      border-color: #5c7cae;
      background: #203457;
    }

    .sidebar-playlist {
      margin-top: 12px;
      border-radius: 10px;
      border: 1px solid #38506f;
      background: #132235;
      padding: 10px;
    }

    .sidebar-playlist p {
      margin: 0 0 10px;
      color: #bcd2f0;
      font-size: 0.83rem;
      line-height: 1.35;
      text-align: left;
    }

    .sidebar-playlist .sidebar-embed {
      aspect-ratio: 16 / 9;
      background: #0c1320;
      border: 1px solid #314663;
      border-radius: 8px;
      overflow: hidden;
      margin-bottom: 10px;
    }

    .sidebar-playlist .sidebar-embed iframe {
      width: 100%;
      height: 100%;
      border: 0;
    }

    .sidebar-playlist .nav-list {
      margin-bottom: 0;
    }
  
    /* Frontpage theme override */
    :root {
      --profileBackground: #0f1420;
      --button-style-background: #15243a;
      --button-style-text: #f2f1eb;
      --button-style-contrast-color: #f2f1eb;
      --header-text-color: #f8f5ea;
      --profileDescriptionText: #c7c1af;
      --profileTitleText: #f8f5ea;
      --bodyText: #f2f1eb;
      --button-style-shadow-color: #0b111a;
      --bannerBackground: #141f33;
      --bannerText: #f2f1eb;
      --background-contrast-color: #334663;
      --backdrop-contrast-color: #334663;
      --socialLinkFill: #d7e9ff;
      --linkShadow: rgba(0, 0, 0, 0.35);
    }
    html, body {
      background:
        radial-gradient(1000px 500px at 20% -10%, #2e405f 0%, transparent 60%),
        radial-gradient(900px 480px at 90% 0%, #2a2b44 0%, transparent 55%),
        linear-gradient(170deg, #1a2333 0%, #0f1420 56%, #0b111a 100%) !important;
      color: #f2f1eb;
    }
    .pill, .circle {
      border-color: #446086;
      background: rgba(21, 36, 58, 0.88);
      color: #d7e9ff;
      box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
    }
    .link {
      background: #15243a;
      color: #f2f1eb;
      border-color: #334663;
      box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    }
    .link:hover, .link:focus-visible { background: #20385b; }
    .icon { background: rgba(190, 225, 255, 0.12); color: #d7e9ff; }
    h1 { color: #f8f5ea !important; }
    .bio { color: #c7c1af !important; }

    @media (max-width: 640px) {
      .quick-grid {
        grid-template-columns: 1fr;
      }

      .hero-actions {
        flex-direction: column;
      }

      .hero-btn {
        width: 100%;
      }

      .profile-cover {
        min-height: 150px;
      }

      .profile-cover .avatar {
        width: 88px;
        height: 88px;
        bottom: -24px;
      }

      .profile-body {
        padding-top: 34px;
      }
    }

    @media (max-width: 1020px) {
      body .topbar-wrap,
      body .layout {
        width: min(1500px, calc(100% - 28px)) !important;
        grid-template-columns: 1fr;
      }

      .page {
        max-width: 100%;
      }

      aside {
        position: static;
        order: -1;
        margin-top: 14px;
      }
    }

.svg-defs { position: absolute; }
