/* Activity Menu Pill Styles */
.activity-menu-item {
    padding: 0 !important;
    align-items: center;
}

.activity-menu-item .activity-pill {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex: 1 1 auto;
    min-height: 32px;
    padding: 0.2rem 0.68rem;
    border-radius: 10px;
    overflow: hidden;
    color: #fff;
    background: rgba(18, 22, 32, 0.82);
    box-shadow: 0 3px 9px rgba(9, 12, 20, 0.2);
    transition: box-shadow 0.25s ease, transform 0.25s ease, background 0.25s ease;
    overflow: hidden;
}

.activity-menu-item .activity-pill > * {
    position: relative;
    z-index: 1;
}

.activity-menu-item .activity-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: saturate(1.2);
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 0.25s ease;
}

.activity-menu-item .activity-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(12, 20, 34, 0.58), rgba(33, 133, 208, 0.32));
    opacity: 0.82;
    z-index: 0;
    transition: background 0.25s ease, opacity 0.25s ease;
}

.activity-menu-item .activity-badge {
    display: none;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    background: linear-gradient(135deg, rgba(33, 186, 69, 0.95), rgba(24, 161, 51, 0.95));
    box-shadow: 0 6px 14px rgba(33, 186, 69, 0.4), 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.activity-menu-item .activity-badge.is-visible::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
}

.activity-badge-progress {
    width: 44px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.3);
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

.activity-badge-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0.9));
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
}

.activity-copy {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    line-height: 1.1;
    flex: 1 1 auto;
    min-width: 0;
}

.activity-state {
    font-size: 0.54rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.8;
}

.activity-title {
    font-size: 0.84rem;
    font-weight: 700;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
}

.activity-meta {
    font-size: 0.66rem;
    opacity: 0.7;
}

.activity-menu-item .activity-pill.has-bg .activity-bg {
    opacity: 1;
}

.activity-menu-item .activity-pill.has-active {
    box-shadow: 0 10px 20px rgba(33, 186, 69, 0.35), 0 0 0 1px rgba(33, 186, 69, 0.2);
    background: rgba(18, 26, 22, 0.92);
}

.activity-progress-track {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.activity-progress-track::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.2);
}

.activity-progress-track.is-visible {
    opacity: 1;
}

.activity-progress-fill {
    position: relative;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #21ba45, #21a4d0);
    transition: width 0.25s ease;
}

.activity-menu-item .activity-pill.has-active .activity-overlay {
    background: linear-gradient(120deg, rgba(11, 20, 34, 0.54), rgba(33, 186, 69, 0.58));
    opacity: 0.88;
}

.activity-menu-item.is-paused .activity-pill {
    color: #f7f8fc;
    box-shadow: 0 6px 14px rgba(251, 189, 8, 0.25);
}

.activity-menu-item.is-paused .activity-overlay {
    background: linear-gradient(120deg, rgba(22, 24, 30, 0.62), rgba(251, 189, 8, 0.45));
}

.activity-menu-item.is-paused .activity-state,
.activity-menu-item.is-paused .activity-meta {
    opacity: 0.75;
}

.activity-menu-item .activity-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(33, 133, 208, 0.4);
}

.activity-menu-item .activity-pill.has-active:hover {
    box-shadow: 0 13px 28px rgba(33, 186, 69, 0.45);
}

.activity-menu-item .activity-pill.has-active .activity-badge {
    display: inline-flex;
}

#activity-menu-link .activity-bg {
    background-repeat: no-repeat;
}

#activity-menu-link.live .activity-pill {
    animation: activityGlow 4s ease-in-out infinite;
}

@keyframes activityGlow {
    0%, 100% {
        box-shadow: 0 8px 18px rgba(33, 186, 69, 0.32), 0 0 0 1px rgba(33, 186, 69, 0.2);
    }
    50% {
        box-shadow: 0 10px 22px rgba(33, 186, 69, 0.42), 0 0 0 1px rgba(33, 186, 69, 0.3);
    }
}

@media (max-width: 767px) {
    .activity-menu-item {
        width: 100% !important;
    }

    .activity-menu-item .activity-pill {
        width: 100%;
        padding: 0.2rem 0.5rem;
        min-height: 30px;
        gap: 0.45rem;
    }

    .activity-title {
        max-width: 140px;
    }
}

