/* Shared CtrlAltDefeat theme for the Tools hub and tool detail pages. */
:root{
  --cad-bg:#030405;
  --cad-panel:rgba(8,10,12,.92);
  --cad-panel-soft:rgba(10,17,23,.88);
  --cad-gold:#d6a94a;
  --cad-gold-bright:#ffd36a;
  --cad-gold-pale:#fff0b5;
  --cad-blue:#5db8ff;
  --cad-blue-bright:#9fdcff;
  --cad-text:#f4efe4;
  --cad-muted:#b8ad99;
  --cad-blue-line:rgba(93,184,255,.38);
  --cad-gold-line:rgba(214,169,74,.48);
}

html{background:var(--cad-bg)}

body{
  position:relative;
  overflow-x:hidden;
  background:
    radial-gradient(ellipse at 8% 13%,rgba(22,90,128,.24),transparent 38rem),
    radial-gradient(ellipse at 92% 12%,rgba(122,76,13,.17),transparent 40rem),
    radial-gradient(circle at 50% 115%,rgba(20,63,89,.14),transparent 40rem),
    linear-gradient(180deg,#060809 0%,#030405 58%,#020303 100%);
  color:var(--cad-text);
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  opacity:.42;
  background-image:
    radial-gradient(circle at 12% 24%,rgba(159,220,255,.5) 0 1px,transparent 1.8px),
    radial-gradient(circle at 84% 17%,rgba(255,211,106,.42) 0 1px,transparent 1.8px),
    radial-gradient(circle at 68% 72%,rgba(159,220,255,.28) 0 1px,transparent 1.7px),
    radial-gradient(circle at 27% 81%,rgba(255,211,106,.25) 0 1px,transparent 1.7px);
  background-size:31rem 29rem,37rem 33rem,43rem 39rem,47rem 41rem;
}

.shell{
  position:relative;
  z-index:1;
  width:min(1120px,calc(100% - 34px));
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:14px 18px;
  border:1px solid var(--cad-blue-line);
  border-radius:17px;
  background:
    linear-gradient(110deg,rgba(4,11,16,.96),rgba(9,8,5,.96)),
    rgba(5,6,7,.96);
  box-shadow:
    0 18px 48px rgba(0,0,0,.34),
    inset 0 0 22px rgba(93,184,255,.035),
    0 0 20px rgba(214,169,74,.055);
  position:sticky;
  top:12px;
  z-index:10;
  backdrop-filter:blur(14px);
}

.brand{
  flex:0 0 auto;
  color:var(--cad-gold-bright);
  font-family:Cinzel,serif;
  font-weight:900;
  letter-spacing:.07em;
  text-transform:uppercase;
  text-decoration:none;
  text-shadow:
    0 0 9px rgba(255,211,106,.34),
    0 0 22px rgba(214,169,74,.16);
  transition:color .2s ease,text-shadow .2s ease;
}

.brand:hover,
.brand:focus-visible{
  color:var(--cad-gold-pale);
  text-shadow:
    0 0 10px rgba(255,233,153,.65),
    0 0 28px rgba(214,169,74,.34);
}

.nav{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.nav a,
.button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:39px;
  padding:9px 14px;
  border:1px solid var(--cad-gold-line);
  border-radius:10px;
  background:
    linear-gradient(145deg,rgba(38,28,8,.72),rgba(7,17,23,.9));
  color:var(--cad-gold-bright);
  font-family:Inter,sans-serif;
  font-size:13px;
  font-weight:800;
  line-height:1.15;
  text-decoration:none;
  text-shadow:0 0 8px rgba(255,211,106,.20);
  box-shadow:
    inset 0 0 12px rgba(214,169,74,.035),
    0 0 0 1px rgba(93,184,255,.05);
  transition:
    color .2s ease,
    border-color .2s ease,
    box-shadow .2s ease,
    background .2s ease,
    transform .2s ease;
}

.nav a:hover,
.nav a:focus-visible,
.button:hover,
.button:focus-visible{
  color:var(--cad-gold-pale);
  border-color:var(--cad-gold-bright);
  background:
    linear-gradient(145deg,rgba(66,46,9,.84),rgba(7,23,32,.94));
  box-shadow:
    0 0 16px rgba(255,211,106,.19),
    0 0 26px rgba(93,184,255,.13),
    inset 0 0 16px rgba(255,211,106,.06);
  transform:translateY(-2px);
  outline:none;
}

.nav a[aria-current="page"]{
  color:#fff5cf;
  border-color:var(--cad-gold-bright);
  background:linear-gradient(145deg,rgba(70,47,6,.84),rgba(12,27,35,.92));
  box-shadow:
    0 0 14px rgba(255,211,106,.16),
    inset 0 0 14px rgba(255,211,106,.06);
}

.hero{
  position:relative;
  overflow:hidden;
  border:1px solid var(--cad-blue-line);
  border-radius:22px;
  background:
    linear-gradient(135deg,rgba(12,18,22,.95),rgba(10,8,5,.94)),
    var(--cad-panel);
  box-shadow:
    0 24px 62px rgba(0,0,0,.30),
    inset 0 0 42px rgba(93,184,255,.035),
    0 0 30px rgba(214,169,74,.04);
}

.hero::after{
  content:"";
  position:absolute;
  width:22rem;
  height:22rem;
  right:-11rem;
  top:-13rem;
  border-radius:50%;
  background:radial-gradient(circle,rgba(214,169,74,.12),transparent 67%);
  pointer-events:none;
}

.tools-index-page .hero{
  margin:26px 0 24px;
  padding:68px 30px 58px;
}

.tool-detail-page .hero{
  margin-top:24px;
}

.eyebrow{
  color:var(--cad-blue-bright);
  text-shadow:0 0 10px rgba(93,184,255,.22);
}

h1{
  color:var(--cad-gold-pale);
  text-shadow:
    0 0 12px rgba(255,211,106,.22),
    0 0 34px rgba(214,169,74,.12);
}

.card,
.section{
  position:relative;
  border:1px solid var(--cad-blue-line);
  background:
    linear-gradient(145deg,rgba(10,16,20,.94),rgba(9,8,6,.94));
  box-shadow:
    0 20px 55px rgba(0,0,0,.28),
    inset 0 0 30px rgba(93,184,255,.025);
}

.card{
  transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease;
}

.tool-preview{
  position:relative;
  width:100%;
  aspect-ratio:16 / 9;
  margin:18px 0 21px;
  padding:4px;
  overflow:hidden;
  border:1px solid var(--cad-blue-line);
  border-radius:14px;
  background:linear-gradient(135deg,rgba(214,169,74,.23),rgba(93,184,255,.17));
  box-shadow:
    0 14px 34px rgba(0,0,0,.34),
    0 0 16px rgba(93,184,255,.08),
    0 0 14px rgba(214,169,74,.07);
}

.tool-preview::after{
  content:"";
  position:absolute;
  inset:4px;
  z-index:1;
  pointer-events:none;
  border:1px solid rgba(255,211,106,.16);
  border-radius:9px;
  box-shadow:inset 0 0 18px rgba(0,0,0,.14);
}

.tool-preview img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:top center;
  border-radius:9px;
  background:#050607;
}

