/*
 * Pennd — Club Detail Page CSS
 * Full-page club profile with tabs, hero, sidebar layout
 * Inherits base layout from penned.css + main.css.
 */

/* ── Bookclub design tokens (shared with bookclub.css) ── */
:root {
    --color-bg-hero:     #2c1810;
    --color-bg-card:     #ffffff;
    --color-surface:     #eeebe4;
    --color-border:      #ddd8cf;
    --color-border-light:#ece9e2;

    --color-text-primary:  #1a1410;
    --color-text-secondary:#5a524a;
    --color-text-muted:    #8a8078;
    --color-text-on-dark:  #f5f2ec;

    --color-accent:        #c0392b;
    --color-accent-hover:  #a93226;
    --color-accent-light:  #f9ebe9;
    --color-secondary:     #2c3e50;
    --color-secondary-hover: #1a252f;
    --color-gold:          #c9a84c;
    --color-success:       #27ae60;
    --color-error:         #e74c3c;

    --font-display: var(--font-serif);
    --font-body:    var(--font-sans);

    --space-xs:  0.25rem;
    --space-sm:  0.5rem;
    --space-md:  1rem;
    --space-lg:  1.5rem;
    --space-xl:  2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    --radius-sm:  4px;
    --radius-md:  8px;
    --radius-lg:  12px;
    --radius-xl:  16px;
    --radius-full: 9999px;

    --shadow-sm:  0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md:  0 4px 12px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg:  0 8px 24px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);
    --shadow-xl:  0 16px 48px rgba(0,0,0,0.18), 0 8px 16px rgba(0,0,0,0.08);

    --content-max: 1200px;
    --header-h:    64px;

    --transition: 0.2s ease;
    --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode {
    --color-bg-card:       #1e1a15;
    --color-surface:       #2a2520;
    --color-border:        #3a342c;
    --color-border-light:  #2a2520;
    --color-text-primary:  #f0ede6;
    --color-text-secondary:#a09880;
    --color-text-muted:    #706860;
    --color-accent-light:  #2a1510;
}

/* ══════════════════════════════════════════════
   NOT FOUND
══════════════════════════════════════════════ */
.not-found-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    min-height: 60vh;
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
}
.not-found-emoji { font-size: 4rem; }
.not-found-page h1 {
    font-family: var(--font-display);
    font-size: 2rem;
}
.not-found-page p { color: var(--color-text-secondary); }

/* ══════════════════════════════════════════════
   CLUB HERO
══════════════════════════════════════════════ */
.club-detail-hero {
    position: relative;
    padding: var(--space-2xl) 0 var(--space-xl);
    overflow: hidden;
    color: #fff;
    min-height: 360px;
    display: flex;
    align-items: flex-end;
}

.hero-bg-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        var(--club-color, #2c1810) 0%,
        var(--club-color2, #1a1008) 60%,
        #0a0a0f 100%
    );
    z-index: 0;
}
.hero-bg-gradient::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
}

/* Floating emoji particles */
.hero-particles { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.particle {
    position: absolute;
    font-size: 2rem;
    opacity: 0.06;
    animation: particleFloat 8s ease-in-out infinite;
    user-select: none;
}
.p1 { top: 15%; left: 8%;  animation-delay: 0s;   font-size: 3rem; }
.p2 { top: 55%; right: 12%; animation-delay: 2.5s; font-size: 2.5rem; opacity: 0.04; }
.p3 { top: 25%; right: 25%; animation-delay: 5s;   font-size: 4rem; opacity: 0.03; }

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%       { transform: translateY(-20px) rotate(8deg); }
}

.club-detail-hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* Breadcrumb */
.breadcrumb ol {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    list-style: none;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}
.breadcrumb ol li {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
}
.breadcrumb ol li a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color var(--transition);
}
.breadcrumb ol li a:hover { color: #fff; }
.breadcrumb ol li[aria-current="page"] { color: rgba(255,255,255,0.9); }

/* Hero layout */
.club-hero-content {
    display: flex;
    align-items: flex-end;
    gap: var(--space-xl);
}

.club-hero-icon {
    font-size: 5rem;
    line-height: 1;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
    flex-shrink: 0;
    animation: heroIconBounce 3s ease-in-out infinite;
}
@keyframes heroIconBounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
}

.club-hero-info { flex: 1; min-width: 0; }

.club-hero-badges {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

.hero-genre-badge {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    padding: 3px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
}
.hero-privacy-badge {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.85);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.hero-activity-badge {
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.15) !important;
}

