/* ============================================
   Essay Club - Global Styles
   ============================================ */

/* CSS Variables */
:root {
    /* Colors - Warm cream and gold palette */
    --club-bg: #faf9f7;
    --club-bg-sidebar: #1a1a1a;
    --club-surface: #ffffff;
    --club-surface-hover: #f5f4f2;
    
    --club-cream: #f5f0e8;
    --club-cream-soft: #e8e2d8;
    --club-cream-muted: rgba(245, 240, 232, 0.7);
    
    --club-accent: #c9a86c;
    --club-accent-light: #dfc291;
    --club-accent-dark: #b8954f;
    --club-accent-glow: rgba(201, 168, 108, 0.2);
    
    --club-text-light: rgba(255, 255, 255, 0.9);
    --club-text-muted: rgba(255, 255, 255, 0.5);
    --club-text-dark: #1a1a1a;
    --club-text-secondary: #6b6b6b;
    
    --club-border: #e5e5e5;
    --club-border-dark: #333333;
    
    --club-success: #4ade80;
    --club-warning: #fbbf24;
    --club-error: #f87171;
    
    /* Typography */
    --font-display: 'Newsreader', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing & Sizing */
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --header-height: 64px;
    
    /* Border Radius */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 50px;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    
    /* Transitions */
    --transition-fast: all 0.15s ease;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Layout Structure
   ============================================ */
.club-layout {
    display: block;
    min-height: 100vh;
}

/* Ensure navbar stays properly laid out on club pages - desktop only */
@media (min-width: 901px) {
    .navbar .user-info {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
    }

    .navbar .user-info .nav-link {
        white-space: nowrap;
    }
}

/* ============================================
   Sidebar
   ============================================ */
.club-sidebar {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: var(--sidebar-width);
    max-height: calc(100vh - 180px);
    background: var(--club-surface);
    display: flex;
    flex-direction: column;
    z-index: 50;
    border: 1px solid var(--club-border);
    border-radius: var(--radius-lg);
    margin-left: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.sidebar-header {
    padding: 0.75rem;
    border-bottom: 1px solid var(--club-border);
}

.club-logo-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    cursor: pointer;
}

.club-logo-link:hover {
    background: var(--club-bg);
    text-decoration: none;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 1.25rem;
    color: var(--club-accent);
    flex-shrink: 0;
}

/* Essay Club Logo Animation - Write & Flip to Star */
.essay-club-logo {
    overflow: hidden;
}

/* The flipper container rotates from center */
.essay-club-logo .logo-flipper {
    transform-origin: 12px 12px;
    animation: flip-to-star 6s ease-in-out infinite;
}

/* Grid cells - start transparent */
.essay-club-logo .cell {
    opacity: 0.15;
}

/* Star hidden initially, shown after flip */
.essay-club-logo .star-symbol {
    opacity: 0;
    transform-origin: 12px 12px;
    animation: star-reveal 6s ease-in-out infinite;
}

/* Writing grid visible during fill, hidden after flip */
.essay-club-logo .writing-grid {
    animation: grid-visibility 6s ease-in-out infinite;
}

/* Each cell has its own keyframe with stagger built in - MUST match 6s main animation cycle */
.essay-club-logo .c1  { animation: cf1  6s ease-out infinite; }
.essay-club-logo .c2  { animation: cf2  6s ease-out infinite; }
.essay-club-logo .c3  { animation: cf3  6s ease-out infinite; }
.essay-club-logo .c4  { animation: cf4  6s ease-out infinite; }
.essay-club-logo .c5  { animation: cf5  6s ease-out infinite; }
.essay-club-logo .c6  { animation: cf6  6s ease-out infinite; }
.essay-club-logo .c7  { animation: cf7  6s ease-out infinite; }
.essay-club-logo .c8  { animation: cf8  6s ease-out infinite; }
.essay-club-logo .c9  { animation: cf9  6s ease-out infinite; }
.essay-club-logo .c10 { animation: cf10 6s ease-out infinite; }
.essay-club-logo .c11 { animation: cf11 6s ease-out infinite; }
.essay-club-logo .c12 { animation: cf12 6s ease-out infinite; }
.essay-club-logo .c13 { animation: cf13 6s ease-out infinite; }
.essay-club-logo .c14 { animation: cf14 6s ease-out infinite; }
.essay-club-logo .c15 { animation: cf15 6s ease-out infinite; }
.essay-club-logo .c16 { animation: cf16 6s ease-out infinite; }
.essay-club-logo .c17 { animation: cf17 6s ease-out infinite; }
.essay-club-logo .c18 { animation: cf18 6s ease-out infinite; }
.essay-club-logo .c19 { animation: cf19 6s ease-out infinite; }
.essay-club-logo .c20 { animation: cf20 6s ease-out infinite; }
.essay-club-logo .c21 { animation: cf21 6s ease-out infinite; }
.essay-club-logo .c22 { animation: cf22 6s ease-out infinite; }
.essay-club-logo .c23 { animation: cf23 6s ease-out infinite; }
.essay-club-logo .c24 { animation: cf24 6s ease-out infinite; }
.essay-club-logo .c25 { animation: cf25 6s ease-out infinite; }

/* Cells fill from 0-25%, stay filled until 27%, then dim at 30% (before flip at 32%). Each cell staggers by 1% */
@keyframes cf1  { 0%,  1% { opacity: 0.15; }  2%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }
@keyframes cf2  { 0%,  2% { opacity: 0.15; }  3%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }
@keyframes cf3  { 0%,  3% { opacity: 0.15; }  4%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }
@keyframes cf4  { 0%,  4% { opacity: 0.15; }  5%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }
@keyframes cf5  { 0%,  5% { opacity: 0.15; }  6%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }
@keyframes cf6  { 0%,  6% { opacity: 0.15; }  7%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }
@keyframes cf7  { 0%,  7% { opacity: 0.15; }  8%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }
@keyframes cf8  { 0%,  8% { opacity: 0.15; }  9%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }
@keyframes cf9  { 0%,  9% { opacity: 0.15; } 10%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }
@keyframes cf10 { 0%, 10% { opacity: 0.15; } 11%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }
@keyframes cf11 { 0%, 11% { opacity: 0.15; } 12%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }
@keyframes cf12 { 0%, 12% { opacity: 0.15; } 13%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }
@keyframes cf13 { 0%, 13% { opacity: 0.15; } 14%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }
@keyframes cf14 { 0%, 14% { opacity: 0.15; } 15%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }
@keyframes cf15 { 0%, 15% { opacity: 0.15; } 16%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }
@keyframes cf16 { 0%, 16% { opacity: 0.15; } 17%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }
@keyframes cf17 { 0%, 17% { opacity: 0.15; } 18%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }
@keyframes cf18 { 0%, 18% { opacity: 0.15; } 19%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }
@keyframes cf19 { 0%, 19% { opacity: 0.15; } 20%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }
@keyframes cf20 { 0%, 20% { opacity: 0.15; } 21%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }
@keyframes cf21 { 0%, 21% { opacity: 0.15; } 22%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }
@keyframes cf22 { 0%, 22% { opacity: 0.15; } 23%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }
@keyframes cf23 { 0%, 23% { opacity: 0.15; } 24%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }
@keyframes cf24 { 0%, 24% { opacity: 0.15; } 25%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }
@keyframes cf25 { 0%, 25% { opacity: 0.15; } 26%, 27% { opacity: 1; } 30%, 100% { opacity: 0.15; } }

@keyframes flip-to-star {
    0%, 32% {
        transform: rotate(0deg) scale(1);
    }
    40% {
        transform: rotate(180deg) scale(1);
    }
    75% {
        transform: rotate(180deg) scale(1);
    }
    83% {
        transform: rotate(360deg) scale(1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes grid-visibility {
    0%, 32% {
        opacity: 1;
    }
    38%, 79% {
        opacity: 0;
    }
    83%, 100% {
        opacity: 1;
    }
}

@keyframes star-reveal {
    0%, 36% {
        opacity: 0;
    }
    40%, 75% {
        opacity: 1;
    }
    81%, 100% {
        opacity: 0;
    }
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--club-text-dark);
    letter-spacing: -0.02em;
    transform: translateY(1px);
}

.logo-about {
    font-family: var(--font-body);
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--club-accent);
    letter-spacing: 0.1em;
    margin-left: auto;
    transition: var(--transition-fast);
}

.club-logo-link:hover .logo-about {
    color: var(--club-accent-dark);
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1rem;
    color: var(--club-text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.nav-item:hover {
    color: var(--club-text-dark);
    background: var(--club-bg);
}

.nav-item.active {
    color: var(--club-accent-dark);
    background: var(--club-accent-glow);
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.nav-icon svg {
    width: 20px;
    height: 20px;
}

.nav-label {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--club-border);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.user-badge:hover {
    background: var(--club-bg);
    text-decoration: none;
}

.user-badge.active {
    background: var(--club-accent-glow);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--club-accent), var(--club-accent-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.user-avatar-img {
    object-fit: cover;
    border: 2px solid var(--club-accent);
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    min-width: 0;
}

.user-name {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--club-text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
}

.user-role {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--club-text-secondary);
    line-height: 1;
    margin-top: -1px;
    text-align: left;
    align-self: flex-start;
}

/* ============================================
   Main Content Area
   ============================================ */
.club-main {
    flex: 1;
    margin-left: calc(var(--sidebar-width) + 2rem);
    min-height: 100vh;
}

.club-content {
    padding: 1rem 2rem 2rem 2rem;
    max-width: 1100px;
}

/* ============================================
   Page Header Component
   ============================================ */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 500;
    color: var(--club-text-dark);
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.page-header .subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--club-text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   Card Component
   ============================================ */
.club-card {
    background: var(--club-surface);
    border: 1px solid var(--club-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition-smooth);
}

.club-card:hover {
    border-color: var(--club-cream-soft);
    box-shadow: var(--shadow-md);
}

.club-card.clickable {
    cursor: pointer;
}

.club-card.clickable:hover {
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--club-text-dark);
    margin: 0;
}

.card-subtitle {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--club-text-secondary);
}

/* ============================================
   Button Components
   ============================================ */
.club-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.club-btn-primary {
    background: linear-gradient(135deg, var(--club-accent), var(--club-accent-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(201, 168, 108, 0.3);
}

.club-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 168, 108, 0.4);
}

.club-btn-secondary {
    background: transparent;
    color: var(--club-text-dark);
    border: 1px solid var(--club-border);
}

.club-btn-secondary:hover {
    background: var(--club-surface-hover);
    border-color: var(--club-cream-soft);
}

.club-btn-ghost {
    background: transparent;
    color: var(--club-accent);
    padding: 0.5rem 1rem;
}

.club-btn-ghost:hover {
    background: var(--club-accent-glow);
}

/* ============================================
   Badge Component
   ============================================ */
.club-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.club-badge-gold {
    background: var(--club-accent-glow);
    color: var(--club-accent-dark);
    border: 1px solid rgba(201, 168, 108, 0.3);
}

.club-badge-success {
    background: rgba(74, 222, 128, 0.15);
    color: #16a34a;
}

.club-badge-warning {
    background: rgba(251, 191, 36, 0.15);
    color: #d97706;
}

/* ============================================
   Grid Layouts
   ============================================ */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

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

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

/* ============================================
   List Component
   ============================================ */
.club-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.club-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--club-surface);
    border: 1px solid var(--club-border);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.club-list-item:hover {
    border-color: var(--club-cream-soft);
    background: var(--club-surface-hover);
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--club-text-dark);
    margin: 0 0 0.5rem;
}

.empty-state p {
    font-family: var(--font-body);
    color: var(--club-text-secondary);
    margin: 0;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .club-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        width: 80%;
        max-width: 320px;
        height: 100vh;
        max-height: 100vh;
        margin-left: 0;
        border-radius: 0;
        border: none;
        border-right: 1px solid var(--club-border);
        z-index: 1001;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .club-sidebar.open {
        transform: translateX(0);
    }
    
    .club-main {
        margin-left: 0;
    }
    
    .club-content {
        padding: 1.5rem 1rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .page-header h1 {
        font-size: 1.75rem;
    }
}

/* Mobile menu toggle for Club sidebar (shown on mobile) */
.club-mobile-toggle {
    display: none;
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 1000;
    width: 28px;
    height: 64px;
    background: var(--club-surface);
    border: 1px solid var(--club-border);
    border-left: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--club-accent);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition-fast);
}

