.print-button.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.ytx-empty-state {
    padding: 20px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #bdbdbd;
    text-align: center;
}

body.light-mode .ytx-empty-state {
    border-color: rgba(0, 0, 0, 0.12);
    color: #666;
}

.ytx-overview-card {
    display: grid;
    grid-template-columns: minmax(260px, 360px) 1fr;
    gap: 24px;
    margin-bottom: 30px;
    padding: 24px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-mode .ytx-overview-card {
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.04), rgba(0, 0, 0, 0.02));
    border-color: rgba(0, 0, 0, 0.08);
}

.ytx-overview-thumbnail {
    min-height: 210px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-dark);
}

body.light-mode .ytx-overview-thumbnail {
    box-shadow: var(--shadow-light);
}

.ytx-overview-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ytx-overview-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

.ytx-overview-details h3 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.2;
}

.ytx-overview-meta {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ytx-channel-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ytx-channel-avatar-link {
    display: inline-flex;
    line-height: 0;
    border-radius: 50%;
}

.ytx-channel-name,
.ytx-video-meta-line,
.ytx-transcript-header p {
    margin: 0;
}

.ytx-channel-name {
    font-weight: 700;
}

.ytx-channel-link {
    color: inherit;
    text-decoration: none;
}

.ytx-channel-link:hover {
    color: var(--primary-color);
}

.ytx-video-meta-line,
.ytx-transcript-header p {
    color: #9c9c9c;
}

body.light-mode .ytx-video-meta-line,
body.light-mode .ytx-transcript-header p {
    color: #666;
}

.ytx-time-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #b9b9b9;
    font-size: 0.9rem;
    font-weight: 700;
}

body.light-mode .ytx-time-pill {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
    color: #666;
}

.ytx-prompt-list {
    list-style: decimal;
    padding-left: 28px;
    margin: 0;
}

.ytx-prompt-list li {
    padding: 16px 18px;
    border-left: 4px solid transparent;
    border-radius: 10px;
    transition: all 0.3s var(--smooth);
}

.ytx-prompt-list li:hover {
    background-color: rgba(229, 9, 20, 0.15);
    border-left-color: var(--primary-color);
    transform: translateX(4px);
}

body.light-mode .ytx-prompt-list li:hover {
    background-color: rgba(229, 9, 20, 0.08);
}

.youtube-subtabs-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

#video:not(.active) .youtube-subtabs-wrapper {
    display: none;
}

.ytx-video-tab-header {
    margin-bottom: 24px;
}

.ytx-video-tab-header-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding-bottom: 15px;
    margin-bottom: 25px;
    border-bottom: 2px solid #333;
}

body.light-mode .ytx-video-tab-header-row {
    border-bottom-color: #eee;
}

.ytx-video-subtabs-inline {
    flex: 0 1 auto;
    justify-content: center;
    padding-bottom: 0;
    min-width: 0;
}

.youtube-subtabs-bar {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}

.youtube-subtabs-bar::-webkit-scrollbar {
    display: none;
}

.youtube-subtab-button {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: #bdbdbd;
    border-radius: 999px;
    padding: 12px 18px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
    scroll-snap-align: start;
}

.youtube-subtab-button:hover {
    color: var(--text-color-dark);
}

.youtube-subtab-button.active {
    color: #fff;
    border-color: rgba(229, 9, 20, 0.5);
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.95), rgba(179, 7, 15, 0.95));
}

body.light-mode .youtube-subtab-button {
    border-color: rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.03);
    color: #666;
}

body.light-mode .youtube-subtab-button:hover {
    border-color: rgba(229, 9, 20, 0.18);
    background: rgba(229, 9, 20, 0.08);
    color: var(--text-color-light);
}

body.light-mode .youtube-subtab-button.active {
    color: #fff;
    border-color: rgba(229, 9, 20, 0.5);
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.95), rgba(179, 7, 15, 0.95));
}

.youtube-subtab-panel {
    display: none;
}

.youtube-subtab-panel.active {
    display: block;
}

