* {
    box-sizing: border-box;
}

body {
    background: #0d1117;
    color: #f0f6fc;
}

body.modal-open {
    overflow: hidden;
}

.mcu-page {
    width: min(1250px, calc(100% - 30px));
    margin: 40px auto 80px;
}

.mcu-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 30px;
}

.mcu-kicker,
.cycle-label {
    display: block;
    margin-bottom: 5px;
    color: #58a6ff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.mcu-hero h1 {
    margin: 0;
    color: #f0f6fc;
    font-size: 2.2rem;
}

.mcu-hero p {
    margin: 7px 0 0;
    color: #8b949e;
    font-size: 0.9rem;
}

.cycle-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cycle-switcher>span {
    color: #8b949e;
    font-size: 0.78rem;
}

.cycle-switcher select {
    height: 38px;
    padding: 0 35px 0 12px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
    outline: none;
    color: #f0f6fc;
    font: inherit;
    font-size: 0.8rem;
}

.mcu-message {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
    padding: 11px 14px;
    border: 1px solid;
    border-radius: 7px;
    font-size: 0.82rem;
}

.mcu-message.success {
    background: rgba(46, 160, 67, 0.1);
    border-color: rgba(46, 160, 67, 0.35);
    color: #56d364;
}

.mcu-message.error {
    background: rgba(248, 81, 73, 0.1);
    border-color: rgba(248, 81, 73, 0.35);
    color: #ff7b72;
}

.start-cycle {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 25px;
    padding: 35px;
    background: #161b22;
    border: 1px solid #21262d;
    border-radius: 12px;
}

.start-cycle-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(31, 111, 235, 0.12);
    border: 1px solid rgba(56, 139, 253, 0.25);
    border-radius: 50%;
    color: #58a6ff;
    font-size: 1.5rem;
}

.start-cycle-content h2 {
    margin: 0;
    color: #f0f6fc;
    font-size: 1.4rem;
}

.start-cycle-content>p {
    margin: 8px 0 25px;
    color: #8b949e;
    font-size: 0.85rem;
}

.start-cycle-content>p strong {
    color: #c9d1d9;
}

.objective-field {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.objective-field label {
    color: #c9d1d9;
    font-size: 0.8rem;
    font-weight: 600;
}

.objective-field label span {
    margin-left: 5px;
    color: #6e7681;
    font-size: 0.68rem;
    font-weight: 400;
}

.objective-field select,
.objective-modal-field select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    outline: none;
    color: #f0f6fc;
    font: inherit;
    font-size: 0.8rem;
}

.objective-field select:focus,
.objective-modal-field select:focus {
    border-color: #58a6ff;
}

.objective-field small {
    color: #6e7681;
    font-size: 0.7rem;
}

.start-cycle-button {
    min-height: 41px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 0 17px;
    background: #238636;
    border: 1px solid #2ea043;
    border-radius: 6px;
    color: #ffffff;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.start-cycle-button:hover {
    background: #2ea043;
}

.start-cycle-button:disabled {
    opacity: 0.4;
    cursor: default;
}

.cycle-overview {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.cycle-main-card,
.objective-card,
.add-objective-card {
    width: 100%;
    background: #161b22;
    border: 1px solid #21262d;
    border-radius: 10px;
}

.cycle-main-card {
    padding: 20px;
}

.cycle-main-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.cycle-main-top h2 {
    margin: 0;
    color: #f0f6fc;
    font-size: 1.15rem;
}

.progress-percent {
    color: #58a6ff;
    font-size: 1.5rem;
}

.progress-bar {
    height: 7px;
    overflow: hidden;
    margin: 18px 0;
    background: #21262d;
    border-radius: 20px;
}

.progress-bar span {
    display: block;
    height: 100%;
    background: #238636;
    border-radius: inherit;
}

.cycle-stats {
    display: flex;
    gap: 30px;
}

.cycle-stats>div {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.cycle-stats strong {
    color: #f0f6fc;
    font-size: 1rem;
}

.cycle-stats span {
    color: #8b949e;
    font-size: 0.7rem;
}

.objective-card {
    padding: 16px 22px;
}

.objective-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.objective-card-header>span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #d29922;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.edit-objective {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 5px;
    color: #8b949e;
    cursor: pointer;
}

.edit-objective:hover {
    background: #21262d;
    color: #f0f6fc;
}

.objective-card>strong {
    display: block;
    overflow: hidden;
    color: #f0f6fc;
    font-size: 0.9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.objective-position {
    display: block;
    margin-top: 2px;
    color: #8b949e;
    font-size: 0.7rem;
}

.objective-countdown {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #21262d;
}

.objective-countdown span {
    color: #8b949e;
    font-size: 0.7rem;
}

.objective-countdown strong {
    color: #d29922;
    font-size: 0.9rem;
}

.objective-countdown.available strong {
    color: #56d364;
}

.objective-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #21262d;
}

.objective-stats>div {
    min-width: 0;
    padding: 0 22px;
    background: transparent;
    border: 0;
    border-right: 1px solid #21262d;
    border-radius: 0;
}

.objective-stats>div:first-child {
    padding-left: 0;
}

.objective-stats>div:last-child {
    padding-right: 0;
    border-right: 0;
}

.objective-stats strong {
    display: block;
    margin-bottom: 3px;
    color: #f0f6fc;
    font-size: 0.9rem;
    font-weight: 600;
}

.objective-stats span {
    display: block;
    color: #8b949e;
    font-size: 0.65rem;
    line-height: 1.3;
}

.objective-reached {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #21262d;
    color: #56d364;
    font-size: 0.75rem;
    font-weight: 600;
}

.add-objective-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 90px;
    padding: 20px;
    color: #8b949e;
    text-align: left;
    cursor: pointer;
}

