/* ==========================================================================
   LIVE HQ
   Public Event Interface
   ========================================================================== */


/* ==========================================================================
   Page Foundation
   ========================================================================== */

.livehq-page {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0 48px;
}

.livehq-broadcast-shell {
    display: flex;
    flex-direction: column;
    gap: 24px;
}


/* ==========================================================================
   Shared Live HQ Cards
   ========================================================================== */

.livehq-card,
.livehq-current-seller,
.livehq-mission {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    padding: 24px;
    box-shadow:
        0 12px 30px rgba(0,0,0,.08);
}

.livehq-card h2,
.livehq-current-seller h2,
.livehq-mission h2 {
    margin-top: 0;
}

.livehq-card h3,
.livehq-current-seller h3,
.livehq-mission h3 {
    margin-bottom: 8px;
}


/* ==========================================================================
   Event Header
   ========================================================================== */

.livehq-event-header {
    text-align: center;
    padding: 16px 20px;
}

.livehq-event-header h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
}

.livehq-tagline {
    margin: 12px 0 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.livehq-description {
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.65;
}


/* ==========================================================================
   Broadcast Status
   ========================================================================== */

.livehq-status-row {
    display: flex;
    justify-content: center;
}

.livehq-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.12);
}

.livehq-status-off {
    background: #ececec;
    color: #222;
}

.livehq-status-on {
    background: #ffe4e4;
    color: #9b111e;
}

.livehq-status-intermission {
    background: #fff4c2;
    color: #725600;
}

.livehq-status-complete {
    background: #e4efff;
    color: #174a8b;
}

.livehq-status-on {
    animation: livehq-pulse 1.8s ease-in-out infinite;
}

@keyframes livehq-pulse {
    0%,
    100% {
        transform: scale(1);
        box-shadow:
            0 4px 12px rgba(0, 0, 0, 0.12);
    }

    50% {
        transform: scale(1.03);
        box-shadow:
            0 6px 18px rgba(0, 0, 0, 0.18);
    }
}

/* ==========================================================================
   Current Seller
   ========================================================================== */

.livehq-current-seller {
    text-align: center;
}

.livehq-current-seller img {
    display: block;
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    border-radius: 50%;
    object-fit: cover;
}

.livehq-current-seller h3 {
    font-size: 1.6rem;
}

#livehq-seller-username {

    font-size: 1rem;

    font-weight: 600;

    color: #7b46d3;

    margin-bottom: 18px;

}

#livehq-seller-description {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

#livehq-seller-link {
    display: inline-block;
    margin-top: 8px;
}


/* ==========================================================================
   Mission
   ========================================================================== */

.livehq-mission {
    padding: 30px;
}

.livehq-mission h2 {
    margin-bottom: 4px;
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.livehq-mission h3 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

#livehq-mission-description {
    margin-top: 0;
    font-size: 1.05rem;
}


/* ==========================================================================
   Mission Progress
   ========================================================================== */

.livehq-mission-progress {
    max-width: 700px;
    margin: 24px auto 12px;
}

#livehq-progress-bar {
    width: 100%;
    height: 24px;
    border: none;
    border-radius: 999px;
    overflow: hidden;
}

#livehq-progress-bar::-webkit-progress-bar {
    background: #e8e8e8;
    border-radius: 999px;
}

#livehq-progress-bar::-webkit-progress-value {
    background:
        linear-gradient(
            90deg,
            #7b46d3,
            #5bc58a
        );
    border-radius: 999px;
    transition: width 0.5s ease;
}

#livehq-progress-bar::-moz-progress-bar {
    background:
        linear-gradient(
            90deg,
            #7b46d3,
            #5bc58a
        );
    border-radius: 999px;
}

#livehq-progress-text {

    font-size: 1.4rem;

    font-weight: 700;

    text-align: center;

}


/* ==========================================================================
   Mission Links
   ========================================================================== */

#livehq-donation-link,
#livehq-mission-link,
#livehq-seller-link {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

#livehq-donation-link {
    background: #5bc58a;
    color: #111;
}

#livehq-mission-link,
#livehq-seller-link {
    background: #7b46d3;
    color: #fff;
}

#livehq-donation-link:hover,
#livehq-mission-link:hover,
#livehq-seller-link:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.16);
}


/* ==========================================================================
   Live Update Polish
   ========================================================================== */

.livehq-status-badge,
.livehq-current-seller,
.livehq-mission {
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


/* ==========================================================================
   Tablet
   ========================================================================== */

@media (max-width: 900px) {

    .livehq-page {
        width: min(100% - 24px, 900px);
        padding-top: 24px;
    }

    .livehq-card,
    .livehq-current-seller,
    .livehq-mission {
        padding: 20px;
    }
}


/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 600px) {

    .livehq-page {
        width: min(100% - 16px, 600px);
        padding-top: 16px;
        padding-bottom: 32px;
    }

    .livehq-broadcast-shell {
        gap: 16px;
    }

    .livehq-event-header {
        padding: 8px;
    }

    .livehq-event-header h1 {
        font-size: 2rem;
    }

    .livehq-tagline {
        font-size: 1rem;
    }

    .livehq-card,
    .livehq-current-seller,
    .livehq-mission {
        padding: 18px;
        border-radius: 14px;
    }

    .livehq-current-seller {

        text-align: center;

        position: sticky;

        top: 24px;

    }

    #livehq-progress-bar {
        height: 20px;
    }

    #livehq-donation-link,
    #livehq-mission-link,
    #livehq-seller-link {
        width: 100%;
        box-sizing: border-box;
    }
}


