.calendar-page {
    width: 100%;
}

.calendar-container {
    width: calc(100% - 48px);
    max-width: 1900px;
    margin: 0 auto;
    padding: 50px 0 90px;
}

.calendar-eyebrow {
    display: block;
    color: #9b6cff;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1.6px;
}

.calendar-heading h1 {
    margin: 8px 0 0;
    color: #ffffff;
    font-size: clamp(46px, 5vw, 68px);
    line-height: 1;
    letter-spacing: -2.3px;
}

.calendar-heading p {
    margin: 11px 0 0;
    color: #8290a0;
    font-size: 16px;
}

.calendar-stats {
    margin-top: 32px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.calendar-stats article {
    min-height: 175px;
    padding: 21px;
    display: flex;
    flex-direction: column;
    background: #101720;
    border: 1px solid #26313f;
    border-radius: 14px;
}

.calendar-stat-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.12);
    border-radius: 10px;
    color: #9b6cff;
    font-size: 17px;
}

.calendar-stats article>span {
    margin-top: auto;
    color: #8290a0;
    font-size: 13px;
}

.calendar-stats article>strong {
    margin-top: 5px;
    color: #ffffff;
    font-size: 29px;
}

.calendar-stats article>small {
    margin-top: 3px;
    color: #6d7a8a;
    font-size: 10px;
}

.calendar-tools {
    margin-top: 35px;
    padding: 15px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 15px;
    background: #101720;
    border: 1px solid #26313f;
    border-radius: 14px;
}

.calendar-search {
    position: relative;
}

.calendar-search>i {
    position: absolute;
    top: 50%;
    left: 17px;
    transform: translateY(-50%);
    color: #718092;
    pointer-events: none;
}

.calendar-search input {
    width: 100%;
    height: 52px;
    padding: 0 50px 0 46px;
    outline: 0;
    background: #0a1016;
    border: 1px solid #293542;
    border-radius: 9px;
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
}

.calendar-search input:focus {
    border-color: #8b5cf6;
}

.calendar-search button {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 32px;
    height: 32px;
    display: none;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: #778596;
    cursor: pointer;
}

.calendar-search button.visible {
    display: flex;
}

.calendar-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-navigation a {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a1016;
    border: 1px solid #293542;
    border-radius: 9px;
    color: #9b6cff;
    text-decoration: none;
}

.calendar-navigation strong {
    min-width: 180px;
    color: #ffffff;
    font-size: 14px;
    text-align: center;
}

.calendar-result-line {
    min-height: 48px;
    display: flex;
    align-items: center;
}

.calendar-result-line span {
    color: #788596;
    font-size: 13px;
    font-weight: 700;
}

.calendar-month {
    overflow: hidden;
    background: #101720;
    border: 1px solid #26313f;
    border-radius: 14px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    background: #0c131b;
    border-bottom: 1px solid #26313f;
}

.calendar-weekdays span {
    padding: 12px;
    color: #748293;
    font-size: 10px;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-cell {
    min-width: 0;
    min-height: 145px;
    padding: 9px;
    background: #101720;
    border-right: 1px solid #202a35;
    border-bottom: 1px solid #202a35;
}

.calendar-cell:nth-child(7n) {
    border-right: 0;
}

.calendar-cell.outside {
    opacity: 0.32;
}

.calendar-cell.today {
    background: rgba(139, 92, 246, 0.07);
    box-shadow: inset 0 0 0 1px #8b5cf6;
}

.calendar-cell.filtered-empty {
    opacity: 0.25;
}

.calendar-cell-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.calendar-cell-head>span {
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.calendar-cell-head strong {
    color: #9b6cff;
    font-size: 7px;
    text-transform: uppercase;
}

.calendar-cell-content {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.calendar-entry {
    position: relative;
    width: 100%;
    min-width: 0;
    padding: 7px 8px;
    display: block;
    overflow: hidden;
    background: #0b1219;
    border: 1px solid #27323f;
    border-radius: 6px;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.calendar-entry:hover {
    border-color: #8b5cf6;
    background: #121a24;
}

.calendar-entry strong {
    display: block;
    overflow: hidden;
    color: #ffffff;
    font-size: 10px;
    line-height: 1.3;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.calendar-entry span {
    margin-top: 2px;
    display: block;
    color: #788596;
    font-size: 8px;
}

.calendar-entry.batch {
    padding-right: 28px;
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.25);
}

.calendar-entry.batch i {
    position: absolute;
    top: 50%;
    right: 9px;
    transform: translateY(-50%);
    color: #9b6cff;
    font-size: 10px;
}

.calendar-details {
    margin-top: 18px;
}

.calendar-detail {
    padding: 22px;
    display: none;
    background: #101720;
    border: 1px solid #2b3744;
    border-radius: 14px;
}

.calendar-detail.active {
    display: block;
}

.calendar-detail-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.calendar-detail-head h2 {
    margin: 6px 0 0;
    color: #ffffff;
    font-size: 27px;
}

.calendar-detail-head p {
    margin: 5px 0 0;
    color: #7d8a9a;
    font-size: 12px;
}

.calendar-detail-close {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    background: #0b1219;
    border: 1px solid #293542;
    border-radius: 7px;
    color: #8794a4;
    cursor: pointer;
}

.calendar-detail-close:hover {
    color: #ffffff;
    border-color: #8b5cf6;
}

.calendar-detail-episodes {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax(260px, 1fr));
    gap: 9px;
}

.calendar-detail-episode {
    min-width: 0;
    padding: 8px;
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    background: #0b1219;
    border: 1px solid #27323f;
    border-radius: 8px;
}

.calendar-detail-image {
    width: 105px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #080d12;
    border-radius: 5px;
}

.calendar-detail-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.calendar-detail-episode strong {
    display: block;
    color: #ffffff;
    font-size: 11px;
    line-height: 1.4;
}

.calendar-detail-episode span {
    margin-top: 3px;
    display: block;
    color: #738091;
    font-size: 9px;
}

.calendar-empty {
    min-height: 260px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.calendar-empty.visible {
    display: flex;
}

.calendar-empty i {
    color: #8b5cf6;
    font-size: 30px;
}

.calendar-empty strong {
    color: #ffffff;
    font-size: 20px;
}

.calendar-empty span {
    color: #788596;
    font-size: 12px;
}

@media (max-width: 1100px) {
    .calendar-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .calendar-tools {
        grid-template-columns: 1fr;
    }
    .calendar-navigation {
        justify-content: flex-end;
    }
    .calendar-month {
        overflow-x: auto;
    }
    .calendar-weekdays,
    .calendar-grid {
        min-width: 900px;
    }
}

@media (max-width: 650px) {
    .calendar-container {
        width: calc(100% - 24px);
        padding: 35px 0 60px;
    }
    .calendar-heading h1 {
        font-size: 42px;
    }
    .calendar-stats {
        grid-template-columns: 1fr 1fr;
    }
    .calendar-navigation {
        justify-content: space-between;
    }
    .calendar-navigation strong {
        min-width: 0;
    }
    .calendar-detail-episodes {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 450px) {
    .calendar-stats {
        grid-template-columns: 1fr;
    }
}