.club-mobile-toggle:hover {
    background: var(--club-surface-hover);
    width: 32px;
}

.club-mobile-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.club-mobile-toggle.is-open svg {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .club-mobile-toggle {
        display: flex;
    }
}

/* Sidebar overlay for mobile */
.club-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 1000;
    transition: background 0.3s ease;
}

.club-sidebar-overlay.visible {
    display: block;
    background: rgba(0, 0, 0, 0.5);
}

/* ============================================
   Animation Utilities
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.4s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.4s ease-out;
}

/* ============================================
   Locked Navigation Items (Non-Active Members)
   ============================================ */
.nav-item-locked {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1rem;
    color: var(--club-text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    background: transparent;
    border: none;
    width: 100%;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: left;
}

.nav-item-locked:hover {
    color: var(--club-text-dark);
    background: var(--club-bg);
}

.nav-item-locked .nav-label {
    flex: 1;
}

.nav-lock-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--club-text-secondary);
    opacity: 0.5;
    flex-shrink: 0;
}

.nav-item-locked:hover .nav-lock-icon {
    opacity: 0.7;
}

/* ============================================
   Locked Page Modal
   ============================================ */
.locked-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, opacity 0.4s ease, visibility 0.4s ease;
}

.locked-modal-overlay.is-visible {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 1;
    visibility: visible;
}