/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    .livehq-status-on {
        animation: none;
    }

    .livehq-status-badge,
    .livehq-current-seller,
    .livehq-mission,
    #livehq-donation-link,
    #livehq-mission-link,
    #livehq-seller-link {
        transition: none;
    }
}

/* ==========================================================
   Dashboard Layout
   ========================================================== */

.livehq-dashboard {
    display: grid;
    grid-template-columns:
        minmax(280px, 0.8fr)
        minmax(0, 1.5fr);
    gap: 24px;
    align-items: start;
    margin-top: 24px;
}

@media (max-width: 900px) {

    .livehq-dashboard {

        grid-template-columns: 1fr;

    }

}

/* ==========================================================================
   Live HQ Hero
   ========================================================================== */

.livehq-hero {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 40px 28px;
    border-radius: 22px;
    background:
        linear-gradient(
            135deg,
            rgba(123, 70, 211, 0.96),
            rgba(91, 197, 138, 0.92)
        );
    color: #fff;
    box-shadow:
        0 16px 36px rgba(0, 0, 0, 0.14);
}

.livehq-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at top right,
            rgba(255, 255, 255, 0.20),
            transparent 38%
        );
    pointer-events: none;
}

.livehq-hero > * {
    position: relative;
    z-index: 1;
}

.livehq-hero-eyebrow {
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.9;
}

.livehq-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 1.08;
}

.livehq-hero .livehq-tagline {
    max-width: 760px;
    margin: 14px auto 22px;
    font-size: 1.1rem;
    font-weight: 600;
}

.livehq-hero .livehq-status-row {
    margin-top: 18px;
}

.livehq-progress-summary {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 12px;
    text-align: left;
}

.livehq-progress-label {
    display: block;
    margin-bottom: 3px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.7;
}

#livehq-progress-raised {
    display: block;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1;
}

.livehq-progress-percent {
    font-size: 1.5rem;
    font-weight: 800;
}

#livehq-progress-text {
    margin: 10px 0 0;
    text-align: right;
    font-size: 1rem;
    font-weight: 600;
}

.livehq-current-seller h2 {

    margin-bottom: 8px;

    font-size: .9rem;

    letter-spacing: .12em;

    text-transform: uppercase;

    color: #666;

}

.livehq-current-seller h3 {

    margin: 0;

    font-size: clamp(1.8rem, 4vw, 2.4rem);

    font-weight: 800;

}

.livehq-label {

    margin-bottom: 4px;

    font-size: .8rem;

    font-weight: 700;

    letter-spacing: .08em;

    text-transform: uppercase;

    color: #777;

}

.livehq-seller-avatar {
    display: block;
    width: 112px;
    height: 112px;
    margin: 12px auto 16px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.14);
}

.livehq-current-seller h3 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2rem);
    font-weight: 800;
}

#livehq-seller-username {
    margin: 6px 0 20px;
    font-size: 1rem;
    font-weight: 600;
    color: #7b46d3;
}

.livehq-current-seller .livehq-label {
    margin: 0 0 6px;
}

#livehq-seller-segment {
    margin: 0 0 18px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* ==========================================================================
   Announcement
   ========================================================================== */

.livehq-announcement {
    width: 100%;
    margin: 0;
}

.livehq-announcement[hidden] {
    display: none;
}

.livehq-announcement-content {
    width: 100%;
    box-sizing: border-box;
    padding: 16px 20px;
    border: 2px solid #7b46d3;
    border-radius: 14px;
    background: #f7f2ff;
    text-align: center;
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.08);
}

.livehq-announcement-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

#livehq-announcement-message {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.5;
}


/* Information */

.livehq-announcement-content[data-type="INFO"] {
    border-color: #3b82f6;
    background: #eff6ff;
}

.livehq-announcement-content[data-type="INFO"]
.livehq-announcement-label {
    color: #2563eb;
}


/* Important */

.livehq-announcement-content[data-type="IMPORTANT"] {
    border-color: #7b46d3;
    background: #f7f2ff;
}

.livehq-announcement-content[data-type="IMPORTANT"]
.livehq-announcement-label {
    color: #7b46d3;
}


/* Success */

.livehq-announcement-content[data-type="SUCCESS"] {
    border-color: #22c55e;
    background: #f0fdf4;
}

.livehq-announcement-content[data-type="SUCCESS"]
.livehq-announcement-label {
    color: #15803d;
}


/* Warning */

.livehq-announcement-content[data-type="WARNING"] {
    border-color: #f59e0b;
    background: #fffbeb;
}

.livehq-announcement-content[data-type="WARNING"]
.livehq-announcement-label {
    color: #b45309;
}