.ytx-part-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(229, 9, 20, 0.14);
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ytx-section-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ytx-section-header {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 22px;
    align-items: end;
    margin-bottom: 14px;
}

.ytx-player-transcript-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 22px;
    align-items: start;
    transition: grid-template-columns 0.76s cubic-bezier(0.22, 1, 0.36, 1), gap 0.76s cubic-bezier(0.22, 1, 0.36, 1);
}

.ytx-player-column,
.ytx-transcript-column {
    min-width: 0;
}

.ytx-section-meta-row {
    grid-column: 1;
}

.ytx-transcript-pill-wrap {
    grid-column: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-self: start;
    align-self: end;
}

.ytx-subtitles-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.ytx-transcript-edit-btn {
    display: none !important;
}

.ytx-segment-time-edit-btn {
    position: static;
    opacity: 1;
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
}

.ytx-subtitles-toggle:has(.ytx-subtitles-toggle-input:disabled) {
    opacity: 0.55;
    cursor: not-allowed;
}

.ytx-subtitles-toggle-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: #bdbdbd;
}

body.light-mode .ytx-subtitles-toggle-label {
    color: #666;
}

.ytx-subtitles-toggle-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ytx-subtitles-toggle-ui {
    position: relative;
    width: 46px;
    height: 26px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.ytx-subtitles-toggle-ui::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s ease;
}

.ytx-subtitles-toggle-input:checked + .ytx-subtitles-toggle-ui {
    background: rgba(229, 9, 20, 0.9);
    border-color: rgba(229, 9, 20, 0.9);
}

.ytx-subtitles-toggle-input:checked + .ytx-subtitles-toggle-ui::after {
    transform: translateX(20px);
}

body.light-mode .ytx-subtitles-toggle-ui {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.1);
}

.ytx-player-shell,
.ytx-transcript-column,
.ytx-question-card,
.ytx-questions-block {
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-mode .ytx-player-shell,
body.light-mode .ytx-transcript-column,
body.light-mode .ytx-question-card,
body.light-mode .ytx-questions-block {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.07);
}

.ytx-player-shell {
    padding: 0;
    height: clamp(280px, 24vw, 330px);
    overflow: hidden;
    transition: height 0.76s cubic-bezier(0.22, 1, 0.36, 1), width 0.76s cubic-bezier(0.22, 1, 0.36, 1);
}

.ytx-player-target {
    width: 100%;
    height: 100%;
    background: #111;
    border-radius: 18px;
    overflow: hidden;
}

.ytx-player-target iframe {
    width: 100% !important;
    height: 100% !important;
}

.ytx-transcript-column {
    box-sizing: border-box;
    padding: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    height: auto;
    max-height: none;
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.5s ease, transform 0.76s cubic-bezier(0.22, 1, 0.36, 1), padding 0.76s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.4s ease;
}

.ytx-transcript-scrollbox {
    flex: 1 1 auto;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
}

.ytx-transcript-disabled-state {
    display: none;
}

.ytx-video-instance.ytx-subtitles-off .ytx-player-transcript-grid {
    grid-template-columns: minmax(0, 1fr) 0fr;
    gap: 0;
}

.ytx-video-instance.ytx-subtitles-off .ytx-transcript-column {
    padding: 0;
    border-color: transparent;
    opacity: 0;
    transform: translateX(20px);
    pointer-events: none;
}

