/* ========================================================
   CanvasClashes — Puzzle & Category SEO Pages Stylesheet
   Used across /puzzle/*, /puzzles/*, and /puzzles/
   ======================================================== */

:root {
    --bg-dark: #070b14;
    --card-glass: rgba(15, 23, 42, 0.75);
    --border-glass: rgba(255, 255, 255, 0.12);
    --border-glow: rgba(0, 210, 255, 0.35);
    --accent-cyan: #00d2ff;
    --accent-indigo: #6366f1;
    --accent-purple: #a855f7;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
}

/* Container */
.puzzle-page-container {
    max-width: 1140px;
    width: 100%;
    margin: 2rem auto 5rem auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

/* Breadcrumbs */
.breadcrumbs-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    padding: 0.65rem 1.2rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    backdrop-filter: blur(8px);
}

.breadcrumbs-bar a {
    color: var(--accent-cyan);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs-bar a:hover {
    color: #fff;
    text-decoration: underline;
}

.breadcrumbs-bar .sep {
    opacity: 0.4;
    font-size: 0.8rem;
}

/* ========================================================
   INDIVIDUAL PUZZLE PAGE LAYOUT (/puzzle/{slug})
   ======================================================== */
.puzzle-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
    margin-bottom: 3.5rem;
}

@media (max-width: 900px) {
    .puzzle-hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Artwork Visual Box */
.artwork-visual-box {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.85), rgba(2, 6, 23, 0.95));
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.7);
    position: relative;
    overflow: hidden;
}

.artwork-img-wrap {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.artwork-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.artwork-img-wrap:hover img {
    transform: scale(1.02);
}

.artwork-badges-floating {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    z-index: 2;
}

.badge-tag {
    background: rgba(2, 6, 23, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    backdrop-filter: blur(6px);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-tag.badge-cyan {
    border-color: rgba(0, 210, 255, 0.5);
    color: var(--accent-cyan);
}

.badge-tag.badge-gold {
    border-color: rgba(245, 158, 11, 0.5);
    color: #fbbf24;
}

/* Artwork Meta Box */
.artwork-meta-box {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-glass);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    font-size: 0.84rem;
}

.artwork-meta-item .meta-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.2rem;
}

.artwork-meta-item .meta-val {
    color: #e2e8f0;
    font-weight: 600;
}

/* 4-in-1 Launcher Card */
.launcher-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.98));
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2.2rem 2rem;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.7);
    position: relative;
}

.launcher-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00d2ff, #6366f1, #10b981, #f59e0b);
}

.launcher-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0, 210, 255, 0.12);
    border: 1px solid rgba(0, 210, 255, 0.35);
    color: var(--accent-cyan);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    margin-bottom: 0.9rem;
}

.launcher-title {
    font-size: 2.1rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 0.8rem;
    letter-spacing: -0.02em;
}

.launcher-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 1.8rem;
}

/* Primary Game: Jigsaw Box */
.jigsaw-launcher-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 210, 255, 0.25);
    border-radius: var(--radius-md);
    padding: 1.4rem;
    margin-bottom: 1.5rem;
}

.piece-selector-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 0.7rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.piece-buttons-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.4rem;
    margin-bottom: 1.2rem;
}

@media (max-width: 500px) {
    .piece-buttons-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.piece-sel-btn {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-glass);
    color: #cbd5e1;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.55rem 0.2rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.piece-sel-btn:hover {
    background: rgba(0, 210, 255, 0.15);
    border-color: var(--accent-cyan);
    color: #fff;
}

.piece-sel-btn.active {
    background: linear-gradient(135deg, #00d2ff, #0284c7);
    border-color: #38bdf8;
    color: #030712;
    font-weight: 800;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.4);
}

.btn-launch-jigsaw {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.9rem 1.5rem;
    background: linear-gradient(135deg, #00d2ff 0%, #2563eb 100%);
    border: none;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(0, 210, 255, 0.4);
    transition: all 0.2s;
}

.btn-launch-jigsaw:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -5px rgba(0, 210, 255, 0.6);
    filter: brightness(1.08);
}

/* Secondary Games Grid */
.secondary-games-section-title {
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.secondary-games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

@media (max-width: 600px) {
    .secondary-games-grid {
        grid-template-columns: 1fr;
    }
}

.btn-subgame-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.6rem;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: #fff;
    transition: all 0.25s;
    text-align: center;
}

.btn-subgame-card .subgame-icon {
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
}

.btn-subgame-card .subgame-name {
    font-size: 0.84rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.btn-subgame-card .subgame-badge {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.btn-subgame-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(30, 41, 59, 0.8);
}

.btn-subgame-card.game-slider:hover {
    border-color: var(--accent-purple);
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.3);
}

.btn-subgame-card.game-tetris:hover {
    border-color: var(--accent-emerald);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.btn-subgame-card.game-clash:hover {
    border-color: var(--accent-amber);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}

/* ========================================================
   EDITORIAL ARTICLE CARD (Rich Original Content)
   ======================================================== */
.article-editorial-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.8), rgba(2, 6, 23, 0.95));
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2.8rem 2.5rem;
    margin-bottom: 3.5rem;
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.6);
}