.club-hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-sm);
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    line-height: 1.15;
}

.club-hero-desc {
    font-size: 1rem;
    color: rgba(255,255,255,0.82);
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: var(--space-xl);
}

.club-hero-stats {
    display: flex;
    gap: var(--space-xl);
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
}
.hero-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85);
}
.hero-stat strong {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}
.hero-stat span { opacity: 0.75; }

.club-hero-actions { display: flex; gap: var(--space-md); flex-wrap: wrap; }

.btn-hero-back {
    background: rgba(255,255,255,0.1) !important;
    border-color: rgba(255,255,255,0.25) !important;
    color: rgba(255,255,255,0.9) !important;
    backdrop-filter: blur(4px);
}
.btn-hero-back:hover {
    background: rgba(255,255,255,0.2) !important;
    color: #fff !important;
}

/* ══════════════════════════════════════════════
   MEETING BANNER
══════════════════════════════════════════════ */
.meeting-banner {
    background: var(--color-secondary);
    color: #fff;
    padding: var(--space-md) var(--space-xl);
}
.meeting-banner-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
}
.meeting-banner-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}
.meeting-banner-left strong { font-size: 0.85rem; opacity: 0.75; display: block; }
.meeting-banner-left span  { font-size: 0.95rem; font-weight: 600; }
.meeting-icon { font-size: 1.4rem; }

.meeting-banner-center {
    font-size: 0.875rem;
    opacity: 0.85;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.meeting-format-icon { font-size: 1rem; }

.meeting-banner-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}
.days-badge {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.15);
}
.days-badge.today { background: #27ae60; animation: pulse 1.5s ease-in-out infinite; }
.days-badge.soon  { background: #f39c12; }

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(39,174,96,0.4); }
    50%       { box-shadow: 0 0 0 6px rgba(39,174,96,0); }
}

/* ══════════════════════════════════════════════
   DETAIL LAYOUT
══════════════════════════════════════════════ */
.club-detail-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-xl);
    max-width: var(--content-max);
    margin: var(--space-xl) auto;
    padding: 0 var(--space-xl);
    align-items: start;
}

.club-detail-main { min-width: 0; }
.club-detail-sidebar {
    position: sticky;
    top: calc(var(--header-h) + var(--space-md));
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* ══════════════════════════════════════════════
   TAB NAVIGATION
══════════════════════════════════════════════ */
.tab-nav {
    display: flex;
    gap: 2px;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: var(--space-xl);
    overflow-x: auto;
    scrollbar-width: none;
}
.tab-nav::-webkit-scrollbar { display: none; }

.tab-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.tab-btn:hover:not(.active) {
    color: var(--color-text-primary);
    background: var(--color-surface);
}
.tab-btn.active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
    background: var(--color-accent-light);
}

/* ══════════════════════════════════════════════
   TAB PANELS
══════════════════════════════════════════════ */
.tab-panel {
    display: none;
    animation: tabFadeIn 0.25s ease;
}
.tab-panel.active { display: block; }

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════
   SECTION HEADINGS (shared)
══════════════════════════════════════════════ */
.section-heading {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-border-light);
}

/* ══════════════════════════════════════════════
   ABOUT TAB
══════════════════════════════════════════════ */
.about-section { margin-bottom: var(--space-2xl); }

.about-long-desc p {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.75;
    margin-bottom: var(--space-md);
}
.about-long-desc p:last-child { margin-bottom: 0; }

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
}
.detail-icon { font-size: 1.4rem; flex-shrink: 0; }
.detail-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 2px;
}
.detail-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

/* ══════════════════════════════════════════════
   READING TAB
══════════════════════════════════════════════ */
.reading-section { margin-bottom: var(--space-2xl); }

/* Current read card */
.current-read-card {
    display: flex;
    gap: var(--space-xl);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
}
.current-read-cover {
    width: 120px;
    min-width: 120px;
    height: 170px;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}
.current-read-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cover-fallback-emoji {
    font-size: 2.5rem;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.cover-fallback-emoji.small { font-size: 1.5rem; }

.current-read-info { flex: 1; min-width: 0; }
.current-read-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: var(--space-xs);
}
.current-read-author {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    font-style: italic;
    margin-bottom: var(--space-xl);
}