.add-objective-card>i {
    color: #d29922;
    font-size: 1.3rem;
}

.add-objective-card span {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.add-objective-card strong {
    color: #c9d1d9;
    font-size: 0.82rem;
}

.add-objective-card small {
    color: #6e7681;
    font-size: 0.68rem;
}

.next-film {
    margin-bottom: 35px;
}

.next-film-label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    color: #8b949e;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
}

.next-film-card {
    display: grid;
    grid-template-columns: 75px minmax(0, 1fr) auto;
    align-items: center;
    gap: 17px;
    padding: 12px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 9px;
}

.next-film-poster {
    width: 75px;
    height: 105px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d1117;
    border-radius: 5px;
    color: #484f58;
}

.next-film-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.next-film-info>span {
    color: #58a6ff;
    font-size: 0.68rem;
    font-weight: 700;
}

.next-film-info h2 {
    margin: 4px 0 7px;
    color: #f0f6fc;
    font-size: 1.2rem;
}

.next-film-meta {
    display: flex;
    align-items: center;
    color: #8b949e;
    font-size: 0.7rem;
}

.next-film-meta span:not(:last-child)::after {
    content: "•";
    margin: 0 7px;
    color: #484f58;
}

.next-film-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.next-film-actions form {
    margin: 0;
}

.watch-button,
.skip-button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 13px;
    border-radius: 6px;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
}

.watch-button {
    background: #238636;
    border: 1px solid #2ea043;
    color: #ffffff;
}

.watch-button:hover {
    background: #2ea043;
}

.skip-button {
    background: #21262d;
    border: 1px solid #30363d;
    color: #c9d1d9;
    cursor: pointer;
}

.skip-button:hover {
    background: #30363d;
}

.mcu-order-section {
    margin-top: 15px;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 13px;
}

.section-header h2 {
    margin: 0;
    color: #f0f6fc;
    font-size: 1.2rem;
}

.section-header>span {
    color: #8b949e;
    font-size: 0.75rem;
}

.mcu-films {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mcu-film {
    display: grid;
    grid-template-columns: 48px 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding: 7px 12px;
    background: #161b22;
    border: 1px solid #21262d;
    border-radius: 7px;
}

.mcu-film.watched {
    opacity: 0.6;
}

.film-position {
    color: #6e7681;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
}

.film-poster {
    position: relative;
    width: 48px;
    height: 64px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d1117;
    border-radius: 4px;
    color: #484f58;
}

.film-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.watched-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 17, 23, 0.72);
    color: #56d364;
    font-size: 1.2rem;
}

.film-info {
    min-width: 0;
}

.film-info>strong {
    display: block;
    overflow: hidden;
    color: #f0f6fc;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.film-info>div {
    display: flex;
    align-items: center;
    margin-top: 5px;
    color: #8b949e;
    font-size: 0.66rem;
}

.film-info>div span:not(:last-child)::after {
    content: "•";
    margin: 0 6px;
    color: #484f58;
}

.film-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.film-status form {
    margin: 0;
}

.status-watched {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #56d364;
    font-size: 0.72rem;
    font-weight: 600;
}

