/* --- HOMEPAGE MAKEOVER --- */

.homepage-shell {
    width: min(1440px, calc(100% - 32px));
    margin: 0 auto;
}

.homepage-hero {
    position: relative;
    min-height: clamp(560px, 78vh, 760px);
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #111;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.homepage-hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    z-index: 0;
}

.homepage-hero-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, rgba(5, 5, 8, 0.88) 0%, rgba(5, 5, 8, 0.58) 45%, rgba(5, 5, 8, 0.18) 100%),
        linear-gradient(0deg, rgba(5, 5, 8, 0.72) 0%, transparent 46%);
}

.homepage-hero-load-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: #050508;
    pointer-events: none;
    animation: homepage-hero-cover-fade 0.9s ease 0.35s forwards;
}

@keyframes homepage-hero-cover-fade {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.homepage-hero-content {
    position: relative;
    z-index: 3;
    min-height: inherit;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
    align-content: end;
    gap: 28px;
    padding: clamp(28px, 5vw, 64px);
    box-sizing: border-box;
}

.homepage-logo-lockup {
    width: fit-content;
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    line-height: 1;
}

.banner-logo {
    width: min(620px, 68vw);
    height: auto;
    display: block;
    padding: 0;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.36));
}

.dark-logo { display: none; }
html.dark-mode .light-logo { display: none; }
html.dark-mode .dark-logo { display: block; }

.homepage-hero-copy {
    width: fit-content;
    max-width: 760px;
    color: #fff;
    transform: translateY(22px);
}

.homepage-kicker,
.section-heading p,
.profile-section-label {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    font-weight: 900;
    color: #8fd8ff;
}

.homepage-hero-copy .homepage-kicker {
    text-align: center;
}

.homepage-hero-copy h1 {
    margin: 0;
    color: #fff;
    letter-spacing: 0;
}

.homepage-tagline {
    max-width: 660px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(1.05rem, 2vw, 1.45rem);
    font-weight: 800;
    line-height: 1.35;
}

.homepage-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.announcement-card {
    align-self: end;
    margin: 0;
    padding: 22px;
    border-radius: 8px;
    background: rgba(12, 15, 24, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(14px);
    color: #fff;
}

.announcement-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.announcement-header h3 {
    margin: 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.72);
}

.announcement-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent-pink);
    color: #fff;
    font-weight: 900;
}

.announcement-header .admin-edit-button {
    margin-left: auto;
}

#announcement-text {
    margin: 0;
    font-size: clamp(1.05rem, 1.5vw, 1.3rem);
    line-height: 1.35;
    font-weight: 900;
}

#announcement-textarea,
#bio-textarea {
    width: 100%;
    min-height: 92px;
    box-sizing: border-box;
    resize: vertical;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    padding: 12px;
    font: inherit;
}

.homepage-layout {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 24px;
    margin: 24px 0;
}

.left-column {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.profile-card,
.media-showcase,
.featured-video-section,
.homepage-quick-links {
    border-radius: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 14px 40px var(--shadow-color);
}

.profile-card {
    overflow: hidden;
}

.profile-avatar-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #111;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-content {
    padding: 22px;
}

.bio {
    margin: 0;
    font-size: 1rem;
    line-height: 1.55;
    font-weight: 700;
}

.bio-editor {
    display: none;
    margin-top: 14px;
}

.bio-edit-controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}

.social-links {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 0 16px 18px;
}

.social-links a {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.social-links a:hover {
    transform: translateY(-2px);
    border-color: var(--accent-pink);
}

.social-links img {
    width: 54%;
    height: 54%;
    object-fit: contain;
}

.homepage-quick-links {
    display: grid;
    padding: 8px;
}

.homepage-quick-links a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 15px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.homepage-quick-links a:last-child {
    border-bottom: none;
}

.homepage-quick-links a:hover {
    background: rgba(255, 105, 180, 0.1);
}

.homepage-quick-links span {
    font-weight: 900;
    color: var(--accent-pink);
}

.homepage-quick-links strong {
    font-size: 0.88rem;
    opacity: 0.72;
}

.media-showcase,
.featured-video-section {
    padding: clamp(18px, 3vw, 28px);
    min-width: 0;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 0;
    font-family: Georgia, serif;
    font-size: clamp(1.8rem, 3.5vw, 3.2rem);
    line-height: 1;
    color: var(--text-color);
}

#right-column-content {
    min-width: 0;
}

#right-column-content.swiper {
    width: 100%;
    height: clamp(520px, 52vw, 760px);
    min-height: 0;
    opacity: 1;
}

#right-column-content:not(.swiper) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.swiper-wrapper {
    align-items: stretch;
    height: 100%;
}

.swiper-slide {
    height: 100%;
    display: flex;
}

.swiper-slide .media-card {
    width: 100%;
    height: 100%;
    min-height: 0;
}

.swiper-pagination {
    position: absolute !important;
    bottom: 14px !important;
}

.swiper-pagination-bullet {
    background: #fff !important;
    opacity: 0.45 !important;
}

.swiper-pagination-bullet-active {
    background: var(--accent-pink) !important;
    opacity: 1 !important;
}

.swiper-button-prev,
.swiper-button-next {
    color: #fff !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.46);
}

.media-card {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 320px;
    overflow: hidden;
    border-radius: 8px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
}

.media-card.youtube-card {
    padding: 0 !important;
}

