/* Explore public content — /app #explorePublicPage */

#explorePublicBody {
    min-height: 12rem;
}

/* Shell can show signed-in before Explore JS runs; hide guest CTA when data-explore-auth=1 */
#explorePublicPage[data-explore-auth="1"] #explorePublicGuestHint {
    display: none !important;
}

/* Fallback: match authenticated nav chrome (inline flex on XP strip / user row) without relying on Explore JS */
body.app-root:has(.points-header[style*="flex"]) #explorePublicPage #explorePublicGuestHint,
body.app-root:has(#userDisplay[style*="flex"]) #explorePublicPage #explorePublicGuestHint {
    display: none !important;
}

.explore-public-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.explore-public-filter {
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: transparent;
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.explore-public-filter:hover {
    border-color: rgba(255, 255, 255, 0.22);
    color: #e2e8f0;
}

.explore-public-filter.is-active {
    background: rgba(61, 214, 140, 0.1);
    border-color: rgba(61, 214, 140, 0.35);
    color: #ecfdf5;
}

.explore-public-block {
    margin-bottom: 1.75rem;
}

.explore-public-block:last-child {
    margin-bottom: 0;
}

.explore-public-block-title {
    margin: 0 0 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.explore-public-block[data-explore-section].is-hidden {
    display: none;
}

.explore-public-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 160px;
    border-radius: 18px;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.05) 0%, #171717 45%, #121212 100%);
    border: 1px solid rgba(61, 214, 140, 0.1);
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(61, 214, 140, 0.04);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    overflow: hidden;
}

.explore-public-tile::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(46, 181, 116, 0.2), rgba(61, 214, 140, 0.65), rgba(34, 211, 238, 0.35));
    opacity: 0.65;
    pointer-events: none;
}

.explore-public-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 32px rgba(61, 214, 140, 0.12);
    border-color: rgba(61, 214, 140, 0.28);
}

.explore-public-tile-main {
    flex: 1;
    padding: 1rem 1.1rem 0.75rem;
}

.explore-public-tile-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.explore-public-tile-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.22rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.explore-public-tile-title {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.explore-public-tile-meta {
    margin: 0;
    font-size: 0.78rem;
    color: #94a3b8;
}

.explore-public-tile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.65rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.2);
}

.explore-public-tile-actions .btn-primary,
.explore-public-tile-actions .btn-secondary {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.explore-public-empty {
    padding: 1.25rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
    border-radius: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.15);
}

/* Study hub entry (AP Euro, AP CSP, …) */
.explore-hub-block {
    margin-bottom: 1.5rem;
}

.explore-hub-entry-grid {
    max-width: min(100%, 560px);
}

.explore-hub-entry-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    width: 100%;
    padding: 1.1rem 1.2rem;
    border-radius: 18px;
    border: 1px solid rgba(61, 214, 140, 0.14);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.06) 0%, #101010 55%, #0a0a0a 100%);
    color: #e2e8f0;
    text-align: left;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

.explore-hub-entry-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55), 0 0 28px rgba(61, 214, 140, 0.1);
    border-color: rgba(61, 214, 140, 0.35);
}

.explore-hub-entry-icon {
    font-size: 1.5rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(61, 214, 140, 0.18), rgba(61, 214, 140, 0.04));
    border: 1px solid rgba(61, 214, 140, 0.22);
    box-shadow: 0 0 20px rgba(61, 214, 140, 0.08);
}

.explore-hub-entry-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f8fafc;
}

.explore-hub-entry-desc {
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.35;
}

.explore-ap-euro-hub {
    --explore-card-bg: linear-gradient(165deg, rgba(255, 255, 255, 0.06) 0%, rgba(10, 15, 13, 0.95) 42%, rgba(0, 0, 0, 0.55) 100%);
    --explore-card-border: rgba(61, 214, 140, 0.12);
    --explore-card-glow: 0 4px 28px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(61, 214, 140, 0.06);
    max-width: 900px;
    position: relative;
    isolation: isolate;
    padding: 0.25rem 0.35rem 1.5rem;
    margin: -0.25rem -0.35rem 0;
}

