/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Crimson Text', serif;
    background: #F5E6D3;
    color: #2C1810;
    line-height: 1.6;
    min-height: 100vh;
}

.app-container {
    max-width: 100%;
    min-height: 100vh;
    padding-bottom: 70px; /* Space for nav */
    background: linear-gradient(160deg, #F5E6D3 0%, #fff 100%);
    position: relative;
    z-index: 1;
}

/* Header styles */
header {
    background: #722F37;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1 {
    color: #F5E6D3;
    text-align: center;
    font-size: 2.5rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* Main content area */
.main-content {
    padding: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Section styles */
.section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Streak display */
.streak-container {
    background: transparent;
    margin: 0 -1.5rem 1.5rem -1.5rem;
    padding: 2rem;
    position: relative;
}

.book-streak {
    background: #fff;
    border-radius: 8px;
    box-shadow: 
        0 4px 15px rgba(0,0,0,0.1),
        0 0 0 1px rgba(114, 47, 55, 0.1);
    display: flex;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.book-streak:hover {
    transform: translateY(-2px);
}

.book-spine {
    background: #722F37;
    color: #F5E6D3;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.book-spine::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: rgba(0,0,0,0.1);
}

.book-spine::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 160%;
    bottom: -30%;
    left: 0;
    background: 
        radial-gradient(
            circle at 50% 50%,
            rgba(255, 147, 36, 0.4) 0%,
            rgba(255, 99, 36, 0.1) 50%,
            transparent 70%
        );
    animation: flameMove 3s ease-in-out infinite;
    z-index: 1;
}

.streak-number {
    text-align: center;
    line-height: 1.2;
    position: relative;
    z-index: 2;
}

#streak-count {
    font-size: 2.5rem;
    font-weight: bold;
    display: block;
    text-shadow: 
        2px 2px 4px rgba(0,0,0,0.2),
        0 0 10px rgba(255, 147, 36, 0.5);
}

#streak-days {
    font-size: 1.2rem;
    opacity: 0.9;
    display: block;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.book-pages {
    flex-grow: 1;
    background: linear-gradient(45deg, #fff 0%, #F5E6D3 100%);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.book-pages::before {
    content: '"';
    position: absolute;
    left: 1rem;
    top: 0.5rem;
    font-size: 3rem;
    color: #722F37;
    opacity: 0.2;
    font-family: Georgia, serif;
}

.streak-quote {
    color: #2C1810;
    font-style: italic;
    text-align: center;
    font-size: 1.1rem;
    margin: 0;
    padding: 0 1.5rem;
    line-height: 1.4;
}

/* Add a subtle animation when streak updates */
@keyframes streakUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.streak-number.updated {
    animation: streakUpdate 0.5s ease;
}

/* Update the daily progress section to complement the new streak design */
.daily-progress {
    padding: 1.5rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.daily-progress h3 {
    color: #722F37;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    text-align: center;
}

#book-goals-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.goal-item {
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-left: 4px solid #722F37;
    transition: all 0.3s ease;
}

.goal-item.completed {
    background: #F5E6D3;
    border-left-color: #8FB996;
}

.goal-info {
    margin-bottom: 1rem;
}

.goal-info h4 {
    margin: 0;
    color: #2C1810;
    font-size: 1.2rem;
    font-family: 'Crimson Text', serif;
}

.book-author {
    color: #666;
    font-style: italic;
    margin: 0.3rem 0;
    font-family: 'Crimson Text', serif;
}

.goal-target {
    color: #722F37;
    margin: 0.3rem 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.goal-progress {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #DEC5A7;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.progress-bar {
    height: 100%;
    background: #722F37;
    transition: width 0.3s ease;
}

.progress-bar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: pointer;
}


.edit-progress {
    background: none;
    border: none;
    padding: 2px 4px;
    cursor: pointer;
    color: #722F37;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.edit-progress:hover {
    opacity: 1;
}

.quick-edit-input {
    width: 50px;
    text-align: center;
    padding: 2px 4px;
    border: 1px solid #DEC5A7;
    border-radius: 4px;
}

.progress-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.progress-count {
    display: inline-flex;
    align-items: center;
    height: 24px;
    gap: 0.2rem;
}

.button-group {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.progress-button, .complete-button {
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 1rem;
}

.progress-button:hover {
    background: #d4b696;
    transform: translateY(-2px);
}

.progress-number {
    cursor: pointer;
    min-width: 30px;
    display: inline-block;
    text-align: right;
}

.progress-number-input {
    width: 40px;
    height: 24px;
    padding: 0 4px;
    border: 1px solid #DEC5A7;
    border-radius: 4px;
    font-size: inherit;
    font-family: inherit;
    text-align: right;
    display: inline-flex;
    align-items: center;
}

.progress-number:hover {
    color: #722F37;
}


.progress-separator, 
.progress-total {
    display: inline-flex;
    align-items: center;
    height: 24px;
}


.complete-button:hover {
    background: #8B3741;
    transform: translateY(-2px);
}

.complete-button.completed {
    background: #8FB996;
}

.checkmark {
    font-size: 1.2rem;
    font-weight: bold;
}

.goal-info {
    flex-grow: 1;
}

.goal-info h4 {
    margin: 0;
    color: #2C1810;
    font-size: 1.1rem;
}

.goal-progress {
    margin: 0.5rem 0 0;
    color: #666;
    font-size: 1rem;
}

.goal-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}


.progress-button:hover {
    background: #d4b696;
    transform: translateY(-1px);
}

.progress-button.increment {
    background: #8FB996;
    color: white;
}

.progress-button.decrement {
    background: #DEC5A7;
    color: #2C1810;
}

.complete-button {
    background: #722F37;
    color: white;
}

.complete-button:hover {
    background: #621F27;
    transform: translateY(-1px);
}

.button-text {
    font-family: 'Crimson Text', serif;
    font-weight: 600;
}

/* No goals message */
.no-goals {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 1rem;
}

/* Completed goals section */
.completed-goals {
    margin-top: 2rem;
    padding-top: 1rem;
}

.completed-goals h3 {
    color: #722F37;
    margin-bottom: 1rem;
}

#completed-goals-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Navigation menu */
.nav-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #722F37;
    display: flex;
    justify-content: space-around;
    padding: 0.8rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #F5E6D3;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 60px;
}

.nav-item.active {
    background: rgba(245,230,211,0.2);
    transform: translateY(-2px);
}

.nav-icon {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.nav-text {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Form styles */
.search-form {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 1rem 0;
}

input, button {
    width: 100%;
    padding: 0.8rem;
    margin: 0.5rem 0;
    border: 1px solid #DEC5A7;
    border-radius: 6px;
    font-family: 'Crimson Text', serif;
}

button {
    background: #722F37;
    color: #F5E6D3;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: #8B3741;
}

/* Book results */
.book-result {
    background: #fff;
    padding: 1.2rem;
    margin: 1rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid #722F37;
}

.book-result h3 {
    color: #722F37;
    margin-bottom: 0.5rem;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #722F37;
    color: #F5E6D3;
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast.show {
    opacity: 1;
}

/* Goal form styles */
.goal-form {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 1.5rem 0;
    border-left: 5px solid #722F37;
}

.goal-form h3 {
    color: #722F37;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.goal-form select,
.goal-form input {
    width: 100%;
    padding: 0.8rem;
    margin: 0.5rem 0;
    border: 1px solid #DEC5A7;
    border-radius: 6px;
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
    background: #fff;
}

.goal-form select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23722F37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

.goal-form button {
    margin-top: 1rem;
    background: #722F37;
    color: #F5E6D3;
    font-weight: bold;
    transition: all 0.3s ease;
}

.goal-form button:hover {
    background: #8B3741;
    transform: translateY(-2px);
}

.goal-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.goal-button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s ease;
    flex: 1;
}

.goal-button:hover {
    transform: translateY(-1px);
}

.increment-button {
    background: #722F37;
    color: #F5E6D3;
}

.complete-button {
    background: #2E7D32;
    color: #F5E6D3;
}

.goal-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Add these new styles */
.search-loading {
    text-align: center;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 1rem 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #F5E6D3;
    border-top: 4px solid #722F37;
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

.loading-message {
    color: #722F37;
    font-size: 1.1rem;
    margin: 0;
    font-style: italic;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Auth Overlay Styles */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(245,230,211,0.97) 0%, rgba(255,255,255,0.97) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.auth-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(44, 24, 16, 0.1);
    width: 90%;
    max-width: 400px;
    position: relative;
    border-left: 5px solid #722F37;
}

.auth-form {
    transition: all 0.3s ease;
}

.auth-form h2 {
    color: #722F37;
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.auth-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    font-style: italic;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #DEC5A7;
    border-radius: 6px;
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #722F37;
    box-shadow: 0 0 0 2px rgba(114, 47, 55, 0.1);
}

.auth-button {
    width: 100%;
    padding: 1rem;
    background: #722F37;
    color: #F5E6D3;
    border: none;
    border-radius: 6px;
    font-family: 'Crimson Text', serif;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-button:hover {
    background: #8B3741;
    transform: translateY(-2px);
}

.auth-links {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.auth-links a {
    color: #722F37;
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: #8B3741;
    text-decoration: underline;
}

.hidden {
    display: none;
    opacity: 0;
}

/* Add animation for form transitions */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form:not(.hidden) {
    animation: fadeIn 0.3s ease forwards;
}

/* Profile section styles */
.profile-section {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.profile-section h3 {
    color: #722F37;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.profile-list {
    display: grid;
    gap: 1rem;
}

.profile-item {
    background: #F5E6D3;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid #722F37;
}

.profile-item h4 {
    color: #2C1810;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.profile-item p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

.danger-zone {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #DEC5A7;
}

.danger-zone h3 {
    color: #d32f2f;
    margin-bottom: 1rem;
}

.danger-button {
    background: #d32f2f;
    color: white;
    padding: 0.8rem;
    margin: 0.5rem 0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.danger-button:hover {
    background: #b71c1c;
    transform: translateY(-2px);
}

.logout-button {
    margin: 2rem 0;
    background: #722F37;
}

.profile-section-group {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #DEC5A7;
}

.profile-section-group h3 {
    color: #722F37;
    margin-bottom: 1rem;
}

.profile-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-item {
    background: #fff;
    border: 1px solid #DEC5A7;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.item-details h4 {
    margin: 0;
    color: #2C1810;
}

.item-details p {
    margin: 0.5rem 0 0;
    color: #666;
    font-size: 0.9rem;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
}

.action-button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    background: #722F37;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-button:hover {
    transform: translateY(-2px);
}

.action-button.danger {
    background: #d32f2f;
}

.action-button.danger:hover {
    background: #b71c1c;
}

.no-items {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

.goals-section {
    margin-bottom: 2rem;
}

.goals-section h4 {
    color: #722F37;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #DEC5A7;
}

.goals-section.completed .profile-item {
    opacity: 0.7;
    background: #f5f5f5;
}

.goal-details {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.profile-item.completed {
    background: #f5f5f5;
}

/* Club and Friends Section Styles */
.club-form, .friend-form {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.club-form h3, .friend-form h3 {
    color: #722F37;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.club-form form, .friend-form form {
    display: flex;
    gap: 1rem;
}

.club-form input, .friend-form input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #DEC5A7;
    border-radius: 6px;
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
}

.club-form button, .friend-form button {
    padding: 0.8rem 1.5rem;
    background: #722F37;
    color: #F5E6D3;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.club-form button:hover, .friend-form button:hover {
    background: #8B3741;
    transform: translateY(-2px);
}

.clubs-section, .friends-section {
    margin-top: 2rem;
}

.clubs-section h3, .friends-section h3 {
    color: #722F37;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.clubs-grid, .friends-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.club-item, .friend-item {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.club-info, .friend-info {
    flex: 1;
}

.club-info h4, .friend-info h4 {
    color: #2C1810;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.club-info p, .friend-info p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

.club-code {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #F5E6D3;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
}

.no-items {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-footer {
    margin-top: 2rem;
    padding: 1rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.profile-footer .privacy-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.profile-footer .privacy-link:hover {
    color: var(--text-color);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: bold;
    color: #2C1810;
}

.form-group input {
    padding: 0.8rem;
    border: 1px solid #DEC5A7;
    border-radius: 6px;
    font-family: 'Crimson Text', serif;
    font-size: 1rem;
}

.danger-zone {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #ffdddd;
}

.action-button {
    padding: 0.8rem 1.5rem;
    background: #722F37;
    color: #F5E6D3;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-button:hover {
    background: #8B3741;
    transform: translateY(-2px);
}

.action-button.danger {
    background: #dc3545;
}

.action-button.danger:hover {
    background: #c82333;
}

/* Social Section Styles */
.social-section {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
}

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

.section-header h3 {
    color: #722F37;
    margin: 0;
    font-size: 1.2rem;
    white-space: nowrap;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.action-button.small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    width: auto;
    min-width: min-content;
}

.action-button.secondary {
    background: #DEC5A7;
    color: #2C1810;
}

.action-button.secondary:hover {
    background: #d4b48e;
}

.social-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.club-item {
    background: #FFFFFF;
    padding: 1.8rem;
    border-radius: 12px;
    border-left: 4px solid #722F37;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(44, 24, 16, 0.08);
}

.club-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(44, 24, 16, 0.12);
    background: #FFF9F5;
}

.club-info {
    flex: 1;
}

.club-info h4 {
    color: #2C1810;
    font-size: 1.4rem;
    margin: 0 0 0.8rem 0;
    font-weight: 600;
}

.club-info p {
    color: #666;
    margin: 0.4rem 0;
    font-size: 1rem;
    line-height: 1.5;
}

.club-code {
    display: inline-block;
    background: #F5E6D3;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-family: monospace;
    font-size: 1rem;
    color: #722F37;
    margin-top: 1rem;
    box-shadow: inset 0 2px 4px rgba(44, 24, 16, 0.06);
    border: 1px solid rgba(114, 47, 55, 0.1);
}

.empty-state {
    text-align: center;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    border: 2px dashed #DEC5A7;
    color: #666;
    font-style: italic;
    margin: 1rem 0;
}

/* Container for the entire friends section */
#friends {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

.club-info h4, .friend-info h4 {
    color: #2C1810;
    margin: 0;
    font-size: 1.1rem;
}

.club-info p, .friend-info p {
    color: #666;
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
}

.club-code {
    background: #fff;
    padding: 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #722F37;
    display: inline-block;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #F5E6D3;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(44, 24, 16, 0.2);
    border: 1px solid #D4B59E;
}

.modal-content h3 {
    color: #722F37;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    text-align: center;
}

.modal-form input,
.modal-form textarea,
.modal-form select {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #D4B59E;
    border-radius: 6px;
    background: #FFF;
    color: #2C1810;
    font-size: 1rem;
}

.modal-form textarea {
    resize: vertical;
    min-height: 100px;
}

.modal-form select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23722F37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.friend-code-display {
    margin-bottom: 2rem;
}

.code-display {
    background: #F5E6D3;
    padding: 1rem;
    border-radius: 6px;
    font-family: monospace;
    font-size: 1.1rem;
    color: #722F37;
    display: inline-block;
    margin-top: 0.5rem;
}


.nickname-editor {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.nickname-editor input {
    padding: 0.5rem;
    border: 2px solid #DEC5A7;
    border-radius: 6px;
    font-size: 1rem;
    width: 200px;
    color: #2C1810;
}

.helper-text {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.book-card.completed {
    background: #f8f4ff;
    border-color: #e0d5f5;
    opacity: 0.85;
}

.book-card.completed .book-info h4 {
    text-decoration: line-through;
    text-decoration-color: rgba(0,0,0,0.2);
}

.completion-badge {
    display: inline-block;
    background: #ffd700;
    color: #4a4a4a;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    margin-top: 5px;
}

.action-button.secondary {
    background: #e0e0e0;
    color: #666;
}

.action-button.primary {
    background: #4a90e2;
    color: white;
}
.action-button.secondary {
    background: #e0e0e0;
    color: #666;
}

.action-button.primary {
    background: #4a90e2;
    color: white;
}

.empty-state {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    background: #fff9f0;
    border-radius: 8px;
    border: 1px dashed #e2d5c5;
}

.empty-state p {
    margin: 0;
}

.book-card, .goal-card {
    background: #fff9f0;
    border: 1px solid #e2d5c5;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.book-card:hover, .goal-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.book-card.completed, .goal-card.completed {
    background: #f8f4ff;
    border-color: #e0d5f5;
    opacity: 0.85;
}

.book-card.completed .book-info h4, 
.goal-card.completed .goal-info h4 {
    text-decoration: line-through;
    text-decoration-color: rgba(0,0,0,0.2);
}

.book-info, .goal-info {
    margin-bottom: 10px;
}

.book-info h4, .goal-info h4 {
    margin: 0;
    color: #2c1810;
    font-size: 1.1em;
}

.book-info p, .goal-info p {
    margin: 5px 0 0;
    color: #666;
    font-size: 0.9em;
}

.completion-badge {
    display: inline-block;
    background: #ffd700;
    color: #4a4a4a;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    margin-top: 5px;
}

.book-actions, .goal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.action-button.secondary {
    background: #e0e0e0;
    color: #666;
}

.action-button.primary {
    background: #4a90e2;
    color: white;
}

.empty-state {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    background: #fff9f0;
    border-radius: 8px;
    border: 1px dashed #e2d5c5;
}

.empty-state p {
    margin: 0;
}


.club-actions button {
    padding: 0.6rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.9rem;
}

.modify-btn {
    background: #F5E6D3;
    color: #722F37;
    border: 1px solid #D4B59E;
}

.modify-btn:hover {
    background: #EED6BC;
    transform: translateY(-2px);
}

.delete-btn {
    background: #FFF0F0;
    color: #D32F2F;
    border: 1px solid #FFCDD2;
    padding: 0.6rem !important;
}

.delete-btn:hover {
    background: #FFE5E5;
    transform: translateY(-2px);
}

.leave-btn {
    background: #FFF3E0;
    color: #E65100;
    border: 1px solid #FFE0B2;
}

.leave-btn:hover {
    background: #FFE0B2;
    transform: translateY(-2px);
}

.book-action {
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #C8E6C9;
}

.book-action:hover {
    background: #C8E6C9;
    transform: translateY(-2px);
}

.friend-item {
    background: #fff;
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(114, 47, 55, 0.1);
}

.friend-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.friend-info {
    margin-bottom: 0.8rem;
}

.friend-info h4 {
    color: #722F37;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.friend-info p {
    color: #666;
    margin: 0.3rem 0;
}

.friend-info .book-link {
    color: #722F37;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.friend-info .book-link:hover {
    color: #8B3741;
    text-decoration: underline;
}
.friend-actions, .club-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: flex-end;
    margin-top: 0.5rem;
}



.social-section {
    background: #FBF6F0;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.social-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.social-section h3 {
    color: #2C1810;
    font-size: 1.4rem;
    margin: 0;
}

.landing-page {
    min-height: 100vh;
    background: linear-gradient(160deg, #F5E6D3 0%, #fff 100%);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

.landing-header {
    background: #722F37;
    padding: 3rem 1.5rem;
    text-align: center;
}

.landing-header .tagline {
    color: #F5E6D3;
    font-size: 1.4rem;
    margin: 1rem 0 2rem;
    opacity: 0.9;
}

.landing-header .cta-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem auto;
    max-width: 500px;
    padding: 0 1rem;
}


.landing-header .cta-button {
    flex: 1;
    max-width: 200px;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    white-space: nowrap;
}

.landing-header .cta-button.login {
    background: transparent;
    border: 2px solid #F5E6D3;
    color: #F5E6D3;
}

.landing-header .cta-button.register {
    background: #F5E6D3;
    color: #722F37;
}

.landing-header .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

@media (max-width: 480px) {
    .landing-header .cta-container {
        flex-direction: column;
        align-items: center;
    }

    .landing-header .cta-button {
        max-width: 100%;
        width: 100%;
    }
    .friend-actions, .club-actions {
        gap: 0.4rem;
    }

    .action-button.small {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .friend-item, .club-item {
        padding: 0.8rem;
    }

    /* Make goal buttons more compact */
    .goal-actions {
        display: flex;
        gap: 0.4rem;
        justify-content: flex-end;
    }

    .goal-button {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }
}

.tagline {
    color: #F5E6D3;
    font-size: 1.2rem;
    margin-top: 0.5rem;
    opacity: 0.9;
}

.landing-content {
    flex: 1;
    padding: 2rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.feature-card {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-card h3 {
    color: #722F37;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: #666;
    line-height: 1.4;
}

.cta-container {
    text-align: center;
    margin: 3rem 0;
}

.cta-button {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 8px;
    border: none;
    margin: 0 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Crimson Text', serif;
}

.cta-button.login {
    background: transparent;
    border: 2px solid #722F37;
    color: #722F37;
}

.cta-button.register {
    background: #722F37;
    color: #F5E6D3;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.landing-footer {
    text-align: center;
    padding: 2rem;
    margin-top: auto;
}

.privacy-link {
    color: #722F37;
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.privacy-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.privacy-policy {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    font-family: 'Crimson Text', serif;
    line-height: 1.6;
}

.privacy-policy section {
    margin-bottom: 2rem;
}

.privacy-policy h1 {
    color: #722F37;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.privacy-policy h2 {
    color: #2C1810;
    margin: 1.5rem 0 1rem;
    font-size: 1.8rem;
}

.privacy-policy p {
    margin-bottom: 1rem;
    color: #444;
    font-size: 1.1rem;
}

.privacy-policy ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.privacy-policy li {
    margin-bottom: 0.8rem;
    color: #444;
    font-size: 1.1rem;
}

.privacy-policy ul ul {
    margin: 0.5rem 0;
}

.privacy-policy .back-link {
    text-align: center;
    margin-top: 3rem;
}

.privacy-policy .back-link .cta-button {
    display: inline-block;
    text-decoration: none;
}

.help-button {
    position: fixed;
    right: 1.5rem;
    bottom: 5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #722F37;
    background: #F5E6D3;
    color: #722F37;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    z-index: 1000;
}

.help-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.help-button:active {
    transform: scale(0.95);
}

.help-icon {
    font-weight: bold;
    font-size: 1.2rem;
}


.help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 24, 16, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 1rem;
}

.help-overlay.fade-in {
    opacity: 1;
}

.help-overlay.fade-out {
    opacity: 0;
}

.help-content {
    background: #F5E6D3;
    border-radius: 16px;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 80vh; /* Reduced from 90vh to 80vh */
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    margin: 2rem;
    scrollbar-width: thin;
    scrollbar-color: #722F37 #F5E6D3;
}

/* Custom scrollbar for webkit browsers */
.help-content::-webkit-scrollbar {
    width: 8px;
}

.help-content::-webkit-scrollbar-track {
    background: #F5E6D3;
    border-radius: 4px;
}

.help-content::-webkit-scrollbar-thumb {
    background: #722F37;
    border-radius: 4px;
    opacity: 0.8;
}

.help-content::-webkit-scrollbar-thumb:hover {
    background: #8B3741;
}

.help-content h2 {
    color: #722F37;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.8rem;
}

.help-section {
    margin-bottom: 2.5rem;
}

.help-section h3 {
    color: #722F37;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    border-bottom: 2px solid rgba(114, 47, 55, 0.1);
    padding-bottom: 0.5rem;
}

.help-step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.step-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.step-content h4 {
    color: #722F37;
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.step-content p {
    margin: 0;
    color: #2C1810;
    line-height: 1.5;
}

.help-tips {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.tip {
    background: #fff;
    padding: 1.2rem;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.tip-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.tip-content h4 {
    color: #722F37;
    margin: 0 0 0.3rem 0;
    font-size: 1.1rem;
}

.tip-content p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.help-done {
    display: block;
    width: 100%;
    padding: 1rem;
    margin-top: 2rem;
    background: #722F37;
    color: #F5E6D3;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.help-done:hover {
    background: #8B3741;
    transform: translateY(-2px);
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .help-content {
        padding: 1.5rem;
    }

    .help-step {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
        padding: 1rem;
    }

    .step-icon {
        font-size: 1.8rem;
    }

    .help-tips {
        grid-template-columns: 1fr;
    }

    .tip {
        padding: 1rem;
    }
}