/* Toolbar Container */
.tbc-bc-player-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 32px;
    padding: 24px;
    border-top: 1px solid #eee;
}

.tbc-bc-toolbar-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    background: #f8f9fa;
    color: #424242;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    -webkit-tap-highlight-color: transparent;
    padding: 12px;
}

.tbc-bc-speed-button-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.tbc-bc-speed-indicator {
    position: absolute;
    bottom: -8px;
    right: -8px;
    background: #1a73e8;
    color: white;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 6px;
    line-height: 1;
    min-width: 16px;
    text-align: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
    z-index: 2;
}

.tbc-bc-toolbar-button .tbc-bc-chapters-icon,
.tbc-bc-toolbar-button .tbc-bc-bookmark-icon,
.tbc-bc-toolbar-button .tbc-bc-volume-on-icon,
.tbc-bc-toolbar-button .tbc-bc-volume-off-icon,
.tbc-bc-toolbar-button .tbc-bc-speed-toggle-icon {
    min-width: 50px;
    min-height: 50px;
    fill: currentColor;
}

.tbc-bc-toolbar-button:focus {
    background: #f8f9fa;
    color: #424242;
    outline: none;
}

.tbc-bc-toolbar-button:active {
    background: #f8f9fa;
    color: #424242;
    transform: translateY(1px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.tbc-bc-toolbar-button:hover {
    background: #e8f0fe;
    color: #1a73e8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.tbc-bc-toolbar-button.tbc-bc-speed-toggle:hover .tbc-bc-speed-indicator {
    background: #1557b0;
    transform: scale(1.05);
}

.tbc-bc-toolbar-button.tbc-bc-speed-toggle.tbc-bc-active .tbc-bc-speed-indicator {
    background: #0f4c75;
    animation: tbc-bc-speedPulse 0.3s ease;
}

@keyframes tbc-bc-speedPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.tbc-bc-toolbar-label {
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 500;
    color: #666;
    transition: color 0.2s ease;
    white-space: nowrap;
}

/* Expandable Controls */
.tbc-bc-expandable-controls > div {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    background: #f8f9fa;
    margin: 0 -32px;
    padding: 0 32px;
    border-top: 1px solid transparent;
}

.tbc-bc-expandable-controls > div.tbc-bc-active {
    max-height: 500px;
    opacity: 1;
    visibility: visible;
    padding: 24px 32px;
    border-top-color: #eee;
}

.tbc-bc-control-section-title {
    font-size: 18px;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0 0 16px;
    text-align: center;
}

/* Chapters & Bookmarks Lists */
.tbc-bc-chapters-list,
.tbc-bc-bookmarks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

.tbc-bc-chapters-list::-webkit-scrollbar,
.tbc-bc-bookmarks-list::-webkit-scrollbar {
    width: 8px;
}

.tbc-bc-chapters-list::-webkit-scrollbar-track,
.tbc-bc-bookmarks-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.tbc-bc-chapters-list::-webkit-scrollbar-thumb,
.tbc-bc-bookmarks-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.tbc-bc-chapters-list::-webkit-scrollbar-thumb:hover,
.tbc-bc-bookmarks-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.tbc-bc-chapter-item,
.tbc-bc-bookmark-jump {
    display: grid;
    grid-template-columns: 35px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #424242;
    flex: 1;
}

.tbc-bc-chapter-item .tbc-bc-chapter-label {
    font-weight: 600;
    color: #1a73e8;
}

.tbc-bc-chapter-icon-wrapper,
.tbc-bc-bookmark-icon-wrapper {
    flex: 0 0 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tbc-bc-chapter-icon-wrapper img,
.tbc-bc-bookmark-icon-wrapper img {
    width: 32px;
    height: 32px;
    display: block;
}

.tbc-bc-chapter-item .tbc-bc-chapter-content,
.tbc-bc-bookmark-jump .tbc-bc-bookmark-title {
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tbc-bc-chapter-timestamp,
.tbc-bc-bookmark-timestamp {
    padding: 4px 12px;
    background: #e8f0fe;
    color: #1a73e8;
    border-radius: 16px;
    font-size: 0.9em;
    white-space: nowrap;
}

.tbc-bc-chapter-item:hover,
.tbc-bc-bookmark-jump:hover {
    background: #e8f0fe;
    border-color: #1a73e8;
    color: #1a73e8;
}

.tbc-bc-chapter-item:hover .tbc-bc-chapter-timestamp,
.tbc-bc-bookmark-jump:hover .tbc-bc-bookmark-timestamp {
    background: #1a73e8;
    color: white;
}

.tbc-bc-chapter-item.tbc-bc-active,
.tbc-bc-bookmark-jump.tbc-bc-active {
    background: #e8f0fe;
    border-color: #1a73e8;
    color: #1a73e8;
}

.tbc-bc-chapter-item.tbc-bc-active .tbc-bc-chapter-timestamp,
.tbc-bc-bookmark-jump.tbc-bc-active .tbc-bc-bookmark-timestamp {
    background: #1a73e8;
    color: white;
}

/* Volume Controls */
.tbc-bc-volume-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 8px 32px;
}

.tbc-bc-volume-slider {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    background: #e0e0e0;
    border-radius: 2px;
    outline: none;
}

.tbc-bc-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #1a73e8;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.tbc-bc-volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #1a73e8;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Speed Controls */
.tbc-bc-speed-controls {
    padding: 8px 24px;
}

.tbc-bc-speed-options {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tbc-bc-speed-option {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: white;
    color: #424242;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
}

.tbc-bc-speed-option:hover {
    border-color: #1a73e8;
    color: #1a73e8;
}

.tbc-bc-speed-option.tbc-bc-active {
    background: #1a73e8;
    color: white;
    border-color: #1a73e8;
}

/* Bookmark Form */
.tbc-bc-bookmark-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tbc-bc-bookmark-form {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
    margin-bottom: 8px;
}

.tbc-bc-bookmark-title-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: #424242;
}

.tbc-bc-bookmark-title-input:focus {
    border-color: #1a73e8;
    outline: none;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.tbc-bc-bookmark-submit {
    background: #1a73e8;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    flex-shrink: 0;
}

.tbc-bc-bookmark-submit:hover {
    background: #1557b0;
    transform: scale(1.05);
}

.tbc-bc-bookmark-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.tbc-bc-remove-bookmark {
    padding: 8px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    margin-left: auto;
}

.tbc-bc-bookmark-item:hover .tbc-bc-remove-bookmark {
    opacity: 1;
}

.tbc-bc-remove-bookmark:hover {
    color: #d32f2f;
    background: #fee7e7;
}

/* Mobile */
@media (max-width: 768px) {
    .tbc-bc-chapter-item .tbc-bc-chapter-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 4px;
    }
    
    .tbc-bc-chapter-item .tbc-bc-separator {
        display: none;
    }
    
    .tbc-bc-chapter-item .tbc-bc-chapter-label {
        font-weight: 600;
        color: #1a73e8;
    }
    
    .tbc-bc-chapter-item .tbc-bc-chapter-title {
        font-size: 0.9em;
        color: #666;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .tbc-bc-chapter-timestamp {
        padding: 2px 8px;
        font-size: 0.85em;
    }

    .tbc-bc-player-toolbar {
        padding: 16px;
    }

    .tbc-bc-toolbar-button {
        width: 40px;
        height: 40px;
    }

    .tbc-bc-toolbar-label {
        font-size: 10px;
        bottom: -20px;
    }

    .tbc-bc-expandable-controls > div.tbc-bc-active {
        padding: 16px;
    }

    .tbc-bc-speed-options {
        gap: 4px;
    }

    .tbc-bc-speed-option {
        padding: 6px 12px;
        font-size: 12px;
    }

    .tbc-bc-speed-indicator {
        font-size: 8px;
        padding: 1px 3px;
        min-width: 12px;
        border-radius: 4px;
        bottom: -6px;
        right: -6px;
        border-width: 1px;
    }
}