.card:hover .tool-preview{
  border-color:rgba(159,220,255,.58);
  box-shadow:
    0 16px 38px rgba(0,0,0,.38),
    0 0 20px rgba(93,184,255,.13),
    0 0 18px rgba(214,169,74,.10);
}

.card:hover{
  transform:translateY(-3px);
  border-color:rgba(159,220,255,.56);
  box-shadow:
    0 24px 60px rgba(0,0,0,.34),
    0 0 22px rgba(93,184,255,.08),
    0 0 20px rgba(214,169,74,.05);
}

.card h2,
.section h2{
  color:var(--cad-gold-bright);
  text-shadow:0 0 10px rgba(214,169,74,.12);
}

.card p,
.hero p,
.lead,
.section p,
.section li{
  color:var(--cad-muted);
}

.tag{
  border-color:var(--cad-gold-line);
  background:rgba(38,27,7,.36);
  color:var(--cad-gold-bright);
}

.button.primary,
.button.secondary{
  border-color:var(--cad-gold-line);
  color:var(--cad-gold-bright);
  background:linear-gradient(145deg,rgba(42,30,7,.8),rgba(7,18,24,.92));
}

.note{
  border-color:var(--cad-gold-line);
  background:linear-gradient(110deg,rgba(15,12,6,.72),rgba(5,13,18,.72));
  box-shadow:inset 0 0 22px rgba(214,169,74,.025);
  color:var(--cad-muted);
}

footer{
  color:#8f877a;
}

