:root {
    --maroon-color: #c32148;
    --light-gray: #f5f5f5;
    --dark-gray: #333;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.bookclub-details {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 20px;
}

.bookclub-header {
    position: relative;
    padding-bottom: 30px;
}

.bookclub-cover {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    background-color: var(--light-gray);
}

.bookclub-logo {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    background-color: white;
    border: 4px solid white;
    position: absolute;
    bottom: -20px;
    left: 20px;
    box-shadow: var(--shadow);
}

.bookclub-title-container {
    padding: 20px 20px 0 120px;
}

.bookclub-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--dark-gray);
}

.bookclub-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* --- Edit Club Button Styles --- */
.edit-club-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    margin-top: 10px;
    border: 1px solid var(--maroon-color);
    border-radius: 5px;
    background-color: transparent;
    color: var(--maroon-color);
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.edit-club-button i {
    margin-right: 5px;
}

.edit-club-button:hover {
    background-color: var(--maroon-color);
    color: #fff;
    text-decoration: none;
}
/* --- End Edit Button Styles --- */

.bookclub-tags {
    padding: 16px 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-block;
    background-color: var(--light-gray);
    color: #666;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 16px;
}

.divider {
    height: 1px;
    background-color: #eee;
    margin: 20px;
}

/* --- Club Sub-Tab Layout Styles --- */
.club-sub-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin: 20px 20px 0;
}

.club-sub-tabs .sub-tab {
    padding: 10px 15px;
    margin-right: 15px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    color: #555;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-bottom-color 0.2s;
}

.club-sub-tabs .sub-tab.active {
    color: var(--maroon-color);
    border-bottom-color: var(--maroon-color);
}

.club-sub-tab-content {
    display: none;
}

.club-sub-tab-content.active {
    display: block;
}

#management-content {
    padding: 20px;
}

#activities-content .meeting-info,
#members-content .members-section,
#management-content > div {
    padding-top: 0;
}
/* --- End Sub-Tab Styles --- */

.bookclub-stats {
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

@media (max-width: 640px) {
    .bookclub-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .bookclub-title-container {
        padding: 20px 12px 0 110px;
    }

    .bookclub-title {
        font-size: 18px;
    }
}

@media (max-width: 380px) {
    .bookclub-header {
        padding-bottom: 50px;
    }

    .bookclub-logo {
        bottom: -30px;
        left: 50%;
        transform: translateX(-50%);
    }

    .bookclub-title-container {
        padding: 40px 12px 0 12px;
        text-align: center;
    }
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background-color: var(--light-gray);
    border-radius: 8px;
}

.stat-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-gray);
}

.stat-label {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    text-align: center;
}

.bookclub-description {
    padding: 20px;
    line-height: 1.6;
    color: #444;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: var(--dark-gray);
}

/* NOTE: '.current-book' section seems to be redundant if you're using the activity structure */
/* .current-book {
    padding: 0 20px 20px;
} */

.book-card {
    display: flex;
    gap: 15px;
    padding: 15px;
    background-color: var(--light-gray);
    border-radius: 8px;
}

.book-cover {
    width: 70px;
    height: 105px;
    object-fit: cover;
    border-radius: 4px;
    background-color: white;
}

.book-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.book-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--dark-gray);
}

.book-author {
    font-size: 14px;
    color: #666;
    margin: 0 0 10px 0;
}

.reading-progress {
    font-size: 12px;
    color: var(--maroon-color);
    margin: 0;
}

.progress-bar {
    height: 4px;
    width: 100%;
    background-color: #ddd;
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 65%;
    background-color: var(--maroon-color);
}

.members-section {
    padding: 0 20px 20px;
}

.members-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.view-all {
    font-size: 14px;
    color: var(--maroon-color);
    text-decoration: none;
    font-weight: 500;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 12px;
}

.member {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.member-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--light-gray);
    object-fit: cover;
    margin-bottom: 6px;
}

.member-name {
    font-size: 12px;
    color: #666;
    margin: 0;
    max-width: 70px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meeting-info {
    padding: 0 20px 20px;
}

.meeting-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 640px) {
    .meeting-details {
        grid-template-columns: 1fr 1fr;
    }
}

.meeting-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: var(--light-gray);
    border-radius: 8px;
}

.meeting-icon {
    width: 24px;
    height: 24px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--maroon-color);
    font-size: 12px;
}

.meeting-text {
    font-size: 14px;
    color: var(--dark-gray);
}

.actions {
    padding: 20px;
    display: flex;
    gap: 15px;
    background-color: var(--light-gray);
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.join-button {
    flex: 1;
    background-color: var(--maroon-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.join-button:hover {
    background-color: #b01c3e;
}

.share-button {
    background-color: white;
    color: var(--dark-gray);
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px 16px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.share-button:hover {
    background-color: #f0f0f0;
}

/* Share Pop-up Styles */
.share-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.share-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.share-popup-content {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 450px;
    text-align: center;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease-in-out;
}

.share-popup-overlay.active .share-popup-content {
    transform: translateY(0);
}

.share-popup-content h3 {
    margin-top: 0;
    color: var(--dark-gray);
    font-size: 22px;
    margin-bottom: 20px;
}

.share-popup-content .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.share-link-input {
    width: calc(100% - 20px);
    padding: 12px 10px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #555;
    background-color: var(--light-gray);
    cursor: text;
    user-select: all;
}

.copy-button {
    background-color: var(--maroon-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100%;
}

.copy-button:hover {
    background-color: #b01c3e;
}

.copy-message {
    margin-top: 15px;
    font-size: 14px;
    color: green;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.copy-message.show {
    opacity: 1;
}