/* Plrun Games Theme — custom CSS layered on top of Tailwind CDN */

/* Custom scrollbar (light theme) */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Smooth transitions & hovers */
.game-card { transition: all 0.3s ease; }
.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border-color: #c7d2fe;
}

.play-overlay { opacity: 0; transition: all 0.3s ease; backdrop-filter: blur(2px); }
.game-card:hover .play-overlay { opacity: 1; }

/* Gradient text helper */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(to right, #6366f1, #3b82f6);
}

/* Hide horizontal scrollbar for category chip row but keep functionality */
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }
.scrollbar-hide::-webkit-scrollbar { display: none; }

/* WordPress admin bar offset for sticky header */
body.admin-bar header.plrun-sticky-header { top: 32px; }
@media screen and (max-width: 782px) {
    body.admin-bar header.plrun-sticky-header { top: 46px; }
}

/* WordPress paginate_links() output styled to match the category mockup */
.plrun-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    padding: 0.5rem 0.875rem;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25rem;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.plrun-pagination .page-numbers:hover { background: #f1f5f9; color: #6366f1; }
.plrun-pagination .page-numbers.current {
    position: relative;
    z-index: 10;
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}
.plrun-pagination li:first-child .page-numbers { border-top-left-radius: 0.5rem; border-bottom-left-radius: 0.5rem; }
.plrun-pagination li:last-child .page-numbers { border-top-right-radius: 0.5rem; border-bottom-right-radius: 0.5rem; }



/* Plrun Blog Article and archive templates */
.blog-card { transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 35px -18px rgba(15, 23, 42, 0.35);
    border-color: #c7d2fe;
}
.sticky-sidebar {
    position: sticky;
    top: 6rem;
}
body.admin-bar .sticky-sidebar { top: 8rem; }
.plrun-blog-prose {
    color: #334155;
    font-size: 1.0625rem;
    line-height: 1.85;
}
.plrun-blog-prose .lead,
.plrun-blog-prose p:first-child {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #475569;
}
.plrun-blog-prose h2 {
    margin-top: 2.25rem;
    margin-bottom: 0.875rem;
    scroll-margin-top: 6rem;
    color: #0f172a;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.plrun-blog-prose h3 {
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    scroll-margin-top: 6rem;
    color: #1e293b;
    font-size: 1.25rem;
    line-height: 1.3;
    font-weight: 800;
}
.plrun-blog-prose p { margin-top: 1rem; margin-bottom: 1rem; }
.plrun-blog-prose a { color: #4f46e5; font-weight: 700; text-decoration: none; }
.plrun-blog-prose a:hover { color: #6366f1; text-decoration: underline; }
.plrun-blog-prose ul,
.plrun-blog-prose ol { margin: 1.25rem 0; padding-left: 1.5rem; }
.plrun-blog-prose li { margin: 0.5rem 0; }
.plrun-blog-prose blockquote {
    margin: 1.75rem 0;
    border-left: 4px solid #6366f1;
    background: #eef2ff;
    border-radius: 0 1rem 1rem 0;
    padding: 1rem 1.25rem;
    color: #334155;
    font-weight: 600;
}
.plrun-blog-prose img {
    border-radius: 1rem;
    box-shadow: 0 18px 35px -22px rgba(15, 23, 42, 0.4);
}
@media (max-width: 1023px) {
    .sticky-sidebar { position: static; }
}

/* Game single pages powered by Popoki-compatible post meta */
.plrun-game-player:fullscreen {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
}
.plrun-game-player:fullscreen .aspect-video {
    height: 100vh;
    aspect-ratio: auto;
}
.plrun-game-start {
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.plrun-game-start.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.plrun-game-iframe {
    border: 0;
    background: #020617;
}
.plrun-loader-spinner {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: #fff;
    animation: plrun-spin 0.8s linear infinite;
}
@keyframes plrun-spin { to { transform: rotate(360deg); } }
.plrun-action-button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 0.75rem;
    background: #1e293b;
    color: #e2e8f0;
    padding: 0.625rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 800;
    line-height: 1;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.plrun-action-button:hover,
.plrun-action-button:focus-visible {
    background: #334155;
    color: #fff;
    transform: translateY(-1px);
    outline: none;
}
.plrun-action-button.is-copied::after {
    content: "Copied";
    margin-left: 0.25rem;
    color: #86efac;
}
.plrun-game-page.is-theater-mode {
    position: relative;
    z-index: 60;
}
.plrun-game-page.is-theater-mode .plrun-game-player {
    border-color: rgba(99, 102, 241, 0.65);
    box-shadow: 0 0 0 9999px rgba(2, 6, 23, 0.88), 0 30px 80px -30px rgba(79, 70, 229, 0.65);
}
body.plrun-theater-mode {
    overflow-x: hidden;
}
.plrun-game-prose {
    color: #334155;
    font-size: 1.0625rem;
    line-height: 1.8;
}
.plrun-game-prose h2,
.plrun-game-prose h3 {
    color: #0f172a;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.plrun-game-prose p { margin-top: 1rem; margin-bottom: 1rem; }
.plrun-game-prose ul,
.plrun-game-prose ol { margin: 1.25rem 0; padding-left: 1.5rem; }
.plrun-game-prose li { margin: 0.625rem 0; }
.plrun-game-prose a { color: #4f46e5; font-weight: 700; text-decoration: none; }
.plrun-game-prose a:hover { text-decoration: underline; }
.plrun-game-prose kbd,
.plrun-controls-list kbd,
kbd {
    display: inline-flex;
    min-width: 1.8rem;
    align-items: center;
    justify-content: center;
    margin: 0 0.15rem;
    border: 1px solid #cbd5e1;
    border-bottom-width: 3px;
    border-radius: 0.45rem;
    background: #f8fafc;
    color: #0f172a;
    padding: 0.15rem 0.45rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.875em;
    font-weight: 800;
    line-height: 1.4;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
}
.plrun-controls-list {
    list-style: none;
    padding-left: 0 !important;
}
.plrun-controls-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}
@media (max-width: 767px) {
    .plrun-action-button {
        flex: 1 1 auto;
        justify-content: center;
    }
}

/* Web Stories archive cards */
.story-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1.5rem;
    align-items: start;
}
@media (min-width: 768px) {
    .story-card-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}
.story-card {
    position: relative;
    transition: transform 0.25s ease, filter 0.25s ease;
}
.story-card:hover,
.story-card:focus-within {
    transform: translateY(-6px);
    filter: drop-shadow(0 24px 32px rgba(15, 23, 42, 0.18));
}
.story-card-link {
    display: block;
    border-radius: 1.75rem;
    color: #fff;
    text-decoration: none;
    outline: none;
}
.story-card-link:focus-visible {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.35);
}
.story-card-media {
    position: relative;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border-radius: 1.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #0f172a;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 20px 45px -24px rgba(15, 23, 42, 0.55);
}
.story-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.01);
    transition: transform 0.35s ease;
}
.story-card:hover .story-card-image { transform: scale(1.07); }
.story-card-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.05) 0%, rgba(2, 6, 23, 0.18) 42%, rgba(2, 6, 23, 0.88) 100%);
}
.story-card-content {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 2;
}
.story-card-badge {
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    margin-bottom: 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    padding: 0.35rem 0.65rem;
    font-size: 0.6875rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}