.small-watch-button {
    padding: 7px 10px;
    background: rgba(46, 160, 67, 0.1);
    border: 1px solid rgba(46, 160, 67, 0.3);
    border-radius: 5px;
    color: #56d364;
    font-size: 0.68rem;
    font-weight: 600;
    text-decoration: none;
}

.small-watch-button:hover {
    background: rgba(46, 160, 67, 0.18);
}

.small-skip-button {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: 1px solid #30363d;
    border-radius: 5px;
    color: #8b949e;
    cursor: pointer;
}

.small-skip-button:hover {
    background: #21262d;
    color: #f0f6fc;
}

.objective-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(1, 4, 9, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: 0.2s ease;
}

.objective-modal.visible {
    opacity: 1;
    visibility: visible;
}

.objective-modal-box {
    width: min(500px, 100%);
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 10px;
}

.objective-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 17px 18px;
    border-bottom: 1px solid #21262d;
}

.objective-modal-header h2 {
    margin: 0;
    color: #f0f6fc;
    font-size: 1.05rem;
}

.objective-modal-header>button {
    width: 30px;
    height: 30px;
    background: transparent;
    border: 0;
    border-radius: 5px;
    color: #8b949e;
    cursor: pointer;
}

.objective-modal-header>button:hover {
    background: #21262d;
    color: #f0f6fc;
}

.objective-modal-field {
    padding: 18px;
}

.objective-modal-field label {
    display: block;
    margin-bottom: 7px;
    color: #c9d1d9;
    font-size: 0.75rem;
    font-weight: 600;
}

.objective-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 18px;
    border-top: 1px solid #21262d;
}

.modal-cancel,
.modal-save {
    min-height: 37px;
    padding: 0 13px;
    border-radius: 6px;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
}

.modal-cancel {
    background: #21262d;
    border: 1px solid #30363d;
    color: #c9d1d9;
}

.modal-save {
    background: #238636;
    border: 1px solid #2ea043;
    color: #ffffff;
}

@media (max-width: 800px) {
    .next-film-card {
        grid-template-columns: 65px minmax(0, 1fr);
    }
    .next-film-poster {
        width: 65px;
        height: 91px;
    }
    .next-film-actions {
        grid-column: 1 / -1;
    }
    .objective-stats {
        grid-template-columns: 1fr 1fr;
        row-gap: 16px;
    }
    .objective-stats>div {
        padding: 0 15px;
    }
    .objective-stats>div:nth-child(2) {
        padding-right: 0;
        border-right: 0;
    }
    .objective-stats>div:nth-child(3) {
        padding-left: 0;
    }
}

@media (max-width: 600px) {
    .mcu-page {
        width: calc(100% - 20px);
        margin-top: 25px;
    }
    .mcu-hero {
        align-items: flex-start;
        flex-direction: column;
    }
    .mcu-hero h1 {
        font-size: 1.8rem;
    }
    .cycle-switcher {
        width: 100%;
    }
    .cycle-switcher select {
        flex: 1;
    }
    .start-cycle {
        grid-template-columns: 1fr;
        padding: 22px;
    }
    .start-cycle-icon {
        width: 60px;
        height: 60px;
    }
    .cycle-main-card {
        padding: 16px;
    }
    .cycle-stats {
        justify-content: space-between;
        gap: 10px;
    }
    .cycle-stats>div {
        align-items: flex-start;
        flex-direction: column;
        gap: 1px;
    }
    .objective-card {
        padding: 15px 16px;
    }
    .objective-countdown {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }
    .objective-stats {
        grid-template-columns: 1fr 1fr;
        column-gap: 0;
        row-gap: 16px;
    }
    .objective-stats>div {
        padding: 0 12px;
    }
    .objective-stats>div:nth-child(odd) {
        padding-left: 0;
    }
    .objective-stats>div:nth-child(even) {
        padding-right: 0;
        border-right: 0;
    }
    .next-film-actions {
        display: grid;
        grid-template-columns: 1fr auto;
    }
    .watch-button {
        width: 100%;
    }
    .mcu-film {
        grid-template-columns: 30px 42px minmax(0, 1fr);
        gap: 8px;
        padding: 6px;
    }
    .film-poster {
        width: 42px;
        height: 57px;
    }
    .film-status {
        grid-column: 1 / -1;
        justify-content: flex-end;
        padding: 6px 3px 2px;
        border-top: 1px solid #21262d;
    }
}