/* Mobile */

@media (max-width: 600px) {

    .livehq-announcement-content {
        padding: 14px 16px;
        border-radius: 12px;
    }

    #livehq-announcement-message {
        font-size: 1rem;
    }
}

/* ==========================================================================
   Broadcast Player
   ========================================================================== */

.livehq-player {
    width: 100%;
}

.livehq-player-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 18px;
    background: #111;
    box-shadow:
        0 14px 34px rgba(0, 0, 0, 0.14);
}

.livehq-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.livehq-player-placeholder {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    box-sizing: border-box;
    padding: 32px;

    background:
        radial-gradient(
            circle at top right,
            rgba(123, 70, 211, 0.16),
            transparent 42%
        ),
        linear-gradient(
            135deg,
            #17131f,
            #0f1714
        );

    color: #fff;
    text-align: center;
}

.livehq-player-placeholder-content {
    max-width: 620px;
}

.livehq-player-placeholder-content h2 {
    margin: 0 0 10px;
    font-size: clamp(1.5rem, 4vw, 2.4rem);
}

.livehq-player-placeholder-content p {
    margin: 0;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.78);
}

.livehq-player-placeholder[hidden],
.livehq-video[hidden] {
    display: none;
}

@media (max-width: 600px) {

    .livehq-player-stage {
        border-radius: 14px;
    }

    .livehq-player-placeholder {
        padding: 20px;
    }

    .livehq-player-placeholder-content h2 {
        font-size: 1.35rem;
    }

    .livehq-player-placeholder-content p {
        font-size: 0.95rem;
    }
}

/* ==========================================================================
   Countdown Polish
   ========================================================================== */

.livehq-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 180px;
    text-align: center;
}

.livehq-countdown h2 {
    margin: 0 0 16px;
}

#livehq-countdown-segment {
    margin: 0 0 12px;

    font-size: 1rem;
    font-weight: 700;
    color: #666;
}

#livehq-countdown-time {
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    font-weight: 800;
    line-height: 1;

    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Up Next Polish
   ========================================================================== */

.livehq-up-next {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 180px;
    text-align: center;
}

.livehq-up-next h2 {
    margin: 0 0 16px;
}

#livehq-up-next-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#livehq-next-name {
    margin: 0 0 6px;

    font-size: 1.6rem;
    font-weight: 800;
}

#livehq-next-username {
    margin: 0;

    font-size: 1rem;
    font-weight: 700;
    color: #7b46d3;
}

#livehq-next-empty {
    margin: 0;

    font-size: 1rem;
    font-weight: 600;
    color: #777;
}

/* ==========================================================================
   Current Seller Polish
   ========================================================================== */

.livehq-current-seller {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 100%;
    text-align: center;
}

.livehq-current-seller h2 {
    margin: 0 0 16px;

    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: #666;
}

.livehq-current-seller h3 {
    margin: 0;

    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
}

#livehq-seller-username {
    margin: 6px 0 22px;

    font-weight: 700;
    color: #7b46d3;
}

.livehq-current-seller .livehq-label {
    margin: 0 0 6px;
}

#livehq-seller-segment {
    margin: 0 0 18px;

    font-size: 1.1rem;
    font-weight: 700;
}

#livehq-seller-description {
    margin: 0 0 22px;
    line-height: 1.6;
}

.livehq-current-seller .buy-btn {
    margin-top: auto;
}

/* ==========================================================================
   Current Mission Polish
   ========================================================================== */

.livehq-mission {
    display: flex;
    flex-direction: column;

    min-height: 100%;
    text-align: center;
}

.livehq-mission h2 {
    margin: 0 0 8px;

    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.livehq-mission h3 {
    margin: 0;

    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
}

#livehq-mission-description {
    max-width: 760px;
    margin: 6px auto 0;

    font-size: 1.05rem;
    line-height: 1.55;
}

.livehq-mission-progress {
    width: 100%;
    max-width: 760px;
    margin: 28px auto 18px;
}

.livehq-progress-summary {
    align-items: end;
}

#livehq-progress-raised {
    font-variant-numeric: tabular-nums;
}

#livehq-progress-percent {
    font-variant-numeric: tabular-nums;
}

.livehq-mission > p:last-of-type {
    margin-top: auto;
    margin-bottom: 0;
}

.livehq-start-broadcast {
    position: absolute;

    top: 50%;
    left: 50%;

    z-index: 5;

    transform: translate(-50%, -50%);

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    min-width: 260px;

    padding: 16px 24px;

    border: 2px solid rgba(255, 255, 255, 0.85);
    border-radius: 14px;

    background: rgba(0, 0, 0, 0.78);

    color: #fff;

    font-size: 1.05rem;
    font-weight: 800;

    cursor: pointer;

    backdrop-filter: blur(5px);
}

.livehq-start-broadcast:hover {
    transform:
        translate(-50%, -50%)
        scale(1.03);
}

.livehq-start-broadcast[hidden] {
    display: none;
}

@media (max-width: 600px) {

    .livehq-start-broadcast {
        width: calc(100% - 40px);
        min-width: 0;

        padding: 14px 18px;
    }
}