/* apps.css - page-specific styles only */

/* SECTION TITLE */
  .section-title { text-align: center; margin-bottom: 48px; }

/* =========================================================
     APPS HERO
     ========================================================= */
  .apps-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    padding-top: 160px;
    padding-bottom: 60px;
    text-align: center;
  }

.apps-hero h1.heading {
    font-size: clamp(2.6rem, 5.5vw, 4.6rem);
    font-weight: 800;
    margin: 0 auto 22px;
    max-width: 880px;
  }

.apps-hero h1 .accent { color: var(--teal); }

.apps-hero .excerpt {
    max-width: 680px;
    margin: 0 auto 32px;
  }

.apps-hero .excerpt p {
    font-size: 17px;
    color: var(--ink-soft);
  }

/* =========================================================
     DEVICE TABS — the big top-of-page picker
     Tabs are styled like sticky pills. Clicking one filters
     the apps grid to that device. We use scroll-snap on
     mobile so the row scrolls horizontally cleanly.
     ========================================================= */
  .device-tabs-wrap {
    position: sticky;
    top: 70px;
    z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    margin-bottom: 56px;
  }

.device-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 4px 0;
  }

.device-tabs::-webkit-scrollbar { display: none; }

.device-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-soft);
    white-space: nowrap;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    transition: color .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
    flex-shrink: 0;
  }

.device-tab i, .device-tab span { position: relative; z-index: 2; }

.device-tab::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--teal);
    transform: translateX(-101%);
    transition: transform .4s var(--ease);
    z-index: 1;
  }

.device-tab:hover { color: var(--white); border-color: var(--teal); }

.device-tab:hover::before { transform: translateX(0); }

.device-tab.leaving::before { transform: translateX(101%); }

.device-tab.resetting::before { transform: translateX(-101%); transition: none; }

.device-tab.is-active {
    background: var(--teal);
    color: var(--white);
    border-color: var(--teal);
  }

.device-tab.is-active::before { transform: translateX(0); background: var(--teal); }

.device-tab .tab-count {
    background: rgba(255,255,255,0.18);
    padding: 2px 8px;
    border-radius: 999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
  }

.device-tab.is-active .tab-count { background: var(--lime); color: var(--black); }

.device-tab:not(.is-active):hover .tab-count { background: rgba(255,255,255,0.18); color: var(--white); }

/* Device hint banner — shows after auto-detect */
  .device-detected {
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(191, 214, 63, 0.18);
    border: 1px solid rgba(191, 214, 63, 0.4);
    border-radius: 10px;
    font-size: 13px;
    color: var(--teal);
  }

.device-detected.show { display: inline-flex; }

.device-detected i { color: var(--teal); }

/* Search bar */
  .apps-search-row {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
  }

.apps-search {
    flex: 1;
    min-width: 240px;
    position: relative;
  }

.apps-search i {
    position: absolute;
    left: 16px; top: 50%;
    transform: translateY(-50%);
    color: var(--ink-mute);
  }

.apps-search input {
    width: 100%;
    padding: 14px 18px 14px 46px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 14px;
    font-family: inherit;
    font-size: 15px;
    color: var(--ink);
    transition: border-color .25s var(--ease), background .25s var(--ease);
  }

.apps-search input:focus {
    border-color: var(--teal);
    background: var(--white);
  }

.apps-result-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--ink-mute);
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

.apps-result-count strong { color: var(--teal); font-weight: 700; }

/* =========================================================
     APP CARDS
     Same lime-line sweep as the rest of the site.
     ========================================================= */
  .apps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
  }

.app-card {
    position: relative;
    padding: 28px 24px 24px;
    background: var(--bg-soft);
    border-radius: 18px;
    overflow: hidden;
    transition: transform .35s var(--ease), background .35s var(--ease), box-shadow .35s var(--ease);
    display: flex;
    flex-direction: column;
    animation: cardIn .55s var(--ease) forwards;
    opacity: 0;
    transform: translateY(18px);
  }

@keyframes cardIn { to { opacity: 1; transform: none; } }

.app-card.is-hidden {
    display: none;
  }

.app-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    background: var(--lime);
    transform: translateX(-101%);
    transition: transform .45s var(--ease);
  }

.app-card:hover {
    transform: translateY(-6px);
    background: var(--white);
    box-shadow: var(--shadow-soft);
  }

.app-card:hover::before { transform: translateX(0); }

.app-card.leaving::before { transform: translateX(101%); }

.app-card.resetting::before { transform: translateX(-101%); transition: none; }

/* "Recommended" pin */
  .app-card.is-featured {
    border: 1px solid var(--teal);
  }

.app-card.is-featured .app-card-pin {
    position: absolute;
    top: 14px; right: 14px;
    background: var(--teal);
    color: var(--white);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.16em;
    padding: 4px 9px;
    border-radius: 999px;
    font-weight: 700;
  }

.app-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
  }

.app-card-logo {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 1px solid var(--border);
    color: var(--teal);
    font-size: 26px;
    flex: 0 0 auto;
    transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
  }

.app-card-logo i { line-height: 1; }