.locked-modal-content {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.locked-modal-overlay.is-visible .locked-modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.locked-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--club-text-secondary);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.locked-modal-close:hover {
    background: var(--club-bg);
    color: var(--club-text-dark);
}

.locked-modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, rgba(201, 168, 108, 0.15), rgba(201, 168, 108, 0.05));
    border-radius: 50%;
    color: var(--club-accent);
}

.locked-modal-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--club-text-dark);
    margin: 0 0 0.75rem;
}

.locked-modal-description {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--club-text-secondary);
    line-height: 1.6;
    margin: 0 0 1.75rem;
}

.locked-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.locked-modal-actions .club-btn {
    flex: 1;
    max-width: 160px;
}

@media (max-width: 480px) {
    .locked-modal-content {
        padding: 2rem 1.5rem;
    }
    
    .locked-modal-actions {
        flex-direction: column;
    }
    
    .locked-modal-actions .club-btn {
        max-width: none;
    }
}

/* ============================================
   Locked Content Overlay (for locked pages)
   ============================================ */
.club-main {
    position: relative;
}

/* Content starts normal, JS adds blur after delay */
.content-locked {
    transition: filter 0.4s ease, opacity 0.4s ease;
}

.content-locked.is-blurred {
    filter: blur(3px);
    opacity: 0.6;
    pointer-events: none;
    user-select: none;
}

