/* Extracted from themes/default/views/category.php. */

/* Style block 1 */
body {
        background: linear-gradient(180deg, #09090b 0, #09090b 360px, #fff 360px, #fff 100%) !important;
      }
      .category-hero {
        padding: 34px 0 18px;
      }
      .category-hero h1 {
        margin-bottom: 10px;
        color: #fff !important;
        font-size: 42px;
        line-height: 1.1;
      }
      .category-hero p {
        max-width: 760px;
        color: #d4d4d8 !important;
        font-size: 17px;
        line-height: 27px;
      }
      .category-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 20px;
      }
      .template-list-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
        margin: 18px 0 22px;
      }
      .template-list-card {
        display: block;
        min-height: 74px;
        padding: 16px;
        border: 1px solid #e4e4e7;
        border-radius: 8px;
        background: #fff;
        color: #18181b;
        font-weight: 700;
        line-height: 22px;
        box-shadow: 0 10px 28px rgba(9, 9, 11, 0.05);
      }
      .template-list-card:hover {
        border-color: #18181b;
        background: #fafafa;
        color: #09090b;
        text-decoration: none;
      }
      .category-empty {
        margin: 24px 0 38px;
        padding: 18px;
        border-radius: 8px;
        background: #fff;
      }
      .category-count {
        margin: 8px 0 0;
        color: #a1a1aa !important;
        font-size: 14px;
        font-weight: 700;
      }
      .category-pagination {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
        margin: 18px 0 34px;
      }
      .category-pagination a,
      .category-pagination .active-page {
        display: inline-block;
        min-width: 18px;
        padding: 7px 10px;
        border: 1px solid #d4d4d8;
        border-radius: 7px;
        background: #fff;
        color: #27272a;
        font-size: 14px;
        font-weight: 700;
        line-height: 18px;
        text-align: center;
      }
      .category-pagination a:hover {
        border-color: #18181b;
        background: #fafafa;
        color: #09090b;
      }
      .category-pagination .active-page {
        border-color: #09090b;
        background: #09090b;
        color: #fff;
      }
      .board-preview-popup {
        position: absolute;
        z-index: 9999;
        width: 560px;
        background: rgba(9, 9, 11, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 12px;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
        color: #fff;
        padding: 12px;
        font-family: inherit;
        pointer-events: auto;
        opacity: 0;
        transition: opacity 0.15s ease-in-out;
        backdrop-filter: blur(8px);
      }
      .preview-loading {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 24px 0;
        gap: 12px;
        color: #a1a1aa;
        font-size: 14px;
      }
      .preview-loading .spinner {
        width: 24px;
        height: 24px;
        border: 3px solid rgba(255, 255, 255, 0.1);
        border-top-color: #3b82f6;
        border-radius: 50%;
        animation: preview-spin 0.8s linear infinite;
      }
      @keyframes preview-spin {
        to { transform: rotate(360deg); }
      }
      .preview-error {
        text-align: center;
        padding: 16px;
        color: #ef4444;
        font-size: 14px;
      }
      .preview-board-container {
        display: flex;
        flex-direction: column;
        gap: 10px;
      }
      .preview-board-title {
        font-size: 15px;
        font-weight: 700;
        color: #f3f4f6;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding-bottom: 6px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      }
      .preview-board-grid {
        display: grid;
        gap: 4px;
        background: #fff;
        padding: 4px;
        border-radius: 6px;
        border: 1px solid rgba(255, 255, 255, 0.08);
      }
      .preview-grid-header {
        background: #2a3698;
        color: #fff;
        font-size: 9px;
        font-weight: 800;
        text-align: center;
        padding: 6px 2px;
        border-radius: 3px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-transform: uppercase;
      }
      .preview-grid-cell {
        background: #2a3698;
        color: #f9fafb;
        font-size: 10px;
        font-weight: 600;
        text-align: left;
        padding: 0;
        border-radius: 3px;
        min-height: 72px;
        position: relative;
        overflow: hidden;
        perspective: 500px;
        cursor: zoom-in;
      }
      .preview-cell-face {
        position: absolute;
        inset: 0;
        padding: 7px;
        border-radius: 3px;
        backface-visibility: hidden;
        transform-style: preserve-3d;
        transition: transform 0.22s ease, opacity 0.22s ease;
      }
      .preview-question {
        display: -webkit-box;
        background: #2a3698;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 4;
        line-height: 14px;
      }
      .preview-answer {
        display: -webkit-box;
        overflow: hidden;
        background: #2a3698;
        color: #facc15;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 4;
        line-height: 14px;
        opacity: 0;
        transform: rotateY(-90deg);
      }
      .preview-grid-cell.active:hover .preview-question {
        opacity: 0;
        transform: rotateY(90deg);
      }
      .preview-grid-cell.active:hover .preview-answer {
        opacity: 1;
        transform: rotateY(0deg);
      }
      .preview-grid-cell.empty {
        background: rgba(255, 255, 255, 0.02);
        color: transparent;
        cursor: default;
      }
      .preview-zoom-overlay {
        position: fixed;
        inset: 0;
        z-index: 10000;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 24px;
        background: rgba(9, 9, 11, 0.72);
      }
      .preview-zoom-overlay.is-open {
        display: flex;
      }
      .preview-zoom-card {
        position: relative;
        width: min(720px, 100%);
        padding: 26px;
        border: 1px solid #27272a;
        border-radius: 8px;
        background: #fff;
        color: #18181b;
        box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
      }
      .preview-zoom-close {
        position: absolute;
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        border: 1px solid #d4d4d8;
        border-radius: 6px;
        background: #fff;
        color: #18181b;
        font-size: 18px;
        font-weight: 800;
        line-height: 28px;
        cursor: pointer;
      }
      .preview-zoom-card h3 {
        margin: 0 42px 18px 0;
        color: #71717a;
        font-size: 13px;
        line-height: 18px;
        text-transform: uppercase;
      }
      .preview-zoom-question {
        margin-bottom: 18px;
        color: #18181b;
        font-size: 24px;
        font-weight: 800;
        line-height: 32px;
      }
      .preview-zoom-answer {
        padding-top: 18px;
        border-top: 1px solid #e4e4e7;
        color: #52525b;
        font-size: 18px;
        line-height: 28px;
      }
      @media (max-width: 767px) {
        .category-hero h1 {
          font-size: 34px;
        }
        .template-list-grid {
          grid-template-columns: 1fr;
        }
        .category-actions .btn {
          display: block;
          width: 100%;
          box-sizing: border-box;
        }
        .board-preview-popup {
          display: none !important;
        }
      }