.story-card-content h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.04em;
    text-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}
.story-card-content p {
    margin: 0.75rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}
.story-card-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 4rem;
}
.story-card-fallback::before {
    content: "";
    position: absolute;
    width: 9rem;
    height: 9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    filter: blur(1px);
}
.story-card-fallback i { position: relative; z-index: 1; }
.story-bg-action { background: radial-gradient(circle at 20% 18%, rgba(244, 63, 94, 0.95), transparent 28%), linear-gradient(145deg, #020617 0%, #312e81 52%, #7c2d12 100%); }
.story-bg-racing { background: radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.95), transparent 28%), linear-gradient(145deg, #111827 0%, #0369a1 55%, #065f46 100%); }
.story-bg-puzzle { background: radial-gradient(circle at 25% 76%, rgba(250, 204, 21, 0.85), transparent 28%), linear-gradient(145deg, #581c87 0%, #1e1b4b 52%, #0f172a 100%); }
.story-bg-mobile { background: radial-gradient(circle at 82% 72%, rgba(96, 165, 250, 0.85), transparent 30%), linear-gradient(145deg, #020617 0%, #1d4ed8 52%, #0f766e 100%); }
.story-bg-safety { background: radial-gradient(circle at 22% 20%, rgba(52, 211, 153, 0.88), transparent 28%), linear-gradient(145deg, #0f172a 0%, #064e3b 50%, #172554 100%); }
.story-load-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid #c7d2fe;
    background: #fff;
    color: #4f46e5;
    padding: 0.85rem 1.4rem;
    font-size: 0.875rem;
    font-weight: 900;
    box-shadow: 0 14px 30px -22px rgba(79, 70, 229, 0.45);
}
.story-load-more:disabled { opacity: 0.75; cursor: default; }

/* About and Privacy page templates */
.team-card {
    position: relative;
    isolation: isolate;
}
.team-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(14, 165, 233, 0.12), rgba(16, 185, 129, 0.12));
    opacity: 0.85;
}
.policy-nav {
    top: 6rem;
}
body.admin-bar .policy-nav { top: 8rem; }
.policy-section {
    scroll-margin-top: 7rem;
}
.policy-section h2 {
    margin: 0 0 1rem;
    color: #0f172a;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    line-height: 1.2;
    font-weight: 900;
    letter-spacing: -0.03em;
}
.policy-section p {
    margin: 1rem 0;
    color: #475569;
    font-size: 1rem;
    line-height: 1.8;
}
.policy-section ul {
    margin: 1rem 0;
    padding-left: 1.25rem;
    color: #475569;
}
.policy-section li {
    margin: 0.6rem 0;
    line-height: 1.75;
}
.policy-section a {
    color: #4f46e5;
    font-weight: 800;
    text-decoration: none;
}
.policy-section a:hover { text-decoration: underline; }
@media (max-width: 1023px) {
    .policy-nav { position: static; }
}