.ytx-transcript-pill,
.ytx-questions-block h4 {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(229, 9, 20, 0.14);
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ytx-questions-block h4 {
    margin-bottom: 14px;
}

.ytx-transcript-line {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    padding: 10px 12px;
    border-radius: 12px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.ytx-transcript-line + .ytx-transcript-line {
    margin-top: 6px;
}

.ytx-transcript-line.active {
    background: rgba(229, 9, 20, 0.14);
    transform: translateX(4px);
}

body.light-mode .ytx-transcript-line.active {
    background: rgba(229, 9, 20, 0.08);
}

.ytx-transcript-timestamp {
    border: none;
    background: transparent;
    color: var(--primary-color);
    font-weight: 800;
    cursor: pointer;
    padding: 0;
}

.ytx-transcript-text {
    line-height: 1.7;
}

.ytx-keyword {
    display: inline;
    padding: 0.08em 0.28em;
    border-radius: 0.4em;
    background: rgba(229, 9, 20, 0.18);
    color: #ffd3d6;
    box-shadow: inset 0 0 0 1px rgba(229, 9, 20, 0.18);
    cursor: help;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.ytx-keyword:hover {
    background: rgba(229, 9, 20, 0.28);
    color: #fff0f1;
    box-shadow: inset 0 0 0 1px rgba(229, 9, 20, 0.28);
}

body.light-mode .ytx-keyword {
    background: rgba(229, 9, 20, 0.12);
    color: #a70a14;
    box-shadow: inset 0 0 0 1px rgba(229, 9, 20, 0.14);
}

body.light-mode .ytx-keyword:hover {
    background: rgba(229, 9, 20, 0.2);
    color: #870711;
    box-shadow: inset 0 0 0 1px rgba(229, 9, 20, 0.18);
}

.ytx-definition-tooltip {
    position: absolute;
    z-index: 10000;
    max-width: 280px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(18, 18, 18, 0.96);
    border: 1px solid rgba(229, 9, 20, 0.25);
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.5;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

body.light-mode .ytx-definition-tooltip {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(229, 9, 20, 0.2);
    color: #222;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
}

.ytx-tooltip-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ytx-tooltip-image {
    order: 2;
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
}

.ytx-tooltip-text {
    min-width: 0;
}

body:not(.light-mode) .ytx-tooltip-image {
    filter: brightness(0) invert(1);
}

.ytx-questions-block {
    margin-top: 20px;
    padding: 16px;
}

.ytx-question-set {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

@media (min-width: 1001px) {
    .ytx-question-set[data-question-count="1"] {
        grid-template-columns: 320px;
        justify-content: center;
    }

    .ytx-question-set[data-question-count="2"] {
        grid-template-columns: repeat(2, 320px);
        justify-content: center;
    }
}

.ytx-question-card {
    padding: 14px;
    overflow: hidden;
    will-change: transform, opacity, max-height;
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        opacity 0.24s ease,
        max-height 0.24s ease,
        padding-top 0.24s ease,
        padding-bottom 0.24s ease,
        margin 0.24s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.ytx-question-card.saving {
    filter: blur(1.6px) saturate(0.82);
    opacity: 0.88;
    pointer-events: none;
}

.ytx-question-card.is-deleting {
    pointer-events: none;
}

.ytx-question-card.is-removing {
    pointer-events: none;
}

.ytx-question-card.is-cued {
    border-color: rgba(229, 9, 20, 0.9);
    box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.28), 0 0 22px 8px rgba(229, 9, 20, 0.36), 0 0 44px 14px rgba(229, 9, 20, 0.2);
    animation: ytxPulseCue 2s ease-out forwards;
}

.ytx-question-card.is-end-revealed {
    animation: ytxEndFlash 0.85s ease;
}

.ytx-question-card.is-correct {
    border-color: #2f9246;
    background: rgba(46, 204, 113, 0.12);
}

.ytx-question-card.is-incorrect,
.ytx-question-card.is-unanswered {
    border-color: #cf3c4f;
    background: rgba(207, 60, 79, 0.12);
}

body.light-mode .ytx-question-card.is-correct {
    border-color: #1f8f43;
    background: rgba(31, 143, 67, 0.12);
    box-shadow: 0 0 0 2px rgba(31, 143, 67, 0.18);
}

body.light-mode .ytx-question-card.is-incorrect,
body.light-mode .ytx-question-card.is-unanswered {
    border-color: #d93045;
    background: rgba(217, 48, 69, 0.11);
    box-shadow: 0 0 0 2px rgba(217, 48, 69, 0.16);
}

.ytx-question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.ytx-question-number {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a3a3a3;
}

.ytx-question-text {
    margin: 0 0 10px 0;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.4;
}

.ytx-question-hint-slot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.ytx-edit-hint-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(229, 9, 20, 0.12);
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1;
}

.ytx-mcq-edit-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.ytx-mcq-edit-controls .edit-btn,
.ytx-mcq-edit-controls .delete-btn {
    position: static;
    opacity: 1;
    pointer-events: auto;
}

.ytx-mcq-edit-controls .edit-btn.is-saving,
.ytx-mcq-edit-controls .delete-btn.is-saving {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
}

.ytx-timestamp-hint {
    border: none;
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(229, 9, 20, 0.12);
    color: var(--primary-color);
    font-size: 0.88rem;
    font-weight: 800;
    cursor: pointer;
}

.ytx-timestamp-hint.is-revealed {
    animation: ytxHintReveal 0.95s cubic-bezier(0.22, 1, 0.36, 1);
}

.ytx-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ytx-option {
    border: 2px solid #444;
    border-radius: 12px;
    transition: all 0.2s ease;
}

body.light-mode .ytx-option {
    border-color: #ddd;
}

.ytx-option:hover {
    transform: translateX(6px);
    border-color: #888;
}

.ytx-option.selected {
    border-color: var(--primary-color);
    background: rgba(229, 9, 20, 0.08);
}

body.light-mode .ytx-option.selected {
    border-color: #d61f34;
    background: rgba(214, 31, 52, 0.14);
    box-shadow: 0 0 0 2px rgba(214, 31, 52, 0.18);
}

.ytx-option.is-correct-answer {
    border-color: #2f9246;
    box-shadow: 0 0 0 1px rgba(47, 146, 70, 0.3);
}

.ytx-option.is-selected-wrong {
    border-color: #cf3c4f;
}

body.light-mode .ytx-option.is-correct-answer {
    border-color: #1f8f43;
    box-shadow: 0 0 0 2px rgba(31, 143, 67, 0.18);
}

body.light-mode .ytx-option.is-selected-wrong {
    border-color: #d93045;
    box-shadow: 0 0 0 2px rgba(217, 48, 69, 0.14);
}

.ytx-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ytx-option label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.35;
}

.ytx-edit-correct-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 70px;
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(47, 146, 70, 0.16);
    color: #72d48a;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.ytx-option.is-edit-correct-answer {
    border-color: #2f9246;
    background: rgba(47, 146, 70, 0.12);
    box-shadow: 0 0 0 1px rgba(47, 146, 70, 0.26);
}

body.light-mode .ytx-edit-hint-badge {
    background: rgba(214, 31, 52, 0.12);
    color: #c6283d;
}

body.light-mode .ytx-edit-correct-tag {
    background: rgba(31, 143, 67, 0.14);
    color: #1f8f43;
}

body.light-mode .ytx-option.is-edit-correct-answer {
    border-color: #1f8f43;
    background: rgba(31, 143, 67, 0.1);
    box-shadow: 0 0 0 2px rgba(31, 143, 67, 0.14);
}

.ytx-option.is-edit-selectable,
.ytx-option.is-edit-selectable label {
    cursor: pointer;
}

.ytx-option.ytx-edit-static-option,
.ytx-option.ytx-edit-static-option label {
    cursor: default;
}

.ytx-option.ytx-edit-static-option:hover {
    transform: none;
}

.ytx-question-actions {
    grid-column: 1 / -1;
    margin-top: 2px;
}

.ytx-question-actions.ytx-mcq-edit-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ytx-empty-state-inline {
    min-height: 132px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ytx-mcq-add-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 132px;
    padding: 12px;
    border-radius: 18px;
    border: 1px dashed rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.02);
}

body.light-mode .ytx-mcq-add-card {
    border-color: rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.02);
}