.locked-content-overlay {
    position: absolute;
    inset: 0;
    background: rgba(250, 249, 247, 0);
    z-index: 10;
    pointer-events: none;
    transition: background 0.4s ease;
}

.locked-content-overlay.is-visible {
    background: rgba(250, 249, 247, 0.5);
}

/* ============================================
   Sidebar Join Button (Non-Active Members)
   ============================================ */
.join-club-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 0.875rem;
    background: linear-gradient(135deg, var(--club-accent), var(--club-accent-dark));
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.join-club-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201, 168, 108, 0.3);
}

.join-club-btn .join-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
}

.join-club-btn .join-text {
    flex: 1;
    text-align: left;
}

/* ============================================
   Join Modal Styles
   ============================================ */
.join-modal-content {
    max-width: 440px;
    text-align: left;
}

.join-modal-content .locked-modal-title {
    text-align: center;
}

.join-modal-icon {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.15), rgba(74, 222, 128, 0.05));
    color: #16a34a;
}

.join-steps {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.join-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--club-accent);
    color: white;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 50%;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    padding-top: 2px;
}

.step-content p {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--club-text-dark);
    line-height: 1.5;
    margin: 0;
}

.step-content strong {
    font-weight: 600;
    color: inherit;
}

.step-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--club-accent-dark);
    text-decoration: none;
    transition: var(--transition-fast);
}

.step-link:hover {
    color: var(--club-accent);
}

.step-link svg {
    opacity: 0.7;
}

.join-modal-footer {
    padding-top: 1.25rem;
    border-top: 1px solid var(--club-border);
    display: flex;
    justify-content: center;
}

/* Toggle Switch */
.request-access-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.request-access-toggle input {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--club-border);
    border-radius: 24px;
    transition: var(--transition-fast);
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: var(--transition-fast);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.request-access-toggle input:checked + .toggle-slider {
    background: var(--club-accent);
}

.request-access-toggle input:checked + .toggle-slider::after {
    transform: translateX(20px);
}

.request-access-toggle input:disabled + .toggle-slider {
    opacity: 0.7;
    cursor: not-allowed;
}

.toggle-label {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--club-text-dark);
}