.reading-progress { margin-bottom: var(--space-lg); }
.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}
.progress-label { font-size: 0.8rem; font-weight: 700; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
.progress-pct   { font-size: 0.9rem; font-weight: 700; color: var(--color-text-primary); }

.progress-bar-track {
    height: 10px;
    background: var(--color-surface);
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 1px solid var(--color-border-light);
}
.progress-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Upcoming */
.upcoming-list { list-style: none; display: flex; flex-direction: column; gap: var(--space-sm); }
.upcoming-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
}
.upcoming-num {
    width: 28px; height: 28px;
    min-width: 28px;
    background: var(--color-surface);
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-muted);
}
.upcoming-info { flex: 1; }
.upcoming-title { display: block; font-size: 0.9rem; font-weight: 700; }
.upcoming-author { font-size: 0.8rem; color: var(--color-text-muted); font-style: italic; }
.upcoming-label {
    font-size: 0.72rem; font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: var(--color-accent-light);
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Past reads */
.past-reads-list { list-style: none; display: flex; flex-direction: column; gap: var(--space-sm); }
.past-read-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    transition: box-shadow var(--transition);
}
.past-read-item:hover { box-shadow: var(--shadow-sm); }

.past-read-spine {
    width: 10px; height: 50px;
    min-width: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}
.past-read-info { flex: 1; }
.past-read-title { display: block; font-size: 0.9rem; font-weight: 700; }
.past-read-author { font-size: 0.8rem; color: var(--color-text-muted); font-style: italic; }

.past-read-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.star-display { display: flex; gap: 1px; }
.star { font-size: 0.75rem; }
.star.full  { color: var(--color-gold); }
.star.half  { color: var(--color-gold); opacity: 0.6; }
.star.empty { color: var(--color-border); }
.past-read-rating-num { font-size: 0.8rem; font-weight: 700; color: var(--color-gold); }

/* ══════════════════════════════════════════════
   MEMBERS TAB
══════════════════════════════════════════════ */
.members-summary {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}
.members-count-display {
    text-align: center;
    min-width: 100px;
}
.big-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}
.big-number-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.members-visual {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
    align-items: center;
}
.member-dot {
    width: 18px; height: 18px;
    border-radius: var(--radius-full);
    animation: dotPop 0.4s ease both;
}
@keyframes dotPop {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
.member-dot-more {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-muted);
    padding: 2px 6px;
    background: var(--color-surface);
    border-radius: var(--radius-full);
}

/* Featured members */
.featured-members-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-2xl);
}
.featured-member-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    transition: box-shadow var(--transition);
}
.featured-member-card:hover { box-shadow: var(--shadow-sm); }

.member-avatar {
    width: 44px; height: 44px;
    min-width: 44px;
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
}
.member-info { flex: 1; }
.member-name { display: block; font-size: 0.9rem; font-weight: 700; }
.member-role { font-size: 0.78rem; color: var(--color-text-muted); }

.member-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.founder-badge { background: #fef5e4; color: #b7770d; }
.mod-badge     { background: #eaf4fb; color: #1a5276; }

/* Join CTA panel */
.join-cta-panel {
    text-align: center;
    background: var(--color-surface);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
}
.join-cta-icon { font-size: 2.5rem; display: block; margin-bottom: var(--space-md); }
.join-cta-panel h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: var(--space-sm);
}
.join-cta-panel p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-lg);
}

/* ══════════════════════════════════════════════
   RULES TAB
══════════════════════════════════════════════ */
.rules-intro {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.6;
}
.rules-list { list-style: none; display: flex; flex-direction: column; gap: var(--space-md); }
.rule-item {
    display: flex;
    gap: var(--space-lg);
    align-items: flex-start;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
}
.rule-num {
    width: 32px; height: 32px;
    min-width: 32px;
    background: var(--color-accent);
    color: #fff;
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: var(--font-display);
}
.rule-text { font-size: 0.9rem; color: var(--color-text-primary); line-height: 1.6; padding-top: 5px; }

.rules-note {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
    background: #fef9e7;
    border: 1px solid #f9e79f;
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    margin-top: var(--space-xl);
}
body.dark-mode .rules-note {
    background: #2a2010;
    border-color: #4a3a10;
}
.rules-note p { font-size: 0.85rem; color: var(--color-text-secondary); line-height: 1.5; }

/* ══════════════════════════════════════════════
   SIDEBAR CARDS
══════════════════════════════════════════════ */
.sidebar-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
}

