/* ===================================================================
   StreamersForge - Stream Summary Page Styles
   Premium glassmorphism, tailored HSL colors, micro-animations
   =================================================================== */

.stream-summary-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* --- Control Card (Active Stream Selector) ----------------------- */
.ss-active-session-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ss-active-session-card:hover {
    border-color: rgba(108, 92, 231, 0.3);
}

.ss-session-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ss-status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
}

.ss-status-indicator.live {
    background: rgba(234, 67, 53, 0.1);
    border-color: rgba(234, 67, 53, 0.3);
    color: #ff4d4d;
}

.ss-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.ss-status-indicator.live .ss-status-dot {
    background: #ff4d4d;
    box-shadow: 0 0 10px #ff4d4d;
    animation: ss-pulse 1.5s infinite;
}

@keyframes ss-pulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

.ss-session-info h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ss-session-info p {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.ss-session-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ss-title-input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    width: 250px;
    transition: border-color 0.2s;
}

.ss-title-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* --- Grid Dashboard widgets ------------------------------------ */
.ss-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.ss-stat-card {
    background: rgba(255, 255, 255, 0.01);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ss-stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

/* Custom HSL styling per event type */
.ss-stat-card.follows::after { background: hsl(262, 80%, 55%); }
.ss-stat-card.follows:hover { box-shadow: 0 4px 20px rgba(145, 70, 255, 0.1); }

.ss-stat-card.subs::after { background: hsl(43, 95%, 50%); }
.ss-stat-card.subs:hover { box-shadow: 0 4px 20px rgba(255, 184, 0, 0.1); }

.ss-stat-card.cheers::after { background: hsl(14, 90%, 50%); }
.ss-stat-card.cheers:hover { box-shadow: 0 4px 20px rgba(255, 107, 53, 0.1); }

.ss-stat-card.raids::after { background: hsl(190, 80%, 45%); }
.ss-stat-card.raids:hover { box-shadow: 0 4px 20px rgba(0, 212, 170, 0.1); }

.ss-stat-card.bans::after { background: hsl(354, 85%, 50%); }
.ss-stat-card.bans:hover { box-shadow: 0 4px 20px rgba(234, 67, 53, 0.1); }

.ss-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
}

.ss-stat-icon-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
}

.ss-stat-card.follows .ss-stat-icon-wrapper { color: hsl(262, 80%, 55%); }
.ss-stat-card.subs .ss-stat-icon-wrapper { color: hsl(43, 95%, 50%); }
.ss-stat-card.cheers .ss-stat-icon-wrapper { color: hsl(14, 90%, 50%); }
.ss-stat-card.raids .ss-stat-icon-wrapper { color: hsl(190, 80%, 45%); }
.ss-stat-card.bans .ss-stat-icon-wrapper { color: hsl(354, 85%, 50%); }

.ss-stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ss-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 12px;
    line-height: 1;
}

.ss-stat-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* --- Main Details Layout --------------------------------------- */
.ss-main-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-top: 8px;
}

@media (max-width: 1024px) {
    .ss-main-layout {
        grid-template-columns: 1fr;
    }
}

.ss-panel-box {
    background: rgba(255, 255, 255, 0.01);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
}

.ss-panel-title {
    margin: 0 0 20px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

/* --- Timeline Feed --------------------------------------------- */
.ss-timeline {
    position: relative;
    padding-left: 24px;
}

.ss-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: var(--border);
}

.ss-timeline-item {
    position: relative;
    padding-bottom: 24px;
    transition: transform 0.2s;
}

.ss-timeline-item:last-child {
    padding-bottom: 0;
}

.ss-timeline-marker {
    position: absolute;
    left: -24px;
    top: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-body);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* Marker type highlights */
.ss-timeline-item.follow .ss-timeline-marker { border-color: hsl(262, 80%, 55%); background: hsl(262, 80%, 55%); }
.ss-timeline-item.sub .ss-timeline-marker { border-color: hsl(43, 95%, 50%); background: hsl(43, 95%, 50%); }
.ss-timeline-item.cheer .ss-timeline-marker { border-color: hsl(14, 90%, 50%); background: hsl(14, 90%, 50%); }
.ss-timeline-item.raid .ss-timeline-marker { border-color: hsl(190, 80%, 45%); background: hsl(190, 80%, 45%); }
.ss-timeline-item.ban .ss-timeline-marker { border-color: hsl(354, 85%, 50%); background: hsl(354, 85%, 50%); }

.ss-timeline-content {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
    transition: background-color 0.2s;
}

.ss-timeline-content:hover {
    background: rgba(255, 255, 255, 0.03);
}

.ss-timeline-body {
    flex: 1;
}

.ss-timeline-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.ss-timeline-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

.ss-timeline-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 4px 0 0;
}

.ss-timeline-tag {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.ss-timeline-item.follow .ss-timeline-tag { background: rgba(145, 70, 255, 0.1); color: hsl(262, 80%, 70%); }
.ss-timeline-item.sub .ss-timeline-tag { background: rgba(255, 184, 0, 0.1); color: hsl(43, 95%, 70%); }
.ss-timeline-item.cheer .ss-timeline-tag { background: rgba(255, 107, 53, 0.1); color: hsl(14, 90%, 70%); }
.ss-timeline-item.raid .ss-timeline-tag { background: rgba(0, 212, 170, 0.1); color: hsl(190, 80%, 65%); }
.ss-timeline-item.ban .ss-timeline-tag { background: rgba(234, 67, 53, 0.1); color: hsl(354, 85%, 70%); }

/* --- Sidebar lists --------------------------------------------- */
.ss-list-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ss-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    font-size: 0.85rem;
}

.ss-list-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ss-list-name {
    font-weight: 600;
    color: var(--text-primary);
}

.ss-list-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --- Stream History Table/Cards --------------------------------- */
.ss-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ss-history-row {
    background: rgba(255, 255, 255, 0.01);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 2fr 0.5fr;
    align-items: center;
    gap: 16px;
    transition: background-color 0.2s, transform 0.2s;
    cursor: pointer;
}

.ss-history-row:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: translateY(-2px);
}

.ss-history-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.ss-history-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.ss-history-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ss-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.ss-badge.highlight-follows { border-color: rgba(145, 70, 255, 0.2); color: hsl(262, 80%, 75%); background: rgba(145, 70, 255, 0.05); }
.ss-badge.highlight-subs { border-color: rgba(255, 184, 0, 0.2); color: hsl(43, 95%, 70%); background: rgba(255, 184, 0, 0.05); }
.ss-badge.highlight-cheers { border-color: rgba(255, 107, 53, 0.2); color: hsl(14, 90%, 70%); background: rgba(255, 107, 53, 0.05); }
.ss-badge.highlight-raids { border-color: rgba(0, 212, 170, 0.2); color: hsl(190, 80%, 65%); background: rgba(0, 212, 170, 0.05); }
.ss-badge.highlight-bans { border-color: rgba(234, 67, 53, 0.2); color: hsl(354, 85%, 70%); background: rgba(234, 67, 53, 0.05); }

.ss-history-action {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .ss-history-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
    }
    .ss-history-action {
        justify-content: flex-start;
    }
}

.ss-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    margin-bottom: 12px;
    align-self: flex-start;
}

.ss-breadcrumb:hover {
    color: var(--primary);
}

.ss-empty-state {
    text-align: center;
    padding: 64px 24px;
    color: var(--text-muted);
}

.ss-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
}

.ss-empty-state h4 {
    margin: 0 0 8px;
    color: var(--text-primary);
}