.app-card:hover .app-card-logo {
    background: var(--teal);
    color: var(--lime);
    border-color: var(--teal);
  }

.app-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.25;
    margin-bottom: 2px;
    word-break: break-word;
  }

.app-card-platform {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    color: var(--teal);
    text-transform: uppercase;
    font-weight: 600;
  }

.app-card p {
    font-size: 13.5px;
    color: var(--ink-soft);
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
  }

/* Downloader code box — the killer feature for Fire TV */
  .downloader-code {
    background: var(--white);
    border: 1px dashed var(--border-strong);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: border-color .3s var(--ease), background .3s var(--ease);
  }

.app-card:hover .downloader-code {
    background: var(--bg-soft);
    border-color: var(--teal);
  }

.downloader-code-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.16em;
    color: var(--ink-mute);
    text-transform: uppercase;
    margin-bottom: 4px;
  }

.downloader-code-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
    font-weight: 700;
    color: var(--teal);
    letter-spacing: 0.04em;
    line-height: 1;
  }

.downloader-code-copy {
    background: var(--teal);
    color: var(--white);
    border: none;
    width: 38px; height: 38px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background .25s var(--ease), transform .25s var(--ease);
    flex: 0 0 auto;
  }

.downloader-code-copy:hover { background: var(--lime); color: var(--black); transform: scale(1.05); }

.downloader-code-copy.is-copied { background: var(--lime); color: var(--black); }

.downloader-code-copy.is-copied::after {
    content: "Copied!";
    position: absolute;
    margin-left: 50px;
    background: var(--ink);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    animation: copiedFloat 1.6s ease forwards;
  }

@keyframes copiedFloat {
    0% { opacity: 0; transform: translateY(0); }
    20% { opacity: 1; transform: translateY(-4px); }
    80% { opacity: 1; transform: translateY(-4px); }
    100% { opacity: 0; transform: translateY(-12px); }
  }

.app-card-meta {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--ink-mute);
    margin-bottom: 14px;
    flex-wrap: wrap;
  }

.app-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }

.app-card-meta span i { color: var(--teal); font-size: 11px; }

.app-card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
  }

.app-card-actions .btn {
    flex: 1;
    justify-content: center;
    padding: 11px 14px;
    font-size: 13px;
  }

/* Empty state */
  .apps-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--ink-mute);
  }

.apps-empty i { font-size: 36px; color: var(--ink-mute); margin-bottom: 12px; opacity: 0.4; }

.apps-empty p { font-size: 14px; }

/* =========================================================
     "How to install on Fire TV" callout — purpose-built
     because Fire TV is the one that genuinely needs explanation
     and where the Downloader codes shine.
     ========================================================= */
  .firetv-help {
    background: linear-gradient(160deg, rgba(191, 214, 63, 0.10), rgba(5, 68, 98, 0.06));
    border-radius: 22px;
    padding: 44px;
    margin-top: 70px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    border: 1px solid var(--border);
  }

.firetv-help h3 {
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    margin-bottom: 14px;
  }

.firetv-help p {
    font-size: 15px;
    color: var(--ink-soft);
    margin-bottom: 18px;
  }

.firetv-help ol {
    counter-reset: ol;
    padding: 0;
    list-style: none;
  }

.firetv-help ol li {
    position: relative;
    padding-left: 38px;
    margin-bottom: 14px;
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.55;
  }

.firetv-help ol li::before {
    counter-increment: ol;
    content: counter(ol);
    position: absolute;
    left: 0; top: 0;
    width: 26px; height: 26px;
    background: var(--teal);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
  }

.firetv-help ol li strong { color: var(--ink); }

.firetv-help-side {
    background: var(--white);
    border-radius: 18px;
    padding: 26px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
  }

.firetv-help-side h4 {
    font-size: 14px;
    color: var(--ink-mute);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 12px;
  }

.firetv-help-side .demo-code {
    background: var(--bg-soft);
    border: 1px dashed var(--border-strong);
    border-radius: 10px;
    padding: 14px 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px;
    font-weight: 700;
    color: var(--teal);
    text-align: center;
    letter-spacing: 0.06em;
    margin-bottom: 14px;
  }

.firetv-help-side small {
    font-size: 12px;
    color: var(--ink-mute);
    line-height: 1.5;
    display: block;
  }

/* RESPONSIVE */
  @media (max-width: 1024px) {
    .apps-grid { grid-template-columns: repeat(2, 1fr); }
    .firetv-help { grid-template-columns: 1fr; padding: 32px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  }

@media (max-width: 768px) {
    section { padding: 80px 0; }
    .apps-hero { padding-top: 130px; min-height: auto; }
    .nav-menu { display: none; }
    .burger { display: flex; }
    .apps-grid { grid-template-columns: 1fr; }
    .device-tabs-wrap { top: 60px; padding: 12px 0; margin-bottom: 36px; }
    .device-tab { font-size: 13px; padding: 9px 14px; }
    .footer-grid { grid-template-columns: 1fr; }
    .wa-float { bottom: 18px; right: 18px; width: 54px; height: 54px; font-size: 26px; }
  }