.media-card > a,
.media-card > h2 {
    position: absolute;
    left: 18px;
    top: 16px;
    z-index: 4;
    text-decoration: none;
    transform: none;
}

.media-card h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    line-height: 1.1;
    transform: none;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.74);
}

#right-column-content.swiper .media-card > a,
#right-column-content.swiper .media-card > h2 {
    display: none;
}

.media-card > div {
    grid-row: 1 / -1;
    height: 100%;
    min-height: 0;
}

.homepage-video-card {
    position: relative;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    border-radius: inherit;
    background: #000;
    color: #fff;
    isolation: isolate;
}

.homepage-video-media,
.homepage-video-scrim,
.homepage-video-hit-area {
    position: absolute;
    inset: 0;
}

.homepage-video-media {
    z-index: 1;
}

.homepage-video-image,
.homepage-video-embed {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}

.homepage-video-image {
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.homepage-video-card:hover .homepage-video-image {
    filter: saturate(1.08) contrast(1.04);
    transform: scale(1.055);
}

.homepage-video-scrim {
    z-index: 2;
    background:
        linear-gradient(rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.58)),
        linear-gradient(180deg, rgba(0, 0, 0, 0.36) 0%, rgba(0, 0, 0, 0.08) 46%, rgba(0, 0, 0, 0.54) 100%);
    pointer-events: none;
}

.homepage-video-hit-area {
    z-index: 3;
    display: block;
}

.homepage-video-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    transform: translate(-50%, -50%);
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: rgba(233, 122, 155, 0.94);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.38), 0 0 0 8px rgba(255, 255, 255, 0.08);
    pointer-events: none;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.homepage-video-card:hover .homepage-video-play {
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.46), 0 0 0 11px rgba(255, 255, 255, 0.1);
}

.homepage-video-play::before {
    content: '';
    position: absolute;
    left: 25px;
    top: 18px;
    border-left: 19px solid #fff;
    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
}

.homepage-video-play--twitch {
    background: rgba(145, 70, 255, 0.92);
}

.homepage-video-destination {
    position: absolute;
    z-index: 5;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(10, 10, 14, 0.62);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    line-height: 1;
    opacity: 0.88;
    pointer-events: none;
    text-transform: uppercase;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.homepage-video-card:hover .homepage-video-destination {
    opacity: 1;
    background: rgba(10, 10, 14, 0.78);
    transform: translateY(-2px);
}

.homepage-video-destination--youtube {
    border-color: rgba(255, 80, 80, 0.34);
}

.homepage-video-destination--twitch {
    border-color: rgba(170, 116, 255, 0.42);
}

.homepage-video-external {
    font-size: 0.86rem;
    line-height: 1;
}

.homepage-video-content {
    position: absolute;
    z-index: 5;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    max-width: min(78%, 430px);
    color: #fff;
    pointer-events: none;
}

.homepage-video-content--no-icon {
    grid-template-columns: 1fr;
}

.homepage-video-channel-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.82);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.32);
}

.homepage-video-title {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.86);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.homepage-video-channel {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.82rem;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.74);
}

.featured-video-section {
    margin: 0 0 28px;
}

#youtube-grid-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

#youtube-grid-container .homepage-video-card {
    min-height: 0;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
}

#youtube-grid-container .homepage-video-content {
    left: 16px;
    right: 16px;
    bottom: 16px;
    grid-template-columns: 40px minmax(0, 1fr);
    max-width: calc(100% - 32px);
}

#youtube-grid-container .homepage-video-channel-icon {
    width: 40px;
    height: 40px;
}

#youtube-grid-container .homepage-video-title {
    font-size: 0.86rem;
}

#youtube-grid-container .homepage-video-play {
    width: 54px;
    height: 54px;
}

#youtube-grid-container .homepage-video-play::before {
    left: 22px;
    top: 16px;
    border-left-width: 16px;
    border-top-width: 11px;
    border-bottom-width: 11px;
}

#mini-stream-container {
    border-radius: 8px;
    overflow: hidden;
}

@media (max-width: 1062px) {
    .homepage-shell {
        width: 100%;
    }

    .homepage-hero {
        min-height: 680px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .homepage-hero-content {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 26px 18px;
    }

    .homepage-hero-actions {
        margin-bottom: 18px;
    }

    .homepage-hero-shade {
        background: linear-gradient(0deg, rgba(5, 5, 8, 0.9) 0%, rgba(5, 5, 8, 0.48) 100%);
    }

    .homepage-layout {
        grid-template-columns: 1fr;
        margin: 18px 0;
        gap: 18px;
    }

    .left-column,
    .media-showcase,
    .featured-video-section {
        width: 100%;
        box-sizing: border-box;
    }

    .profile-card,
    .media-showcase,
    .featured-video-section,
    .homepage-quick-links {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    #right-column-content:not(.swiper) {
        grid-template-columns: 1fr;
    }

    .media-card {
        min-height: 280px;
    }

    .homepage-video-card {
        min-height: 280px;
    }

    #youtube-grid-container {
        grid-template-columns: 1fr;
    }

    .section-heading {
        display: block;
    }
}

@media (max-width: 560px) {
    .homepage-hero {
        min-height: 720px;
    }

    .homepage-hero-actions {
        display: grid;
    }

    .banner-logo {
        width: min(520px, 86vw);
    }

    .homepage-quick-links {
        grid-template-columns: 1fr;
    }
}