.ytx-add-mcq-inline-btn {
    padding: 10px 14px;
    font-size: 0.92rem;
}

.ytx-inline-mcq-loading {
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.16);
    color: #b7b7b7;
    font-weight: 700;
    text-align: center;
}

body.light-mode .ytx-inline-mcq-loading {
    border-color: rgba(0, 0, 0, 0.12);
    color: #666;
}

.ytx-inline-mcq-editor-shell {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.ytx-inline-mcq-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
    transition: filter 0.2s ease, opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

body.light-mode .ytx-inline-mcq-card {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 22px rgba(22, 32, 52, 0.08);
}

.ytx-inline-mcq-card.saving {
    filter: blur(1.8px) saturate(0.82);
    opacity: 0.88;
    pointer-events: none;
}

.ytx-inline-mcq-card.is-deleting {
    animation: ytxInlineMcqDelete 0.24s ease forwards;
}

.ytx-inline-option-row.is-removing {
    animation: ytxInlineOptionRemove 0.22s ease forwards;
}

@keyframes ytxInlineMcqDelete {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
}

@keyframes ytxInlineOptionRemove {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
        max-height: 96px;
    }
    100% {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
        max-height: 0;
        margin: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
}

.ytx-inline-mcq-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ytx-inline-mcq-badge {
    display: none;
}

body.light-mode .ytx-inline-mcq-badge {
    background: rgba(214, 31, 52, 0.12);
    color: #c6283d;
}

.ytx-inline-mcq-top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.ytx-inline-mcq-mini-field {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-mode .ytx-inline-mcq-mini-field {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

.ytx-inline-mcq-mini-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9f9f9f;
}

.ytx-inline-mcq-delete-btn {
    position: static;
    opacity: 1;
    pointer-events: auto;
    flex-shrink: 0;
}

.ytx-inline-mcq-delete-btn.is-saving {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
}

.ytx-inline-mcq-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.ytx-inline-mcq-field label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #a5a5a5;
}

.ytx-inline-mcq-question-input,
.ytx-inline-mcq-hint-input,
.ytx-inline-option-input {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    color: inherit;
    font: inherit;
    line-height: 1.4;
    padding: 10px 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.light-mode .ytx-inline-mcq-question-input,
body.light-mode .ytx-inline-mcq-hint-input,
body.light-mode .ytx-inline-option-input {
    border-color: rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.92);
}

.ytx-inline-mcq-question-input:focus,
.ytx-inline-mcq-hint-input:focus,
.ytx-inline-option-input:focus {
    outline: none;
    border-color: rgba(229, 9, 20, 0.42);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.12);
}