.sidebar-card-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Stats DL */
.stats-dl { display: flex; flex-direction: column; gap: var(--space-xs); }
.stats-dl-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--color-border-light);
    font-size: 0.875rem;
}
.stats-dl-row:last-child { border-bottom: none; }
.stats-dl-row dt { color: var(--color-text-secondary); }
.stats-dl-row dd { font-weight: 600; }

.inline-stars { display: inline-flex; gap: 1px; }
.rating-num   { font-weight: 700; color: var(--color-gold); font-size: 0.85rem; margin-left: 4px; }

/* Reading sidebar card */
.sidebar-book-link {
    display: flex;
    gap: var(--space-md);
    text-decoration: none;
    color: inherit;
}
.sidebar-book-link:hover .sidebar-book-info strong {
    color: var(--color-accent);
}
.sidebar-book-cover {
    width: 56px; min-width: 56px; height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-sm);
}
.sidebar-book-cover img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.sidebar-book-info {
    flex: 1;
    display: flex; flex-direction: column; gap: 4px;
}
.sidebar-book-info strong { font-size: 0.85rem; font-weight: 700; line-height: 1.3; transition: color var(--transition); }
.sidebar-book-info span   { font-size: 0.78rem; color: var(--color-text-muted); font-style: italic; }
.mini-progress {
    height: 5px;
    background: var(--color-surface);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: 4px;
}
.mini-progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.mini-progress-pct { font-size: 0.72rem; color: var(--color-text-muted); }

/* CTA card */
.cta-card {
    border-top: 4px solid var(--cta-color, var(--color-accent));
}
.cta-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}
.cta-desc {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.5;
}
.btn-block { width: 100%; justify-content: center; }

.member-status-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}
.member-checkmark {
    font-size: 1.5rem;
    width: 40px; height: 40px;
    background: var(--color-success);
    color: #fff;
    border-radius: var(--radius-full);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto var(--space-sm);
}
.member-status-display strong { font-size: 0.95rem; }
.member-status-display p { font-size: 0.8rem; color: var(--color-text-secondary); }
.leave-btn { width: 100%; justify-content: center; }

/* Share card */
.share-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}
.share-btn:hover {
    background: var(--color-bg-card);
    border-color: var(--color-text-secondary);
}

/* ══════════════════════════════════════════════
   RELATED CLUBS
══════════════════════════════════════════════ */
.related-clubs-section {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: var(--space-2xl) 0;
    margin-top: var(--space-2xl);
}
.related-clubs-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--space-xl);
}
.section-heading-standalone {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.related-clubs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.related-club-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: transform var(--transition-slow), box-shadow var(--transition-slow);
    display: flex;
    flex-direction: column;
}
.related-club-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.related-club-link { display: block; }
.related-club-thumb {
    height: 100px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem;
    transition: filter var(--transition);
}
.related-club-card:hover .related-club-thumb { filter: brightness(0.9); }

.related-club-info { padding: var(--space-md) var(--space-lg); flex: 1; display: flex; flex-direction: column; }
.related-club-name {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}
.related-club-name a {
    color: var(--color-text-primary);
    text-decoration: none;
    transition: color var(--transition);
}
.related-club-name a:hover { color: var(--color-accent); }

.related-club-desc {
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: var(--space-md);
}

.related-club-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.related-clubs-more { text-align: center; }

/* ══════════════════════════════════════════════
   PROGRESS UPDATE OVERLAY
══════════════════════════════════════════════ */
.progress-update-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    backdrop-filter: blur(2px);
    animation: modalSlideIn 0.25s ease;
}
.progress-update-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    width: min(400px, 100%);
    box-shadow: var(--shadow-xl);
}
.progress-update-card h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: var(--space-sm);
}
.progress-update-card p {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--space-lg);
}
.slider-group {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}
.slider-group input[type="range"] {
    flex: 1;
    accent-color: var(--color-accent);
    height: 6px;
    cursor: pointer;
}
.slider-value {
    font-size: 1rem;
    font-weight: 700;
    min-width: 40px;
    text-align: right;
}
.progress-update-actions { display: flex; gap: var(--space-md); }

/* ══════════════════════════════════════════════
   DARK MODE OVERRIDES
══════════════════════════════════════════════ */
body.dark-mode .sidebar-card,
body.dark-mode .current-read-card,
body.dark-mode .related-club-card,
body.dark-mode .progress-update-card {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
}

body.dark-mode .detail-item {
    background: var(--color-surface);
    border-color: rgba(255,255,255,0.08);
}

body.dark-mode .share-btn {
    background: var(--color-surface);
    border-color: rgba(255,255,255,0.12);
}