/* Now Playing Page Styles */
.now-playing-heading {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.now-playing-heading i.icon {
    color: #21ba45;
}

.now-playing-heading .sub.header {
    color: #60738a;
    margin-top: 0.35rem !important;
}

.now-playing-shell {
    background: linear-gradient(180deg, rgba(33, 186, 69, 0.08), rgba(33, 133, 208, 0.08)) !important;
    border: none !important;
    box-shadow: 0 20px 44px rgba(33, 133, 208, 0.16) !important;
    border-radius: 14px !important;
    padding: 1.4rem 2.2rem !important;
}

.now-playing-grid {
    display: grid;
    gap: 1.9rem;
}

.now-hero-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(210px, 240px) 1fr;
    gap: 2rem;
    padding: 1.85rem;
    border-radius: 26px;
    overflow: hidden;
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.85) 0%, rgba(33, 133, 208, 0.35) 100%);
    color: #fff;
    box-shadow: 0 26px 52px rgba(33, 133, 208, 0.22);
}

.paused-section {
    margin-top: 2.4rem;
}

.paused-heading h3 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.paused-heading p {
    margin: 0.35rem 0 1.4rem;
    color: #60738a;
}

.paused-grid {
    display: grid;
    gap: 2.3rem;
}

.paused-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(210px, 240px) 1fr;
    gap: 2rem;
    padding: 2rem;
    border-radius: 28px;
    overflow: hidden;
    background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.85) 0%, rgba(33, 133, 208, 0.3) 100%);
    color: #fff;
    box-shadow: 0 24px 48px rgba(33, 133, 208, 0.22);
}

.paused-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--paused-hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(22px);
    opacity: 0.45;
    transform: scale(1.06);
    z-index: 0;
}

.paused-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(12, 19, 38, 0.82), rgba(33, 133, 208, 0.65));
    z-index: 0;
}

.paused-card > * {
    position: relative;
    z-index: 1;
}

.paused-art {
    position: relative;
    max-width: 220px;
}

.paused-art img {
    width: 100%;
    border-radius: 18px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
}

.paused-chip {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-weight: 700;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.7rem;
}

.paused-pill {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.paused-pill .now-pill-dot {
    background: #fdbb2d;
    box-shadow: 0 0 12px rgba(253, 187, 45, 0.8);
}

.paused-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.paused-content h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.paused-content h2 a {
    color: #fff;
    text-decoration: none;
}

.paused-content h2 a:hover {
    text-decoration: underline;
}

.paused-subtitle {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.94rem;
    opacity: 0.85;
}

.paused-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.paused-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    font-size: 0.82rem;
    font-weight: 600;
}

.paused-action {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.paused-action i.pause.icon {
    color: rgba(255, 255, 255, 0.85);
}

.remove-session-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    opacity: 0.7;
}

.remove-session-btn:hover {
    background: rgba(219, 40, 40, 0.85);
    border-color: rgba(219, 40, 40, 0.4);
    opacity: 1;
    transform: scale(1.05);
}

.remove-session-btn:active {
    transform: scale(0.98);
}

.remove-session-btn i.icon {
    color: #fff;
    margin: 0;
    font-size: 16px;
    opacity: 0.9;
}

.remove-session-btn:hover i.icon {
    opacity: 1;
}

.remove-session-btn:disabled {
    cursor: not-allowed;
    opacity: 0.3;
}

.now-hero-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(22px);
    opacity: 0.5;
    transform: scale(1.06);
    z-index: 0;
}

.now-hero-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(12, 19, 38, 0.82), rgba(33, 133, 208, 0.72));
    z-index: 0;
}

.now-hero-card > * {
    position: relative;
    z-index: 1;
}

.now-hero-poster {
    position: relative;
    max-width: 220px;
}

.now-hero-poster a {
    display: block;
    position: relative;
}

.now-hero-poster img {
    width: 100%;
    border-radius: 18px;
    box-shadow: 0 20px 36px rgba(0, 0, 0, 0.38);
    transform: rotate(-1.5deg);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.now-hero-card:hover .now-hero-poster img {
    transform: rotate(0deg) scale(1.015);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.45);
}

.now-hero-progress {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(33, 186, 69, 0.92);
    color: #fff;
    font-weight: 700;
    padding: 0.32rem 0.75rem;
    border-radius: 999px;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    text-transform: uppercase;
    font-size: 0.7rem;
    box-shadow: 0 12px 20px rgba(33, 186, 69, 0.38);
}

.now-hero-progress span::before {
    content: '*';
    font-size: 0.8rem;
}