@media(max-width:760px){
  .shell{width:min(100% - 24px,1120px);padding-top:18px}
  .topbar{position:relative;top:0;align-items:flex-start;flex-direction:column;padding:15px}
  .brand{font-size:15px}
  .nav{justify-content:flex-start;width:100%;gap:8px}
  .nav a{min-height:36px;padding:8px 11px;font-size:12px}
  .tools-index-page .hero{padding:48px 20px 40px}
  .hero,.section,.card{border-radius:16px}
}

@media(max-width:430px){
  .nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .nav a{width:100%}
}

@media(prefers-reduced-motion:reduce){
  .brand,.nav a,.button,.card{transition:none}
  .nav a:hover,.nav a:focus-visible,.button:hover,.button:focus-visible,.card:hover{transform:none}
}


/* Homepage music and referral controls */
.tools-index-page,
.tool-detail-page{
  --gold-bright:var(--cad-gold-bright);
  --text-main:var(--cad-text);
  --blue-bright:var(--cad-blue-bright);
}

.top-action-stack {
      position: fixed;
      top: 14px;
      right: 14px;
      z-index: 120;
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 6px;
      width: max-content;
      max-width: calc(100vw - 28px);
    }

    .music-control {
      position: relative;
      z-index: 2;
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 7px;
      border: 1px solid rgba(93, 184, 255, 0.32);
      border-radius: 999px;
      background:
        linear-gradient(145deg, rgba(8, 12, 18, 0.88), rgba(20, 20, 20, 0.78));
      box-shadow:
        0 10px 26px rgba(0, 0, 0, 0.55),
        0 0 18px rgba(93, 184, 255, 0.12),
        0 0 16px rgba(214, 169, 74, 0.08);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }

    .music-button,
    .music-mute-button {
      border: 1px solid rgba(255, 211, 106, 0.34);
      border-radius: 999px;
      background:
        linear-gradient(145deg, rgba(214, 169, 74, 0.22), rgba(93, 184, 255, 0.10));
      color: var(--text-main);
      font-family: 'Inter', sans-serif;
      font-weight: 700;
      font-size: 0.68rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      cursor: pointer;
      transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        background 0.22s ease,
        color 0.22s ease;
    }

    .music-button {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 7px 10px;
    }

    .music-mute-button {
      padding: 7px 9px;
      opacity: 0.82;
    }

    .music-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      color: #050505;
      background: var(--gold-bright);
      box-shadow:
        0 0 10px rgba(255, 211, 106, 0.34),
        0 0 12px rgba(93, 184, 255, 0.12);
    }

    .music-button:hover,
    .music-mute-button:hover {
      transform: translateY(-2px);
      border-color: rgba(159, 220, 255, 0.58);
      box-shadow:
        0 8px 18px rgba(0, 0, 0, 0.48),
        0 0 18px rgba(93, 184, 255, 0.22),
        0 0 14px rgba(214, 169, 74, 0.12);
    }

    .music-control.is-playing {
      border-color: rgba(159, 220, 255, 0.58);
      box-shadow:
        0 10px 26px rgba(0, 0, 0, 0.55),
        0 0 24px rgba(93, 184, 255, 0.24),
        0 0 18px rgba(214, 169, 74, 0.10);
    }

    .music-control.is-playing .music-icon {
      animation: musicPulse 1.8s ease-in-out infinite;
    }

    @keyframes musicPulse {
      0%, 100% {
        box-shadow:
          0 0 10px rgba(255, 211, 106, 0.28),
          0 0 12px rgba(93, 184, 255, 0.12);
      }
      50% {
        box-shadow:
          0 0 16px rgba(255, 211, 106, 0.42),
          0 0 24px rgba(93, 184, 255, 0.28);
      }
    }


    .referral-float {
      position: relative;
      z-index: 2;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      width: 100%;
      min-height: 30px;
      padding: 5px 9px;
      border: 1px solid rgba(255, 211, 106, 0.50);
      border-radius: 999px;
      overflow: hidden;
      background:
        radial-gradient(circle at 22% 50%, rgba(255, 211, 106, 0.22), transparent 42%),
        linear-gradient(145deg, rgba(8, 12, 18, 0.92), rgba(20, 20, 20, 0.82));
      color: var(--text-main);
      font-weight: 800;
      font-size: 0.60rem;
      letter-spacing: 0.055em;
      text-transform: uppercase;
      text-decoration: none;
      box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.50),
        0 0 14px rgba(93, 184, 255, 0.12),
        0 0 16px rgba(255, 211, 106, 0.10),
        inset 0 1px 1px rgba(255, 238, 160, 0.16);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
      transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        color 0.22s ease;
      animation: referralFloatPulse 2.8s ease-in-out infinite alternate;
    }

    .referral-float::before {
      content: "";
      position: absolute;
      top: -55%;
      bottom: -55%;
      left: -65%;
      width: 46%;
      pointer-events: none;
      background:
        linear-gradient(
          110deg,
          rgba(93, 184, 255, 0) 0%,
          rgba(93, 184, 255, 0.10) 25%,
          rgba(232, 247, 255, 0.48) 50%,
          rgba(255, 211, 106, 0.20) 72%,
          rgba(93, 184, 255, 0) 100%
        );
      filter: blur(8px) drop-shadow(0 0 10px rgba(93, 184, 255, 0.22));
      transform: translateX(0) skewX(-12deg);
      opacity: 0;
      animation: referralLightSweep 4.6s ease-in-out infinite;
    }

    .referral-icon {
      position: relative;
      z-index: 2;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 23px;
      height: 23px;
      border-radius: 999px;
      color: #050505;
      background: linear-gradient(to bottom, #fff1a8, var(--gold-bright));
      font-size: 0.48rem;
      font-weight: 900;
      letter-spacing: 0.02em;
      box-shadow:
        0 0 12px rgba(255, 211, 106, 0.36),
        0 0 14px rgba(93, 184, 255, 0.14);
      animation: referralIconPulse 2.2s ease-in-out infinite;
    }

    .referral-text {
      position: relative;
      z-index: 2;
      color: rgba(244, 239, 228, 0.96);
      text-shadow:
        0 0 8px rgba(255, 211, 106, 0.18),
        0 0 10px rgba(93, 184, 255, 0.14);
      white-space: nowrap;
    }

    .referral-float:hover {
      transform: translateY(-2px);
      color: #fff;
      border-color: rgba(159, 220, 255, 0.68);
      box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.62),
        0 0 24px rgba(93, 184, 255, 0.26),
        0 0 26px rgba(255, 211, 106, 0.18),
        inset 0 1px 1px rgba(255, 238, 160, 0.22);
    }

    .referral-float:focus-visible {
      outline: 2px solid var(--blue-bright);
      outline-offset: 4px;
    }

    @keyframes referralFloatPulse {
      0% {
        border-color: rgba(255, 211, 106, 0.48);
        box-shadow:
          0 10px 26px rgba(0, 0, 0, 0.55),
          0 0 16px rgba(93, 184, 255, 0.12),
          0 0 16px rgba(255, 211, 106, 0.10),
          inset 0 1px 1px rgba(255, 238, 160, 0.16);
      }

      100% {
        border-color: rgba(159, 220, 255, 0.58);
        box-shadow:
          0 10px 26px rgba(0, 0, 0, 0.55),
          0 0 24px rgba(93, 184, 255, 0.20),
          0 0 22px rgba(255, 211, 106, 0.16),
          inset 0 1px 1px rgba(255, 238, 160, 0.20);
      }
    }

    @keyframes referralLightSweep {
      0%, 28%, 100% {
        opacity: 0;
        transform: translateX(0) skewX(-12deg);
      }

      42% {
        opacity: 0.58;
      }

      64% {
        opacity: 0.28;
        transform: translateX(430%) skewX(-12deg);
      }
    }

    @keyframes referralIconPulse {
      0%, 100% {
        transform: scale(1);
        filter: brightness(1);
      }

      50% {
        transform: scale(1.05);
        filter: brightness(1.12);
      }
    }

    .youtube-music-player {
      position: fixed;
      width: 1px;
      height: 1px;
      left: -9999px;
      top: -9999px;
      opacity: 0;
      pointer-events: none;
    }