@media (max-width: 768px) {
    .article-editorial-card {
        padding: 2rem 1.5rem;
    }
}

.article-editorial-card h2 {
    font-size: 1.65rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.article-editorial-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #38bdf8;
    margin: 2rem 0 0.8rem 0;
}

.article-editorial-card p {
    font-size: 1rem;
    line-height: 1.75;
    color: #cbd5e1;
    margin-bottom: 1.25rem;
}

.editorial-callout-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin: 2rem 0;
}

@media (max-width: 700px) {
    .editorial-callout-grid {
        grid-template-columns: 1fr;
    }
}

.callout-box {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.4rem;
}

.callout-box .callout-header {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.callout-box p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #94a3b8;
    margin-bottom: 0;
}

/* ========================================================
   RELATED PUZZLES GRID
   ======================================================== */
.related-puzzles-section {
    margin-top: 3.5rem;
}

.section-head-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.8rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-head-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: #fff;
}

.section-head-link {
    color: var(--accent-cyan);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
}

.section-head-link:hover {
    text-decoration: underline;
    color: #fff;
}

.related-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
}

.related-puzzle-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.related-puzzle-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 210, 255, 0.45);
    box-shadow: 0 12px 25px -5px rgba(0, 0, 0, 0.6);
}

.related-thumb-wrap {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #000;
    position: relative;
}

.related-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-puzzle-card:hover .related-thumb-wrap img {
    transform: scale(1.05);
}

.related-info {
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.related-title {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.35rem;
    color: #f1f5f9;
}

.related-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: auto;
}

/* ========================================================
   CATEGORY DIRECTORY HUB (/puzzles/) & LANDING (/puzzles/{slug})
   ======================================================== */
.category-hero-header {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(2, 6, 23, 0.95));
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2.8rem 2.2rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
    position: relative;
    overflow: hidden;
}

.category-hero-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00d2ff, #a855f7, #00f5ff);
}

/* Horizontal Category Pills Bar */
.category-pills-bar {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    margin-bottom: 2.5rem;
    scrollbar-width: thin;
}

.category-pill {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid var(--border-glass);
    color: #cbd5e1;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.2s;
}

.category-pill:hover {
    background: rgba(0, 210, 255, 0.15);
    border-color: var(--accent-cyan);
    color: #fff;
}

.category-pill.active {
    background: linear-gradient(135deg, #00d2ff, #0284c7);
    border-color: #38bdf8;
    color: #030712;
    font-weight: 800;
}

/* Category Grid Hub */
.category-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.category-hub-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.8), rgba(2, 6, 23, 0.95));
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.category-hub-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 210, 255, 0.5);
    box-shadow: 0 16px 35px -8px rgba(0, 0, 0, 0.7);
}

.cat-collage-wrap {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2px;
    height: 160px;
    background: #000;
    overflow: hidden;
}

.cat-collage-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.cat-collage-wrap img:first-child {
    grid-row: 1 / 3;
}

.category-hub-card:hover .cat-collage-wrap img {
    transform: scale(1.05);
}

.cat-hub-body {
    padding: 1.25rem 1.4rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.cat-hub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.cat-hub-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #f8fafc;
}

.cat-hub-count {
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(0, 210, 255, 0.12);
    border: 1px solid rgba(0, 210, 255, 0.3);
    color: var(--accent-cyan);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}

.cat-hub-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.cat-hub-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent-cyan);
    border-top: 1px solid var(--border-glass);
    padding-top: 0.75rem;
}

/* Category Grid of Puzzles (/puzzles/{slug}) */
.category-puzzles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.cat-puzzle-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.75), rgba(2, 6, 23, 0.95));
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
}

.cat-puzzle-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 210, 255, 0.4);
    box-shadow: 0 14px 30px -8px rgba(0, 0, 0, 0.7);
}

.cat-puzzle-thumb-link {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #000;
    position: relative;
    text-decoration: none;
}

.cat-puzzle-thumb-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.cat-puzzle-card:hover .cat-puzzle-thumb-link img {
    transform: scale(1.05);
}

.cat-puzzle-body {
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.cat-puzzle-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 0.35rem;
    line-height: 1.35;
}

.cat-puzzle-author {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.cat-puzzle-actions {
    margin-top: auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
}

.btn-game-mini {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.2rem;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-game-mini:hover {
    transform: translateY(-2px);
    border-color: #fff;
}

.btn-game-mini.mini-jigsaw:hover { background: rgba(0, 210, 255, 0.25); border-color: var(--accent-cyan); }
.btn-game-mini.mini-slider:hover { background: rgba(168, 85, 247, 0.25); border-color: var(--accent-purple); }
.btn-game-mini.mini-tetris:hover { background: rgba(16, 185, 129, 0.25); border-color: var(--accent-emerald); }
.btn-game-mini.mini-clash:hover { background: rgba(245, 158, 11, 0.25); border-color: var(--accent-amber); }