.now-hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.now-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.16);
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    font-weight: 700;
    width: fit-content;
}

.now-pill-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #21ba45;
    box-shadow: 0 0 12px rgba(33, 186, 69, 0.95);
    display: block;
    animation: nowBlink 1.6s ease-in-out infinite;
}

@keyframes nowBlink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.now-hero-content h2 {
    margin: 0;
    font-size: 1.95rem;
    font-weight: 800;
    line-height: 1.2;
}

.now-hero-content h2 a {
    color: #fff;
    text-decoration: none;
}

.now-hero-content h2 a:hover {
    text-decoration: underline;
}

.now-hero-year {
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0.85;
    margin-left: 0.5rem;
}

.now-hero-subtitle {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 1rem;
    opacity: 0.88;
}

.now-hero-overview {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    max-width: 560px;
    line-height: 1.55;
}

.now-progress-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.now-progress-bar {
    width: 100%;
    height: 9px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    overflow: hidden;
}

.now-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #21ba45, #21a4d0);
    border-radius: 999px;
}

.now-progress-meta {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.now-meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.now-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.84rem;
    font-weight: 600;
    opacity: 0.92;
}

.now-empty {
    display: flex;
    justify-content: center;
    padding: 3rem 0;
}

.now-empty-card {
    text-align: center;
    background: linear-gradient(145deg, rgba(33, 186, 69, 0.12), rgba(33, 133, 208, 0.14));
    border-radius: 28px;
    padding: 3rem 2.5rem;
    max-width: 520px;
    box-shadow: 0 20px 38px rgba(33, 133, 208, 0.2);
}

.now-empty-card h3 {
    margin-top: 1rem;
    font-size: 1.6rem;
}

.now-empty-card p {
    color: #5a6779;
    margin: 1rem auto 1.75rem;
    max-width: 360px;
}

.now-empty-icon {
    color: #21ba45;
}

.now-empty-card .ui.button {
    border-radius: 999px;
    font-weight: 700;
    box-shadow: 0 12px 20px rgba(33, 133, 208, 0.22);
}

.now-playing-page {
    margin-top: 0.2rem;
}

@media (max-width: 1100px) {
    .now-hero-card {
        grid-template-columns: 1fr;
        padding: 1.9rem;
    }

    .now-hero-poster {
        margin-bottom: 1.5rem;
        max-width: 240px;
    }

    .now-hero-poster img {
        transform: rotate(0deg);
    }

    .now-hero-content h2 {
        font-size: 1.7rem;
    }

    .paused-card {
        grid-template-columns: 1fr;
        padding: 1.8rem;
    }

    .paused-art {
        margin-bottom: 1.2rem;
        max-width: 240px;
    }
}

@media (max-width: 768px) {
    .now-playing-shell {
        padding: 1.4rem 1.2rem !important;
        border-radius: 12px !important;
    }

    .now-playing-heading {
        padding: 0 !important;
    }

    .now-hero-card {
        padding: 1.4rem;
        gap: 1.6rem;
    }

    .now-progress-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .paused-card {
        padding: 1.4rem;
        gap: 1.4rem;
    }

    .paused-art {
        margin-bottom: 1rem;
    }
}

@media (prefers-color-scheme: dark) {
    .now-playing-shell {
        background: linear-gradient(180deg, rgba(18, 30, 48, 0.82), rgba(17, 38, 30, 0.75)) !important;
        box-shadow: 0 18px 40px rgba(10, 18, 32, 0.55) !important;
    }

    .now-empty-card {
        background: linear-gradient(145deg, rgba(24, 38, 56, 0.82), rgba(22, 44, 34, 0.78));
        box-shadow: 0 18px 32px rgba(6, 12, 24, 0.55);
    }

    .now-empty-card p {
        color: rgba(225, 232, 245, 0.78);
    }

    .dark .now-playing-shell,
    .dark .now-hero-card {
        filter: none !important;
    }

    .paused-card {
        background: rgba(19, 28, 45, 0.9);
        box-shadow: 0 16px 34px rgba(10, 18, 34, 0.45);
    }

    .paused-content h4 a,
    .paused-subtitle,
    .paused-meta {
        color: rgba(225, 232, 245, 0.85);
    }
}

/* Public Activity Specific Styles */
.private-message {
    text-align: center;
    padding: 4rem 2rem;
    color: #999;
}

.private-message i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #999;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.public-activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