@media (max-width: 700px) {
      .floating-assets {
        display: none;
      }

      .top-action-stack {
        top: 10px;
        right: 10px;
        gap: 5px;
        max-width: calc(100vw - 20px);
      }

      .music-control {
        gap: 6px;
        padding: 6px;
      }

      .referral-float {
        min-height: 28px;
        padding: 4px 8px;
        font-size: 0.56rem;
        letter-spacing: 0.04em;
      }

      .referral-icon {
        width: 20px;
        height: 20px;
        font-size: 0.43rem;
      }

      .referral-float {
        min-height: 34px;
        padding: 6px 10px;
        gap: 7px;
        font-size: 0.66rem;
        letter-spacing: 0.055em;
      }

      .referral-icon {
        width: 27px;
        height: 27px;
        font-size: 0.54rem;
      }

      .music-button,
      .music-mute-button {
        font-size: 0.68rem;
        padding: 7px 9px;
      }

      .music-text {
        display: none;
      }
    }

@media (prefers-reduced-motion: reduce) {
  .music-control.is-playing .music-icon,
  .referral-float,
  .referral-float::before,
  .referral-icon {
    animation: none !important;
  }
}

  /* Compact shared music and referral dock */
  .top-action-stack {
    width: 216px;
    max-width: calc(100vw - 28px);
    gap: 4px;
    padding: 5px;
    border: 1px solid rgba(93, 184, 255, 0.30);
    border-radius: 16px;
    background:
      linear-gradient(145deg, rgba(7, 11, 16, 0.94), rgba(18, 16, 11, 0.92));
    box-shadow:
      0 10px 26px rgba(0, 0, 0, 0.54),
      0 0 16px rgba(93, 184, 255, 0.10),
      0 0 14px rgba(214, 169, 74, 0.08);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
  }

  .music-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
    gap: 4px;
    padding: 0;
    border: 0;
    border-radius: 11px;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .music-button,
  .music-mute-button {
    min-height: 32px;
    border-radius: 10px;
    box-shadow: none;
  }

  .music-button {
    justify-content: flex-start;
    padding: 6px 9px;
  }

  .music-mute-button {
    padding: 6px 8px;
    opacity: 0.70;
  }

  .music-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    font-size: 0.72rem;
  }

  .music-button:hover,
  .music-mute-button:hover {
    transform: none;
    border-color: rgba(159, 220, 255, 0.48);
    background: linear-gradient(145deg, rgba(214, 169, 74, 0.18), rgba(93, 184, 255, 0.09));
    box-shadow: 0 0 12px rgba(93, 184, 255, 0.13);
  }

  .music-control.is-playing {
    border-color: transparent;
    box-shadow: none;
  }

  .referral-float {
    width: 100%;
    min-height: 31px;
    margin: 0;
    padding: 4px 8px;
    gap: 6px;
    border-color: rgba(255, 211, 106, 0.38);
    border-radius: 10px;
    font-size: 0.57rem;
    background:
      radial-gradient(circle at 18% 50%, rgba(255, 211, 106, 0.16), transparent 36%),
      linear-gradient(145deg, rgba(29, 22, 9, 0.70), rgba(8, 15, 19, 0.82));
    box-shadow:
      inset 0 1px 0 rgba(255, 238, 160, 0.09),
      0 0 10px rgba(214, 169, 74, 0.06);
    animation: none;
  }

  .referral-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    font-size: 0.46rem;
    animation: none;
  }

  .referral-float:hover {
    transform: none;
    border-color: rgba(159, 220, 255, 0.58);
    box-shadow:
      inset 0 1px 0 rgba(255, 238, 160, 0.12),
      0 0 14px rgba(93, 184, 255, 0.15),
      0 0 12px rgba(255, 211, 106, 0.09);
  }

  .top-action-stack:hover {
    border-color: rgba(159, 220, 255, 0.42);
  }

  @media (max-width: 700px) {
    .top-action-stack {
      position: relative;
      top: auto;
      right: auto;
      width: 166px;
      max-width: calc(100vw - 16px);
      margin: 8px 8px 0 auto;
      gap: 3px;
      padding: 4px;
      border-radius: 13px;
    }

    .music-control {
      grid-template-columns: 36px minmax(0, 1fr);
      gap: 3px;
      padding: 0;
    }

    .music-button,
    .music-mute-button {
      min-height: 30px;
      padding: 5px 7px;
      font-size: 0.58rem;
    }

    .music-button {
      justify-content: center;
    }

    .music-text {
      display: none;
    }

    .music-icon {
      width: 19px;
      height: 19px;
      flex-basis: 19px;
      font-size: 0.67rem;
    }

    .referral-float {
      min-height: 29px;
      padding: 3px 6px;
      gap: 5px;
      font-size: 0.53rem;
      letter-spacing: 0.035em;
    }

    .referral-icon {
      width: 21px;
      height: 21px;
      flex-basis: 21px;
      font-size: 0.43rem;
    }
  }

  @media (max-width: 360px) {
    .top-action-stack {
      width: 158px;
      margin-top: 6px;
    }

    .referral-float {
      font-size: 0.50rem;
    }
  }

