/* IVWORK Game Pages Beauty v1.0
 * Visual polish for /games/ index and /games/{slug}/ hub pages. */

/* ---------- Index page filter ---------- */
.ivwork-fc .ivwork-fc-language-control{display:flex;align-items:center;gap:7px}
.ivwork-fc .ivwork-fc-language-control .ivwork-fc-ui-language-label{color:#96a3b7;font-size:11px}
.ivwork-fc .ivwork-fc-ui-language{min-width:90px;padding:7px 9px;border:1px solid rgba(186,203,230,.15);border-radius:8px;background:#0d131d;color:#f5f7fb;font:inherit;font-size:11px}
.ivwork-fc .ivwork-fc-language-apply{padding:7px 10px;border:1px solid rgba(141,124,255,.4);border-radius:8px;background:#201b3e;color:#eeeaff;font:inherit;font-size:11px;font-weight:700;cursor:pointer}
.ivwork-fc .ivwork-fc-category-navigation{margin:10px 0 28px}
.ivwork-fc .ivwork-fc-category-navigation .ivwork-fc-section-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.ivwork-fc .ivwork-fc-category-navigation h2{margin:0;color:#fff;font-size:18px}
.ivwork-fc .ivwork-fc-category-navigation .ivwork-fc-eyebrow{margin:0 0 4px;color:#f59e0b;font-size:9px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}
.ivwork-fc .ivwork-fc-category-navigation .ivwork-fc-section-heading>a{color:#a99dff;font-size:11px;text-decoration:none}
.ivwork-fc .ivwork-fc-category-nav{display:flex;gap:9px;overflow-x:auto;padding:4px 1px 9px;scrollbar-width:thin}
.ivwork-fc .ivwork-fc-category-nav-card{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:3px 9px;min-width:140px;padding:10px 12px;border:1px solid rgba(186,203,230,.12);border-radius:10px;background:#111722;color:#e9edf5;text-decoration:none;font-size:12px;font-weight:700}
.ivwork-fc .ivwork-fc-category-nav-card>span:first-child{grid-row:span 2;width:9px;height:28px;border-radius:5px;background:linear-gradient(180deg,#f59e0b,#55d8d2)}
.ivwork-fc .ivwork-fc-category-nav-card small{color:#77849a;font-size:9px;font-weight:500}
.ivwork-gp-footer{margin-top:34px;padding:24px clamp(16px,3vw,36px);border-top:1px solid rgba(186,203,230,.12);color:#5a6478;text-align:center}
.ivwork-gp-footer-brand{display:block;width:150px;height:59px;overflow:hidden;margin:0 auto 14px}
.ivwork-gp-footer-brand img{display:block;width:100%;height:100%;object-fit:contain}
.ivwork-gp-footer nav{display:flex;justify-content:center;gap:10px 20px;flex-wrap:wrap}
.ivwork-gp-footer nav a{color:#96a3b7;text-decoration:none;font-size:12px;line-height:1.5;word-break:keep-all}
.ivwork-gp-footer nav a:hover{color:#fff}
.ivwork-gp-footer p{margin:14px 0 0;text-align:center;font-size:11px}
@media(max-width:560px){.ivwork-fc-header .ivwork-fc-language-control{width:100%;justify-content:flex-end}.ivwork-fc .ivwork-fc-category-nav-card{min-width:125px}}

.ivwork-fc #ivwork-game-filter:focus {
    border-color: rgba(141,124,255,.55) !important;
    box-shadow: 0 0 0 3px rgba(141,124,255,.14) !important;
    outline: none !important;
}

.ivwork-fc #ivwork-game-table tbody tr {
    transition: background .14s ease, transform .14s ease;
    cursor: pointer;
}

.ivwork-fc #ivwork-game-table tbody tr:active {
    transform: scale(.995);
}

/* ---------- Hub page stream cards ---------- */
.ivwork-fc .ivwork-gp-card {
    box-shadow: 0 8px 24px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.04) !important;
}

.ivwork-fc .ivwork-gp-card:hover {
    box-shadow: 0 16px 40px rgba(0,0,0,.3), 0 0 0 1px rgba(141,124,255,.2) !important;
}

.ivwork-fc .ivwork-gp-card img {
    transition: transform .35s ease;
}

.ivwork-fc .ivwork-gp-card:hover img {
    transform: scale(1.05);
}

/* ---------- Rank badge glow for #1 ---------- */
.ivwork-fc span[style*="Steam #1"] {
    animation: ivwork-badge-glow 2.4s ease-in-out infinite;
}

@keyframes ivwork-badge-glow {
    0%, 100% { opacity:1; }
    50% { opacity:.72; }
}

/* ---------- CTA button ---------- */
.ivwork-fc a[style*="Watch Top Stream Now"] {
    transition: transform .18s ease, box-shadow .18s ease !important;
}

.ivwork-fc a[style*="Watch Top Stream Now"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(141,124,255,.5) !important;
}

/* ---------- Leaderboard rows ---------- */
.ivwork-fc aside a {
    transition: background .12s ease;
}

.ivwork-fc aside a:hover {
    background: rgba(141,124,255,.09) !important;
}

/* ---------- Trend bars ---------- */
.ivwork-fc div[title$="players"] {
    transition: opacity .15s ease, transform .15s ease;
}

/* ---------- Hourly dual-series trend ---------- */
.ivwork-fc .ivwork-trend-controls button {
    padding: 6px 9px;
    border: 1px solid rgba(186,203,230,.16);
    border-radius: 7px;
    background: #0d131d;
    color: #b7c3d7;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}
.ivwork-fc .ivwork-trend-controls button[aria-pressed="true"] {
    border-color: rgba(141,124,255,.6);
    background: rgba(141,124,255,.16);
    color: #fff;
}
.ivwork-fc #ivwork-game-trend circle { cursor: crosshair; }

.ivwork-fc div[title$="players"]:hover {
    opacity: 1 !important;
    transform: scaleY(1.06);
}

/* ---------- LIVE badge pulse ---------- */
.ivwork-fc span[style*="LIVE"] {
    animation: ivwork-live-pulse 1.8s ease-in-out infinite;
}

@keyframes ivwork-live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .72; }
}

/* ---------- Filters ---------- */
.ivwork-fc select:focus {
    border-color: rgba(141,124,255,.55) !important;
    box-shadow: 0 0 0 3px rgba(141,124,255,.14) !important;
    outline: none !important;
}

/* ---------- Breadcrumb links ---------- */
.ivwork-fc nav a:hover {
    color: #c5b8ff !important;
    text-decoration: underline !important;
}

/* ---------- Mobile refinements ---------- */
@media (max-width: 520px) {
    .ivwork-fc .ivwork-gp-card {
        border-radius: 12px !important;
    }
    .ivwork-fc #ivwork-game-table thead th,
    .ivwork-fc #ivwork-game-table tbody td {
        padding: 9px 10px !important;
        font-size: 12px !important;
    }
}

/* ---------- Scrollbar ---------- */
.ivwork-fc ::-webkit-scrollbar { width: 6px; height: 6px; }
.ivwork-fc ::-webkit-scrollbar-thumb { background: rgba(141,124,255,.25); border-radius: 3px; }
.ivwork-fc ::-webkit-scrollbar-track { background: transparent; }
/* ---------- P0-2 Mobile readability (2026-10-24) ---------- */
/* Targets: mobile visible text >= 14px, secondary/meta >= 12px.
   Templates emit inline font-size, so !important is required to win. */
@media (max-width: 768px) {
    /* Covers phones and the 521-768px tablet band (raised from 520px).
       Meta / badge / label level: lift 8-11px to 12px */
    .ivwork-fc [style*="font-size:8px"],
    .ivwork-fc [style*="font-size:9px"],
    .ivwork-fc [style*="font-size:10px"],
    .ivwork-fc [style*="font-size:11px"],
    .ivwork-fc .ivwork-fc-eyebrow,
    .ivwork-fc .ivwork-fc-category-nav-card small,
    .ivwork-fc .ivwork-fc-language-control .ivwork-fc-ui-language-label,
    .ivwork-fc .ivwork-fc-category-navigation .ivwork-fc-section-heading > a,
    .ivwork-fc .ivwork-trend-controls button,
    .ivwork-gp-footer p {
        font-size: 12px !important;
        line-height: 1.5 !important;
    }
    /* Body copy, links, data and form controls: lift 12-13px to 14px */
    .ivwork-fc [style*="font-size:12px"],
    .ivwork-fc [style*="font-size:13px"],
    .ivwork-fc .ivwork-fc-category-nav-card,
    .ivwork-fc .ivwork-fc-ui-language,
    .ivwork-fc .ivwork-fc-language-apply,
    .ivwork-gp-footer nav a,
    .ivwork-fc select,
    .ivwork-fc input,
    .ivwork-fc button {
        font-size: 14px !important;
        line-height: 1.5 !important;
    }
    /* Data tables: readable cells, supersedes the earlier 12px mobile rule */
    .ivwork-fc #ivwork-game-table thead th,
    .ivwork-fc #ivwork-game-table tbody td {
        font-size: 14px !important;
        padding: 10px 11px !important;
    }
    /* Numeric columns: tabular figures stop jitter when data refreshes */
    .ivwork-fc table,
    .ivwork-fc td,
    .ivwork-fc th,
    .ivwork-fc [style*="text-align:right"] {
        font-variant-numeric: tabular-nums;
    }
}
/* ---------- P2-4 Empty state + skeleton for game pages (2026-10-24) ---------- */
/* Game pages do not load ivwork-home.bundle.css, so the equivalents of
   .ivwork-fc-empty / .skeleton are declared here against the class this plugin
   actually renders (.ivwork-gp-empty). */
.ivwork-fc .ivwork-gp-empty {
    margin: 0 0 8px;
    padding: 22px 20px !important;
    border: 1px dashed rgba(186, 203, 230, .18);
    border-radius: 14px;
    background: rgba(17, 23, 34, .55);
    line-height: 1.65;
    text-align: left;
}
.ivwork-fc .ivwork-gp-empty a {
    color: #b8aaff;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.ivwork-fc .ivwork-gp-empty a:hover {
    color: #d3c9ff;
}
/* Skeleton primitive: same shimmer as the main bundle, reusable inside game
   page sections that load content asynchronously. */
.ivwork-fc .skeleton,
.skeleton {
    display: block;
    background-color: #2a2d33;
    background-image: linear-gradient(90deg, #2a2d33 25%, #34373d 50%, #2a2d33 75%);
    background-size: 200% 100%;
    border-radius: 8px;
    animation: ivwork-gp-shimmer 1.5s ease-in-out infinite;
}
.ivwork-fc .skeleton-text {
    height: 12px;
    margin: 8px 0;
}
.ivwork-fc .skeleton-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px 12px 0 0;
}
@keyframes ivwork-gp-shimmer {
    0%,100% { opacity:.72; }
    50% { opacity:1; }
}
@media (prefers-reduced-motion: reduce) {
    .ivwork-fc .skeleton,
    .skeleton {
        animation: none;
        background-image: none;
    }
}