body.dark-mode .tab-btn:hover:not(.active) {
    background: rgba(255,255,255,0.05);
}

body.dark-mode .tab-btn.active {
    background: var(--color-accent-light);
}

body.dark-mode .rules-note {
    background: #2a2010;
    border-color: #4a3a10;
}

body.dark-mode .meeting-banner {
    background: #1a1a2e;
}

/* ── Toast (shared with bookclub) ── */
.toast {
    position: fixed;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--color-secondary);
    color: #fff;
    padding: var(--space-sm) var(--space-xl);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 600;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
    opacity: 0;
    pointer-events: none;
}
.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.toast.success { background: var(--color-success); }
.toast.error   { background: var(--color-error); }

/* ── Button styles (shared with bookclub) ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
    transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
    white-space: nowrap;
    line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
    background: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
}
.btn-primary:hover:not(:disabled) {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    box-shadow: 0 4px 12px rgba(192,57,43,0.3);
}

.btn-secondary {
    background: var(--color-secondary);
    color: #fff;
    border-color: var(--color-secondary);
}

.btn-outline {
    background: transparent;
    color: var(--color-text-primary);
    border-color: var(--border, var(--color-border-light));
}
.btn-outline:hover:not(:disabled) {
    background: var(--color-surface);
    border-color: var(--color-text-secondary);
}

.btn-join {
    background: var(--color-accent-light);
    color: var(--color-accent);
    border-color: var(--color-accent);
}
.btn-join:hover:not(:disabled) {
    background: var(--color-accent);
    color: #fff;
}

.btn-joined {
    background: var(--color-success);
    color: #fff;
    border-color: var(--color-success);
}

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-large { padding: 0.75rem 1.75rem; font-size: 1rem; }

/* Activity badges */
.activity-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.activity-very-active  { background: #eafaf1; color: #1a6b3a; }
.activity-active        { background: #eaf4fb; color: #1a5276; }
.activity-moderately-active { background: #fef9e7; color: #7d6608; }
.activity-steady       { background: #eaf4fb; color: #1a5276; }
.activity-trending     { background: #fdf0ef; color: #943126; }
.activity-new          { background: #eafaf1; color: #1a6b3a; }

body.dark-mode .activity-very-active { background: #0a2a10; color: #5dbe7d; }
body.dark-mode .activity-active { background: #0a1a2a; color: #5da5d5; }
body.dark-mode .activity-moderately-active { background: #2a2010; color: #d4a84c; }

/* Meta chip */
.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

/* Star display */
.star { color: var(--color-gold); }
.star.empty { opacity: 0.3; }
.star.half { position: relative; }

/* Hero FA icon particles */
.hero-particle-icon {
    font-size: 2rem;
    color: rgba(255,255,255,0.15);
    position: absolute;
}
.hero-particle-icon.p1 { top: 15%; left: 8%; animation: particleFloat 6s ease-in-out infinite; }
.hero-particle-icon.p2 { top: 55%; right: 12%; animation: particleFloat 8s ease-in-out infinite 2.5s; }
.hero-particle-icon.p3 { bottom: 10%; left: 40%; animation: particleFloat 7s ease-in-out infinite reverse; }

.club-hero-fa-icon {
    font-size: 4rem;
    color: rgba(255,255,255,0.95);
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 960px) {
    .club-detail-layout {
        grid-template-columns: 1fr;
    }
    .club-detail-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    .club-hero-content { flex-direction: column; align-items: flex-start; }
    .club-hero-icon    { font-size: 3.5rem; }
}

@media (max-width: 640px) {
    .club-detail-hero-inner { padding: 0 var(--space-md); }
    .club-detail-layout { padding: 0 var(--space-md); }
    .club-hero-title { font-size: 1.6rem; }
    .club-hero-stats { gap: var(--space-lg); }
    .hero-stat span  { display: none; }
    .current-read-card { flex-direction: column; align-items: center; text-align: center; }
    .current-read-cover { width: 100px; height: 140px; }
    .meeting-banner-inner { flex-direction: column; gap: var(--space-sm); text-align: center; }
    .related-clubs-grid { grid-template-columns: 1fr; }
    .club-detail-sidebar { grid-template-columns: 1fr; }
    .members-summary { flex-direction: column; text-align: center; }
    .details-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 400px) {
    .details-grid { grid-template-columns: 1fr; }
    .tab-btn { padding: var(--space-sm) var(--space-md); font-size: 0.8rem; }
}