.explore-ap-euro-hub::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: -2rem -8vw -1rem;
    background:
        radial-gradient(ellipse 80% 55% at 50% -15%, rgba(61, 214, 140, 0.14), transparent 55%),
        radial-gradient(ellipse 60% 40% at 100% 30%, rgba(34, 211, 238, 0.06), transparent 50%),
        radial-gradient(ellipse 50% 35% at 0% 70%, rgba(46, 181, 116, 0.05), transparent 45%);
    pointer-events: none;
}

.explore-ap-euro-back {
    margin-bottom: 1rem;
    border-radius: 999px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.explore-ap-euro-back:hover {
    box-shadow: 0 0 22px rgba(61, 214, 140, 0.12);
}

.explore-ap-euro-crumb {
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.explore-ap-euro-crumb span:not(.explore-ap-euro-crumb-sep) {
    color: #94a3b8;
}

.explore-ap-euro-crumb-sep {
    opacity: 0.45;
    color: rgba(61, 214, 140, 0.45);
}

.explore-ap-euro-hub-heading {
    margin: 0 0 0.35rem;
    font-size: clamp(1.25rem, 2.5vw, 1.45rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #f8fafc;
    text-shadow: 0 1px 24px rgba(61, 214, 140, 0.08);
}

.explore-ap-euro-hub-lead {
    margin: 0 0 1.25rem;
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.55;
    max-width: 52ch;
}

.explore-hub-folder-grid .explore-hub-folder-tile {
    list-style: none;
    cursor: pointer;
}

.explore-hub-folder-tile {
    display: flex;
    flex-direction: column;
    min-height: 120px;
    border-radius: 18px;
    background: var(--explore-card-bg, linear-gradient(165deg, rgba(255, 255, 255, 0.05) 0%, #171717 50%, #0f0f0f 100%));
    border: 1px solid var(--explore-card-border, rgba(61, 214, 140, 0.1));
    box-shadow: var(--explore-card-glow, 0 4px 24px rgba(0, 0, 0, 0.5));
    overflow: hidden;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.explore-hub-folder-tile::before {
    content: '';
    display: block;
    height: 2px;
    background: linear-gradient(90deg, rgba(46, 181, 116, 0.15), rgba(61, 214, 140, 0.55), rgba(34, 211, 238, 0.25));
    opacity: 0.75;
}

.explore-hub-folder-tile:hover {
    transform: translateY(-3px);
    border-color: rgba(61, 214, 140, 0.28);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55), 0 0 28px rgba(61, 214, 140, 0.1);
}

.explore-hub-folder-tile:focus {
    outline: 2px solid rgba(61, 214, 140, 0.45);
    outline-offset: 2px;
}

.explore-hub-folder-tile:focus:not(:focus-visible) {
    outline: none;
}

.explore-hub-folder-tile-main {
    padding: 1rem 1.1rem;
}

.explore-hub-folder-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    height: 2.65rem;
    font-size: 1.35rem;
    margin-bottom: 0.65rem;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(61, 214, 140, 0.16), rgba(61, 214, 140, 0.03));
    border: 1px solid rgba(61, 214, 140, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.explore-hub-folder-title {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
}

.explore-hub-folder-sub {
    margin: 0;
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.35;
}

.explore-ap-euro-empty {
    margin-top: 0.5rem;
}

.explore-ap-euro-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.explore-ap-euro-stack .explore-ap-euro-cer {
    margin-top: 0;
}

.explore-ap-euro-cer {
    margin-top: 0.5rem;
}

.explore-ap-euro-cer-card {
    position: relative;
    padding: 1.2rem 1.25rem 1.15rem;
    border-radius: 18px;
    border: 1px solid rgba(61, 214, 140, 0.12);
    background: var(--explore-card-bg);
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(61, 214, 140, 0.05);
    overflow: hidden;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.explore-ap-euro-cer-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #2eb574, #3dd68c, #22d3ee);
    opacity: 0.85;
    border-radius: 18px 0 0 18px;
}

.explore-ap-euro-cer-card:hover {
    transform: translateY(-2px);
    border-color: rgba(61, 214, 140, 0.28);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55), 0 0 36px rgba(61, 214, 140, 0.12);
}

.explore-ap-euro-cer--deck .explore-ap-euro-cer-card::before {
    background: linear-gradient(180deg, #22d3ee, #3dd68c);
}

.explore-ap-euro-cer--stimulus .explore-ap-euro-cer-card::before {
    background: linear-gradient(180deg, #f59e0b, #fbbf24);
    opacity: 0.75;
}

.explore-ap-euro-cer--mcq .explore-ap-euro-cer-card::before {
    background: linear-gradient(180deg, #38bdf8, #22d3ee);
}

.explore-ap-euro-cer--dbq .explore-ap-euro-cer-card::before {
    background: linear-gradient(180deg, #a78bfa, #818cf8);
}

.explore-ap-euro-cer--leq .explore-ap-euro-cer-card::before {
    background: linear-gradient(180deg, #f472b6, #c084fc);
}

.explore-ap-euro-cer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.1rem;
    height: 3.1rem;
    font-size: 1.55rem;
    margin-bottom: 0.75rem;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(61, 214, 140, 0.22), rgba(61, 214, 140, 0.05));
    border: 1px solid rgba(61, 214, 140, 0.28);
    box-shadow: 0 0 24px rgba(61, 214, 140, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.explore-ap-euro-cer--deck .explore-ap-euro-cer-icon {
    background: linear-gradient(145deg, rgba(34, 211, 238, 0.18), rgba(61, 214, 140, 0.06));
    border-color: rgba(34, 211, 238, 0.28);
    box-shadow: 0 0 22px rgba(34, 211, 238, 0.1);
}

.explore-ap-euro-cer--stimulus .explore-ap-euro-cer-icon {
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.22), rgba(245, 158, 11, 0.05));
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 0 22px rgba(245, 158, 11, 0.12);
}

.explore-ap-euro-cer--mcq .explore-ap-euro-cer-icon {
    background: linear-gradient(145deg, rgba(56, 189, 248, 0.2), rgba(56, 189, 248, 0.05));
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 0 22px rgba(56, 189, 248, 0.12);
}

.explore-ap-euro-cer--dbq .explore-ap-euro-cer-icon {
    background: linear-gradient(145deg, rgba(167, 139, 250, 0.22), rgba(129, 140, 248, 0.06));
    border-color: rgba(167, 139, 250, 0.35);
    box-shadow: 0 0 22px rgba(167, 139, 250, 0.12);
}

.explore-ap-euro-cer--leq .explore-ap-euro-cer-icon {
    background: linear-gradient(145deg, rgba(244, 114, 182, 0.2), rgba(192, 132, 252, 0.08));
    border-color: rgba(244, 114, 182, 0.35);
    box-shadow: 0 0 22px rgba(244, 114, 182, 0.12);
}

.explore-ap-euro-cer-title {
    margin: 0 0 0.45rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #f8fafc;
}

.explore-ap-euro-cer-desc {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #94a3b8;
}

.explore-ap-euro-cer-open {
    width: 100%;
    justify-content: center;
}

/* Public deck preview (Explore) */
.explore-public-deck-preview-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.72);
    box-sizing: border-box;
}

.explore-public-deck-preview-dialog {
    width: 100%;
    max-width: 520px;
    max-height: min(85vh, 640px);
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #121212;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
    overflow: hidden;
}

.explore-public-deck-preview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1rem 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.explore-public-deck-preview-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.3;
    padding-right: 0.5rem;
}

.explore-public-deck-preview-close {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.explore-public-deck-preview-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.explore-public-deck-preview-body {
    padding: 0.75rem 1rem 1rem;
    overflow-y: auto;
    flex: 1 1 0;
    min-height: 0;
}

.explore-public-deck-preview-loading,
.explore-public-deck-preview-err {
    margin: 0;
    font-size: 0.88rem;
    color: #94a3b8;
}

.explore-public-deck-preview-err {
    color: #fca5a5;
}

.explore-public-deck-preview-count {
    margin: 0 0 0.65rem;
    font-size: 0.82rem;
    color: #94a3b8;
}

.explore-public-deck-preview-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.explore-public-deck-preview-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.55rem 0.65rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.explore-public-deck-preview-term {
    font-size: 0.88rem;
    font-weight: 700;
    color: #e2e8f0;
}

.explore-public-deck-preview-def {
    font-size: 0.8rem;
    line-height: 1.45;
    color: #94a3b8;
    white-space: pre-wrap;
    word-break: break-word;
}
