/* ==========================================================================
   Karsh Live Stream Module Stylesheet (Premium dark glassmorphism)
   ========================================================================== */

:root {
    --ls-bg: #0f0920;
    --ls-bg-darker: #07040d;
    --ls-primary: #6366f1;
    --ls-primary-glow: rgba(99, 102, 241, 0.4);
    --ls-secondary: #ec4899;
    --ls-secondary-glow: rgba(236, 72, 153, 0.4);
    --ls-accent: #a855f7;
    --ls-text-main: #f8fafc;
    --ls-text-muted: #94a3b8;
    --ls-glass-bg: rgba(20, 16, 38, 0.55);
    --ls-glass-border: rgba(255, 255, 255, 0.08);
    --ls-glass-shadow: rgba(0, 0, 0, 0.45);
    --ls-radius: 16px;
}

.livestream-lobby-container {
    padding: 1rem 0;
    color: var(--ls-text-main);
    font-family: 'Outfit', sans-serif;
}

/* Glassmorphism Styles */
.ls-glass-panel {
    background: var(--ls-glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--ls-glass-border);
    border-radius: var(--ls-radius);
    box-shadow: 0 8px 32px var(--ls-glass-shadow);
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
}

.ls-glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--ls-glass-border), transparent);
}

.ls-glow-text {
    text-shadow: 0 0 15px var(--ls-primary-glow);
}

/* Stream Cards Grid */
.streams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.stream-card {
    background: var(--ls-glass-bg);
    border: 1px solid var(--ls-glass-border);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.stream-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.15);
}

.card-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
    background: #020205;
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.stream-card:hover .card-thumbnail img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ef4444;
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.card-badge.offline {
    background: #475569;
}

.card-viewers {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    backdrop-filter: blur(4px);
    z-index: 2;
}

.card-body {
    padding: 1rem;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #174e3d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-desc {
    font-size: 0.85rem;
    color: var(--ls-text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.8em;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--ls-text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.75rem;
}

/* Modal styling */
.ls-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 3, 8, 0.85);
    backdrop-filter: blur(10px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.ls-modal {
    width: 100%;
    max-width: 500px;
    background: var(--ls-glass-bg);
    border: 1px solid var(--ls-glass-border);
    border-radius: var(--ls-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.ls-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--ls-glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ls-modal-body {
    padding: 1.5rem;
}

.ls-modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--ls-glass-border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Form inputs */
.ls-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--ls-glass-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 0.9rem;
    outline: none;
    margin-bottom: 1rem;
    transition: all 0.3s;
}

.ls-input:focus {
    border-color: var(--ls-primary);
    box-shadow: 0 0 10px var(--ls-primary-glow);
}

.ls-textarea {
    resize: none;
    height: 100px;
}

/* Video Studio & Player View */
.ls-video-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #020205;
    border-radius: 12px;
    border: 1px solid var(--ls-glass-border);
    overflow: hidden;
    position: relative;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
}

.ls-video-feed {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ls-badge-live {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ef4444;
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: live-pulse 1.5s infinite;
}

@keyframes live-pulse {
    0% { transform: scale(0.9); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.4; }
    100% { transform: scale(0.9); opacity: 1; }
}

.ls-badge-viewers {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    backdrop-filter: blur(6px);
    z-index: 10;
}

/* Floating Reactions */
.ls-reactions-container {
    position: absolute;
    bottom: 20px;
    right: 20px;
    height: 300px;
    width: 100px;
    pointer-events: none;
    z-index: 9;
    overflow: hidden;
}

.floating-emoji {
    position: absolute;
    bottom: 0;
    font-size: 2rem;
    animation: float-emoji 3s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes float-emoji {
    0% {
        transform: translateY(0) translateX(0) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(-20px) translateX(var(--x-offset, 0px)) scale(1.1);
    }
    100% {
        transform: translateY(-280px) translateX(calc(var(--x-offset, 0px) * 2)) scale(0.9);
        opacity: 0;
    }
}

/* Reaction Buttons Panel for Viewer */
.viewer-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.reactions-panel {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--ls-glass-border);
    padding: 0.5rem;
    border-radius: 30px;
}

.reaction-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    outline: none;
}

.reaction-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.2);
}

.reaction-btn:active {
    transform: scale(0.95);
}

/* Custom buttons */
.ls-btn {
    background: linear-gradient(135deg, var(--ls-primary) 0%, var(--ls-accent) 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--ls-primary-glow);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ls-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.ls-btn:active {
    transform: translateY(0);
}

.ls-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--ls-glass-border);
    color: white;
    box-shadow: none;
}

.ls-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}