.ytx-inline-mcq-question-input {
    min-height: 78px;
    resize: vertical;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    font-weight: 700;
    font-size: 0.96rem;
    line-height: 1.4;
}

.ytx-inline-mcq-hint-input {
    width: 84px;
    min-width: 84px;
    padding: 6px 10px;
    text-align: center;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
}

.ytx-inline-mcq-warning {
    margin: -2px 0 0;
    padding: 9px 11px;
    border-radius: 12px;
    background: rgba(255, 193, 7, 0.12);
    border: 1px solid rgba(255, 193, 7, 0.28);
    color: #f0ca55;
    font-size: 0.82rem;
    line-height: 1.4;
}

body.light-mode .ytx-inline-mcq-warning {
    background: rgba(255, 193, 7, 0.14);
    border-color: rgba(181, 121, 0, 0.22);
    color: #8a5a00;
}

.ytx-inline-mcq-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ytx-inline-option-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

body.light-mode .ytx-inline-option-row {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

.ytx-inline-option-row:hover {
    transform: translateX(4px);
    border-color: #808080;
}

.ytx-inline-option-row.is-edit-correct-answer:hover {
    transform: none;
}

.ytx-inline-option-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(229, 9, 20, 0.12);
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 800;
    flex-shrink: 0;
}

body.light-mode .ytx-inline-option-index {
    background: rgba(214, 31, 52, 0.12);
    color: #c6283d;
}

.ytx-inline-option-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.ytx-inline-option-tools {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
}

.ytx-inline-remove-option-btn {
    min-width: 0;
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
    font-size: 1.1rem;
    line-height: 1;
}

.ytx-inline-option-input {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    min-width: 0;
}

.ytx-inline-option-input:focus,
.ytx-inline-mcq-question-input:focus {
    border: none;
    background: transparent;
    box-shadow: none;
}

.ytx-inline-option-actions,
.ytx-inline-mcq-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 2px;
}

