/* Base Player Container */
.book-club-player {
    max-width: 1200px;
    margin: 0 auto;
}

/* Back to Books Button */
.back-to-books {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    margin-bottom: 20px;
    background: #f8f9fa;
    border: none;
    border-radius: 20px;
    color: #1a73e8;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-to-books:hover {
    background: #e8f0fe;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.1);
}

.back-to-books .back-icon {
    width: 20px;
    height: 20px;
}

/* Book Display */
.current-book {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.book-cover {
    margin: 0 auto 24px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15),
                0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.book-cover:hover {
    transform: translateY(-4px);
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-info {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.book-title {
    font-size: 32px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px;
    padding: 0;
    text-align: center;
}

.book-author {
    font-size: 18px;
    color: #666;
    margin: 0;
    text-align: center;
}

/* Player Container */
.player-container {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.custom-player-ui {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Current Chapter Display */
.current-chapter {
    display: flex;
    align-items: center;
    color: #1a73e8;
    font-size: 18px;
    font-weight: 500;
    padding: 8px 16px;
    background: #e8f0fe;
    border-radius: 24px;
    width: 100%;
}

.current-chapter .chapter-icon {
    flex: 0 0 auto;
    margin-right: 12px;
    color: #1a73e8;
}

/* Marquee Animation - Fixed */
.current-chapter .marquee {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.current-chapter .marquee .scroll-text {
    display: inline-block;
    white-space: nowrap;
    animation: scroll 20s linear infinite;
}

/* REMOVED the problematic ::after rule that caused the "|" issue */

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.current-chapter .marquee:hover .scroll-text {
    animation-play-state: paused;
}

/* Messages Container */
.messages-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.message {
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    margin-bottom: 10px;
    animation: slideIn 0.3s ease-out;
}

.message.success { background: #34A853; }
.message.error { background: #EA4335; }
.message.info { background: #4285F4; }
.message.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Mobile Optimization */
@media screen and (max-width: 768px) {
    .player-container {
        padding: 16px;
    }

    .book-title {
        font-size: 24px;
    }

    .book-author {
        font-size: 16px;
    }

    .current-chapter {
        font-size: 16px;
        padding: 6px 12px;
    }

    .messages-container {
        left: 20px;
        right: 20px;
    }
}