/* Shared Clip Page - Premium Style */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0e0e10;
    color: #efeff1;
    min-height: 100vh;
}

.shared-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a2e 50%, #0a0a0a 100%);
    background-attachment: fixed;
    padding: 0;
    margin: 0;
    position: relative;
}

/* Animated background effect */
.shared-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(88, 28, 135, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: backgroundPulse 8s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.shared-page > * {
    position: relative;
    z-index: 1;
}

.shared-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* Clip Header */
.clip-header {
    width: 100%;
    max-width: 1100px;
    margin-bottom: 1.5rem;
    text-align: center;
    padding: 2rem 2.5rem;
    background: linear-gradient(135deg, rgba(20, 20, 35, 0.8) 0%, rgba(30, 20, 50, 0.8) 100%);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(139, 92, 246, 0.25);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(139, 92, 246, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.clip-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.clip-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5));
}

.clip-title {
    color: #fff;
    font-size: 1.85rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    background: linear-gradient(135deg, #fff 0%, #e0d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.clip-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 25px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    transition: all 0.25s ease;
}

.meta-item:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-2px);
}

.meta-item.streamer {
    text-decoration: none;
    background: linear-gradient(135deg, rgba(145, 71, 255, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-color: rgba(145, 71, 255, 0.3);
    color: #c4b5fd;
    font-weight: 600;
}

.meta-item.streamer:hover {
    background: linear-gradient(135deg, rgba(145, 71, 255, 0.35) 0%, rgba(139, 92, 246, 0.35) 100%);
    box-shadow: 0 4px 15px rgba(145, 71, 255, 0.25);
}

.meta-icon {
    font-size: 1rem;
    opacity: 0.9;
}

.clip-creator {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.clip-creator span {
    color: rgba(167, 139, 250, 0.8);
    font-weight: 500;
}

/* Video Wrapper */
.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 1100px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin: 0 auto 1.5rem auto;
    box-shadow:
        0 0 0 1px rgba(139, 92, 246, 0.3),
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 100px rgba(139, 92, 246, 0.1);
}

.video-wrapper video {
    width: 100%;
    height: auto;
    display: block;
    max-height: 75vh;
}

/* Twitch Embed in shared page */
.video-wrapper.embed-wrapper {
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
}

.video-wrapper.embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Unmute Overlay Button */
.unmute-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 2rem;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid rgba(139, 92, 246, 0.5);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 40px rgba(139, 92, 246, 0.2);
}

.unmute-overlay:hover {
    background: rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.8);
    transform: translate(-50%, -50%) scale(1.05);
}

.unmute-overlay:active {
    transform: translate(-50%, -50%) scale(0.98);
}

.unmute-overlay .unmute-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5));
}

.unmute-overlay .unmute-text {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.unmute-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.8);
}

/* Clip Info Overlay (on hover) */
.clip-info-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 2rem 2rem 3rem 2rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.video-wrapper:hover .clip-info-overlay {
    opacity: 1;
}

.clip-info-overlay h3 {
    color: white;
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.clip-meta-inline {
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
}

.clip-meta-inline span {
    margin-right: 0.5rem;
}

/* Playback Controls */
.playback-controls {
    display: flex;
    gap: 2rem;
    padding: 1.25rem 2rem;
    background: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.15);
    margin-bottom: 1.5rem;
    align-items: center;
    width: 100%;
    max-width: 1100px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.speed-section, .volume-section {
    flex: 1;
}

.speed-section h4, .volume-section h4 {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.speed-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.speed-btn {
    padding: 0.6rem 1.1rem;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.speed-btn:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
    color: #fff;
    transform: translateY(-1px);
}

.speed-btn.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3) 0%, rgba(88, 28, 135, 0.3) 100%);
    border-color: rgba(139, 92, 246, 0.5);
    color: #a78bfa;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.volume-slider-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.volume-icon {
    font-size: 1.1rem;
    opacity: 0.7;
}

.volume-slider {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
    transition: transform 0.2s;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.volume-value {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    min-width: 45px;
    text-align: right;
    font-size: 0.9rem;
}

/* Tags */
.tags-section {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.tag {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(88, 28, 135, 0.15) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #a78bfa;
    font-weight: 500;
    transition: all 0.2s;
}

.tag:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(88, 28, 135, 0.25) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

/* Footer */
.clip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1100px;
    padding: 1.25rem 1.5rem;
    background: rgba(20, 20, 30, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.1);
    margin-top: auto;
}

.branding {
    color: #8b5cf6;
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.2s;
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.branding:hover {
    color: #a78bfa;
    text-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

.twitch-link {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.65rem 1.25rem;
    background: linear-gradient(135deg, #9147ff 0%, #772ce8 100%);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(145, 71, 255, 0.3);
}

.twitch-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(145, 71, 255, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .shared-container {
        padding: 1rem;
    }

    .clip-header {
        padding: 1.5rem 1.25rem;
        border-radius: 16px;
    }

    .clip-title-wrapper {
        flex-direction: column;
        gap: 0.5rem;
    }

    .clip-icon {
        font-size: 1.5rem;
    }

    .clip-title {
        font-size: 1.4rem;
    }

    .meta-item {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }

    .video-wrapper {
        border-radius: 8px;
    }

    .playback-controls {
        flex-direction: column;
        gap: 1.25rem;
        padding: 1rem 1.25rem;
    }

    .clip-footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .shared-container {
        padding: 0.75rem;
    }

    .clip-header {
        padding: 1.25rem 1rem;
    }

    .clip-title {
        font-size: 1.15rem;
    }

    .meta-item {
        padding: 0.35rem 0.6rem;
        font-size: 0.8rem;
    }

    .meta-icon {
        font-size: 0.85rem;
    }

    .clip-creator {
        font-size: 0.75rem;
    }

    .video-wrapper video {
        max-height: 50vh;
    }

    .speed-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    .playback-controls {
        padding: 0.875rem 1rem;
    }

    .speed-section h4, .volume-section h4 {
        font-size: 0.75rem;
    }
}