.ytx-inline-mcq-actions {
    grid-column: 1 / -1;
    padding-top: 4px;
}

.ytx-inline-mcq-editor-shell > .ytx-empty-state {
    grid-column: 1 / -1;
}

@media (max-width: 1280px) {
    .ytx-inline-mcq-editor-shell {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 780px) {
    .ytx-inline-mcq-editor-shell {
        grid-template-columns: 1fr;
    }

    .ytx-inline-option-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .ytx-inline-mcq-card-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .ytx-inline-mcq-top-actions {
        width: 100%;
        justify-content: space-between;
    }

    .ytx-inline-option-actions,
    .ytx-inline-mcq-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

.ytx-mcq-edit-actions {
    margin-top: 16px;
}

.ytx-mcq-modal-content {
    width: min(92vw, 760px);
    max-width: 760px;
    max-height: 82vh;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ytx-mcq-modal-content.is-saving .ytx-mcq-modal-head,
.ytx-mcq-modal-content.is-saving .ytx-mcq-modal-body {
    filter: blur(1.5px) saturate(0.88);
    opacity: 0.88;
    pointer-events: none;
}

.ytx-mcq-modal-head {
    flex-shrink: 0;
    padding: 24px 24px 0;
}

.ytx-mcq-modal-head h3 {
    margin-bottom: 20px;
}

.ytx-mcq-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0 24px 24px;
}

.ytx-mcq-inline-fields {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.ytx-mcq-question-group {
    flex: 1 1 auto;
    margin-bottom: 0;
}

.ytx-mcq-hint-group {
    flex: 0 0 180px;
    max-width: 180px;
    margin-bottom: 0;
}

#ytx-mcq-question-input {
    min-height: 52px;
}

.ytx-mcq-modal-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin-top: 0;
    padding: 16px 24px 24px;
    background: var(--container-bg-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-mode .ytx-mcq-modal-actions {
    background: var(--container-bg-light);
    border-top-color: rgba(0, 0, 0, 0.08);
}

.ytx-transcript-modal-content {
    width: min(94vw, 860px);
    max-width: 860px;
    max-height: 84vh;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ytx-transcript-modal-content.is-saving .ytx-transcript-modal-head,
.ytx-transcript-modal-content.is-saving .ytx-transcript-modal-body {
    filter: blur(1.5px) saturate(0.88);
    opacity: 0.88;
    pointer-events: none;
}

.ytx-transcript-modal-head {
    flex-shrink: 0;
    padding: 24px 24px 0;
}

.ytx-transcript-modal-head h3 {
    margin-bottom: 10px;
}

.ytx-transcript-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0 24px 24px;
}

.ytx-transcript-modal-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin-top: 0;
    padding: 16px 24px 24px;
    background: var(--container-bg-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-mode .ytx-transcript-modal-actions {
    background: var(--container-bg-light);
    border-top-color: rgba(0, 0, 0, 0.08);
}

.ytx-segment-timing-modal-content {
    width: min(92vw, 560px);
    max-width: 560px;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ytx-segment-timing-modal-content.is-saving .ytx-segment-timing-modal-head,
.ytx-segment-timing-modal-content.is-saving .ytx-segment-timing-modal-body {
    filter: blur(1.5px) saturate(0.88);
    opacity: 0.88;
    pointer-events: none;
}

.ytx-segment-timing-modal-head {
    flex-shrink: 0;
    padding: 24px 24px 0;
}

.ytx-segment-timing-modal-head h3 {
    margin-bottom: 10px;
}

.ytx-segment-timing-modal-body {
    padding: 0 24px 24px;
}

.ytx-segment-timing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ytx-segment-timing-modal-actions {
    margin-top: 0;
    padding: 16px 24px 24px;
    background: var(--container-bg-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-mode .ytx-segment-timing-modal-actions {
    background: var(--container-bg-light);
    border-top-color: rgba(0, 0, 0, 0.08);
}

.ytx-transcript-editor-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ytx-transcript-editor-row {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 14px;
    align-items: end;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-mode .ytx-transcript-editor-row {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

.ytx-transcript-editor-time-wrap,
.ytx-transcript-editor-input-wrap {
    min-width: 0;
}

.ytx-transcript-editor-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #a5a5a5;
}

.ytx-transcript-editor-time-input {
    width: 100%;
    min-height: 38px;
    text-align: center;
    font-weight: 800;
}

.ytx-transcript-editor-input {
    width: 100%;
    min-height: 38px;
}

.ytx-mcq-options-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ytx-mcq-helper-text {
    margin: 10px 0 0;
    color: #9c9c9c;
    font-size: 0.92rem;
}

body.light-mode .ytx-mcq-helper-text {
    color: #666;
}

.ytx-mcq-warning-text {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 193, 7, 0.12);
    border: 1px solid rgba(255, 193, 7, 0.28);
    color: #f2cb57;
    font-size: 0.9rem;
    line-height: 1.4;
}

body.light-mode .ytx-mcq-warning-text {
    background: rgba(255, 193, 7, 0.14);
    border-color: rgba(181, 121, 0, 0.22);
    color: #8a5a00;
}

.ytx-mcq-options-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
}

.ytx-mcq-add-option-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.ytx-mcq-option-editor {
    padding: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transform-origin: top center;
    max-height: 180px;
    opacity: 1;
    transform: translateY(0) scale(1);
    will-change: opacity, transform, max-height;
    transition:
        opacity 0.22s ease,
        transform 0.22s ease,
        max-height 0.22s ease,
        padding-top 0.22s ease,
        padding-bottom 0.22s ease,
        margin 0.22s ease,
        border-color 0.22s ease;
}

body.light-mode .ytx-mcq-option-editor {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

.ytx-mcq-option-editor.is-entering {
    animation: ytxMcqOptionEnter 0.24s ease;
}

.ytx-mcq-option-editor.is-animating,
.ytx-mcq-option-editor.is-removing {
    pointer-events: none;
}

@keyframes ytxMcqOptionEnter {
    0% {
        opacity: 0;
        transform: translateY(-12px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ytx-mcq-option-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    min-width: 0;
}

.ytx-mcq-option-label {
    font-weight: 700;
}

.ytx-mcq-correct-btn {
    min-width: 180px;
    justify-content: center;
}

.ytx-mcq-option-editor.is-selected-correct-answer {
    border-color: #2f9246;
    background: rgba(47, 146, 70, 0.12);
    box-shadow: 0 0 0 1px rgba(47, 146, 70, 0.24);
}

body.light-mode .ytx-mcq-option-editor.is-selected-correct-answer {
    border-color: #1f8f43;
    background: rgba(31, 143, 67, 0.1);
    box-shadow: 0 0 0 2px rgba(31, 143, 67, 0.14);
}

.ytx-mcq-correct-btn.is-selected {
    background-color: #2f9246;
}

.ytx-mcq-correct-btn.is-selected:hover {
    background-color: #277b3b;
}

.ytx-mcq-option-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ytx-mcq-option-input {
    flex: 1 1 auto;
    width: 100%;
}

.ytx-reset-button {
    display: none;
}

@keyframes ytxPulseCue {
    0% {
        transform: translateY(0);
        box-shadow: 0 0 0 1px rgba(229, 9, 20, 0.22), 0 0 12px 4px rgba(229, 9, 20, 0.24), 0 0 22px 8px rgba(229, 9, 20, 0.12);
    }
    35% {
        transform: translateY(-4px) scale(1.01);
        box-shadow: 0 0 0 2px rgba(229, 9, 20, 0.32), 0 0 26px 10px rgba(229, 9, 20, 0.46), 0 0 54px 18px rgba(229, 9, 20, 0.28);
    }
    100% {
        transform: translateY(0);
        box-shadow: 0 0 0 0 rgba(229, 9, 20, 0), 0 0 0 0 rgba(229, 9, 20, 0), 0 0 0 0 rgba(229, 9, 20, 0);
    }
}

@keyframes ytxEndFlash {
    0% {
        box-shadow: 0 0 0 0 rgba(229, 9, 20, 0.45);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(229, 9, 20, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(229, 9, 20, 0);
    }
}

@keyframes ytxHintReveal {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.82);
        box-shadow: 0 0 0 0 rgba(229, 9, 20, 0);
    }
    45% {
        opacity: 1;
        transform: translateY(-4px) scale(1.08);
        box-shadow: 0 0 0 4px rgba(229, 9, 20, 0.18), 0 0 22px 8px rgba(229, 9, 20, 0.24);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        box-shadow: 0 0 0 0 rgba(229, 9, 20, 0), 0 0 0 0 rgba(229, 9, 20, 0);
    }
}

@media (max-width: 1000px) {
    .ytx-video-instance.ytx-subtitles-off .ytx-player-transcript-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .ytx-video-instance.ytx-subtitles-off .ytx-transcript-column {
        display: none;
    }

    .ytx-section-header {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .ytx-player-transcript-grid,
    .ytx-overview-card {
        grid-template-columns: 1fr;
    }

    .ytx-player-shell {
        height: auto;
    }

    .ytx-player-target {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .ytx-section-meta-row,
    .ytx-transcript-pill-wrap {
        grid-column: auto;
    }

    .ytx-transcript-pill-wrap {
        flex-wrap: wrap;
    }

    .ytx-question-set {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .ytx-video-tab-header-row {
        justify-content: flex-start;
        margin-bottom: 20px;
    }

    .ytx-video-subtabs-inline {
        width: 100%;
        justify-content: flex-start;
    }

    .youtube-subtabs-wrapper {
        gap: 18px;
    }

    .youtube-subtabs-bar {
        gap: 10px;
        margin: 0 -4px;
        padding: 0 4px 6px;
    }

    .youtube-subtab-button {
        padding: 11px 15px;
        font-size: 0.95rem;
    }

    .ytx-overview-card,
    .ytx-player-shell,
    .ytx-transcript-column,
    .ytx-questions-block,
    .ytx-question-card {
        padding: 16px;
    }

    .ytx-player-shell {
        padding: 0;
    }

    .ytx-overview-details h3 {
        font-size: 1.5rem;
    }

    .ytx-question-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .ytx-transcript-scrollbox {
        height: 320px !important;
        max-height: 320px !important;
    }

    .ytx-question-set {
        grid-template-columns: 1fr;
    }

    .ytx-mcq-add-card {
        min-height: auto;
    }

    .ytx-mcq-options-header,
    .ytx-mcq-option-topline,
    .ytx-mcq-option-row {
        flex-direction: column;
        align-items: stretch;
    }

    .ytx-mcq-inline-fields {
        flex-direction: column;
        gap: 0;
    }

    .ytx-mcq-hint-group {
        flex: 1 1 auto;
        max-width: none;
    }

    .ytx-mcq-add-option-row {
        justify-content: stretch;
    }

    .ytx-mcq-modal-content {
        width: 94vw;
        max-height: 84vh;
    }

    .ytx-transcript-modal-content {
        width: 94vw;
        max-height: 84vh;
    }

    .ytx-segment-timing-modal-content {
        width: 94vw;
    }

    .ytx-mcq-modal-head {
        padding: 20px 20px 0;
    }

    .ytx-transcript-modal-head {
        padding: 20px 20px 0;
    }

    .ytx-segment-timing-modal-head {
        padding: 20px 20px 0;
    }

    .ytx-mcq-modal-body {
        padding: 0 20px 20px;
    }

    .ytx-transcript-modal-body {
        padding: 0 20px 20px;
    }

    .ytx-segment-timing-modal-body {
        padding: 0 20px 20px;
    }

    .ytx-mcq-modal-actions {
        padding: 14px 20px 20px;
    }

    .ytx-transcript-modal-actions {
        padding: 14px 20px 20px;
    }

    .ytx-segment-timing-modal-actions {
        padding: 14px 20px 20px;
    }

    .ytx-transcript-editor-row {
        grid-template-columns: 1fr;
    }

    .ytx-segment-timing-grid {
        grid-template-columns: 1fr;
    }
}
