/* ===========================
   BMOON TV - Realistic TV Effects
   CRT, Bezel, OSD, Volume, etc.
   =========================== */

/* ===========================
   TV Frame & Bezel
   =========================== */

.tv-frame {
    width: 100%;
    background: linear-gradient(145deg, #2d2d2d 0%, #1a1a1a 50%, #0d0d0d 100%);
    border-radius: 16px;
    padding: 8px;
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.8),
        inset 0 2px 4px rgba(255, 255, 255, 0.03),
        inset 0 -2px 4px rgba(0, 0, 0, 0.5);
    border: 1px solid #0a0a0a;
    position: relative;
    max-height: 100%;
    overflow: hidden;
}

/* Metallic shine overlay - same as remote */
.tv-frame::before {
    content: "";
    position: absolute;
    top: 0;
    left: 20%;
    width: 40%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.02) 50%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 0;
}

.tv-bezel-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    margin-bottom: 8px;
    background: #1a1a1a;
    border-radius: 12px 12px 0 0;
    border-bottom: none;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.4),
        inset 0 -1px 2px rgba(0, 0, 0, 0.3);
}

.tv-brand {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--glow-color);
    font-family: 'Courier New', monospace;
}

.led-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff0000;
    box-shadow: 0 0 10px #ff0000, inset 0 -2px 4px rgba(0, 0, 0, 0.5);
    animation: ledBlink 2s ease-in-out infinite;
}

.led-indicator.on {
    background: #00ff00;
    box-shadow: 0 0 10px #00ff00, inset 0 -2px 4px rgba(0, 0, 0, 0.5);
    animation: none;
}

@keyframes ledBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.tv-bezel-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    margin-top: 8px;
    background: #1a1a1a;
    border-radius: 0 0 12px 12px;
    border-top: none;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-shadow:
        0 -2px 8px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.speaker-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.speaker-label {
    font-family: 'Courier New', monospace;
    font-size: 8px;
    font-weight: bold;
    color: #f0b90b;
    letter-spacing: 1px;
    text-shadow: 0 0 3px rgba(240, 185, 11, 0.3);
    opacity: 0.7;
}

.speaker-grill {
    width: 60px;
    height: 30px;
    background:
        repeating-linear-gradient(
            90deg,
            #000 0px,
            #000 2px,
            #1a1a1a 2px,
            #1a1a1a 4px
        );
    border: 1px solid #000;
    border-radius: 4px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
}

.visualizer-bars {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    padding: 3px 2px;
    gap: 1px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.visualizer-bars.active {
    opacity: 1;
}

.visualizer-bar {
    height: 3px;
    background: linear-gradient(90deg,
        rgba(240, 185, 11, 0) 0%,
        rgba(240, 185, 11, 0.8) 50%,
        rgba(240, 185, 11, 1) 100%
    );
    border-radius: 1px;
    width: 0%;
    transition: width 0.05s ease-out;
    box-shadow: 0 0 3px rgba(240, 185, 11, 0.5);
}

@keyframes speaker-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.speaker-grill.pulse {
    animation: speaker-pulse 0.15s ease-out;
}

.tv-controls {
    display: flex;
    gap: 12px;
}

.tv-power-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, #2d2d2d, #1f1f1f);
    border: 2px solid #0d0d0d;
    color: var(--accent-gold);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
    position: relative;
}

.tv-power-btn:hover {
    background: linear-gradient(145deg, #3a3a3a, #252525);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    box-shadow:
        0 0 12px rgba(240, 185, 11, 0.3),
        0 2px 6px rgba(0, 0, 0, 0.6),
        inset 0 1px 3px rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.tv-power-btn:active {
    transform: scale(0.95);
    box-shadow:
        0 0 8px rgba(240, 185, 11, 0.4),
        inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* ===========================
   CRT Screen Effects
   =========================== */

.tv-screen {
    position: relative;
    overflow: hidden;
}

/* Scanlines Effect */
.crt-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0) 0px,
        rgba(0, 0, 0, 0) 1px,
        rgba(0, 0, 0, 0.1) 1px,
        rgba(0, 0, 0, 0.1) 2px
    );
    pointer-events: none;
    z-index: 5;
    animation: scanlineMove 8s linear infinite;
}

@keyframes scanlineMove {
    0% { background-position: 0 0; }
    100% { background-position: 0 100px; }
}

/* CRT Curve Effect */
.crt-curve {
    position: absolute;
    inset: 0;
    border-radius: 8px;
    box-shadow:
        inset 0 0 50px rgba(0, 0, 0, 0.5),
        inset 0 0 100px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: 4;
}

/* Add subtle bulge effect to screen content */
.screen-content {
    transform: perspective(1000px);
    transform-style: preserve-3d;
}

/* Screen Reflection/Glare */
.screen-reflection {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            ellipse at 30% 30%,
            rgba(255, 255, 255, 0.15) 0%,
            rgba(255, 255, 255, 0.05) 30%,
            transparent 60%
        );
    pointer-events: none;
    z-index: 6;
    opacity: 0.3;
}

/* ===========================
   Enhanced Static/Noise Effect
   =========================== */

.static-overlay {
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.03) 0px,
            transparent 1px,
            transparent 2px,
            rgba(255, 255, 255, 0.03) 3px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.03) 0px,
            transparent 1px,
            transparent 2px,
            rgba(255, 255, 255, 0.03) 3px
        );
    opacity: 0;
    z-index: 10;
    pointer-events: none;
}

.static-overlay.active {
    opacity: 1;
    animation: staticNoise 0.1s infinite, staticFlicker 0.05s infinite;
}

@keyframes staticNoise {
    0% {
        background-position: 0 0, 0 0;
        opacity: 0.9;
    }
    25% {
        background-position: 5px 5px, -5px 3px;
        opacity: 0.7;
    }
    50% {
        background-position: -3px 8px, 7px -2px;
        opacity: 1;
    }
    75% {
        background-position: 8px -5px, -3px 5px;
        opacity: 0.6;
    }
    100% {
        background-position: 0 0, 0 0;
        opacity: 0.8;
    }
}

@keyframes staticFlicker {
    0%, 100% {
        filter: brightness(1) contrast(1);
    }
    50% {
        filter: brightness(1.2) contrast(1.1);
    }
}

/* Add noise texture overlay */
.static-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-radial-gradient(
            circle at 20% 30%,
            transparent 0,
            rgba(255, 255, 255, 0.05) 1px,
            transparent 2px
        );
    animation: noiseMove 0.2s infinite;
}

@keyframes noiseMove {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-2px, 2px); }
    50% { transform: translate(2px, -2px); }
    75% { transform: translate(-2px, -2px); }
    100% { transform: translate(0, 0); }
}

/* ===========================
   OSD (On-Screen Display)
   =========================== */

.osd-display {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid var(--accent-gold);
    border-radius: 8px;
    padding: 12px 20px;
    z-index: 15;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
}

.osd-display.show {
    opacity: 1;
    transform: translateX(0);
}

.osd-channel-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-gold);
    text-align: center;
    font-family: 'Courier New', monospace;
    line-height: 1;
    text-shadow: 0 0 10px var(--glow-color);
}

.osd-channel-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===========================
   Volume Bar
   =========================== */

.volume-bar {
    position: absolute;
    left: 50%;
    bottom: 80px;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid var(--accent-gold);
    border-radius: 8px;
    padding: 12px 24px;
    z-index: 15;
    opacity: 0;
    transform: translateX(-50%) translateY(50px);
    transition: all 0.3s ease;
    min-width: 250px;
}

.volume-bar.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.volume-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.volume-level-container {
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.volume-level {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-gold-dark));
    border-radius: 4px;
    transition: width 0.2s ease;
    box-shadow: 0 0 10px var(--glow-color);
    position: relative;
}

.volume-level::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: volumeShine 2s ease-in-out infinite;
}

@keyframes volumeShine {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

/* ===========================
   Video Loading Indicator
   =========================== */

.video-loading {
    position: absolute;
    inset: 0;
    background: #000;
    z-index: 15;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.video-loading.active {
    display: flex;
}

.loading-bars {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    height: 40px;
}

.loading-bar {
    width: 6px;
    background: var(--accent-gold);
    border-radius: 3px;
    animation: loading-bounce 1s ease-in-out infinite;
    box-shadow: 0 0 10px var(--glow-color);
}

.loading-bar:nth-child(1) { animation-delay: 0s; }
.loading-bar:nth-child(2) { animation-delay: 0.1s; }
.loading-bar:nth-child(3) { animation-delay: 0.2s; }
.loading-bar:nth-child(4) { animation-delay: 0.3s; }
.loading-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes loading-bounce {
    0%, 100% { height: 10px; }
    50% { height: 40px; }
}

.loading-text {
    color: var(--accent-gold);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--glow-color);
    font-family: 'Courier New', monospace;
}

/* ===========================
   Standby Screen (TV Off State)
   =========================== */

.standby-screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 12;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    overflow: hidden;
    padding: 5%;
    box-sizing: border-box;
}

.standby-screen.active {
    display: flex;
}

/* Phosphor dot pattern overlay */
.standby-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 4px 4px;
    pointer-events: none;
}

/* Vignette effect */
.standby-screen::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        transparent 40%,
        rgba(0, 0, 0, 0.4) 80%,
        rgba(0, 0, 0, 0.8) 100%
    );
    pointer-events: none;
}

.standby-logo {
    position: relative;
    z-index: 1;
    animation:
        logoFloat 3s cubic-bezier(0.4, 0, 0.2, 1) infinite,
        logoBreathing 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    width: min(200px, 45%);
    height: auto;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .standby-logo {
        width: min(150px, 35%);
    }
}

.standby-logo img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    filter:
        drop-shadow(0 0 15px rgba(240, 185, 11, 0.3))
        drop-shadow(0 0 25px rgba(240, 185, 11, 0.15))
        brightness(1.05);
    animation: glowPulse 2.5s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(-10px);
    }
    50% {
        transform: translateY(10px);
    }
}

@keyframes logoBreathing {
    0%, 100% {
        transform: scale(0.98);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}

@keyframes glowPulse {
    0%, 100% {
        filter:
            drop-shadow(0 0 15px rgba(240, 185, 11, 0.3))
            drop-shadow(0 0 25px rgba(240, 185, 11, 0.15))
            brightness(1.05);
    }
    50% {
        filter:
            drop-shadow(0 0 25px rgba(240, 185, 11, 0.5))
            drop-shadow(0 0 40px rgba(240, 185, 11, 0.25))
            brightness(1.1);
    }
}

.standby-text {
    position: relative;
    z-index: 1;
    color: var(--accent-gold);
    font-size: clamp(0.7rem, 2.5vw, 1rem);
    font-weight: 600;
    letter-spacing: clamp(0.5px, 0.3vw, 2px);
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
    text-shadow:
        0 0 20px var(--glow-color),
        0 0 40px var(--glow-color);
    animation: textBlink 2s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    text-align: center;
    gap: clamp(4px, 0.8vw, 8px);
    padding: 0 15px;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .standby-text {
        font-size: clamp(0.65rem, 3vw, 0.85rem);
        gap: clamp(3px, 1vw, 6px);
        padding: 0 10px;
    }
}

.standby-text .power-symbol {
    font-size: clamp(0.8rem, 2.5vw, 1.2rem);
    animation: powerPulse 2s ease-in-out infinite;
}

@keyframes textBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes powerPulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.2);
        filter: brightness(1.3);
    }
}

.standby-indicator {
    position: absolute;
    bottom: 30px;
    right: 30px;
    width: 12px;
    height: 12px;
    background: #ff4444;
    border-radius: 50%;
    box-shadow:
        0 0 10px #ff4444,
        0 0 20px rgba(255, 68, 68, 0.5),
        inset 0 -2px 4px rgba(0, 0, 0, 0.5);
    animation: standbyBlink 3s ease-in-out infinite;
}

@keyframes standbyBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ===========================
   Power On/Off Effect
   =========================== */

.power-effect {
    position: absolute;
    inset: 0;
    background: #fff;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
}

.power-effect.power-on {
    animation: powerOn 0.8s ease-out forwards;
}

.power-effect.power-off {
    animation: powerOff 0.5s ease-in forwards;
}

@keyframes powerOn {
    0% {
        opacity: 1;
        transform: scale(0, 1);
    }
    30% {
        opacity: 0.8;
        transform: scale(0.5, 0.8);
    }
    60% {
        opacity: 0.4;
        transform: scale(1, 0.1);
    }
    100% {
        opacity: 0;
        transform: scale(1, 0);
    }
}

@keyframes powerOff {
    0% {
        opacity: 0;
        transform: scale(1, 1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1, 0.1);
    }
    80% {
        opacity: 0.8;
        transform: scale(0.3, 0.05);
    }
    100% {
        opacity: 1;
        transform: scale(0, 0);
        background: #000;
    }
}

/* Screen flicker during power transition */
.tv-screen.powering {
    animation: screenFlickerPower 0.3s ease;
}

@keyframes screenFlickerPower {
    0%, 100% { filter: brightness(1); }
    25%, 75% { filter: brightness(0.5); }
    50% { filter: brightness(1.5); }
}

/* ===========================
   Responsive Adjustments
   =========================== */

@media (max-width: 768px) {
    .tv-frame {
        padding: 16px;
    }

    .tv-brand {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }

    .speaker-grill {
        width: 80px;
        height: 40px;
    }

    .osd-display {
        top: 10px;
        right: 10px;
        padding: 8px 16px;
    }

    .osd-channel-number {
        font-size: 2rem;
    }

    .volume-bar {
        min-width: 200px;
        bottom: 60px;
    }

    /* Standby screen - no overrides needed, clamp handles it */
    .standby-indicator {
        width: 6px;
        height: 6px;
    }
}

/* ===========================
   Slideshow with Blur Background
   =========================== */

.slideshow-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Background Layer - Blurred stretched image */
.slideshow-background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(40px) brightness(0.7);
    transform: scale(1.1);
    transition: background-image 1s ease-in-out;
}

/* Main Image Layer - Contained with blur background visible */
.slideshow-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
    opacity: 0;
}

.slideshow-image.active {
    opacity: 1;
}

/* 6 Animation Variations */

/* Animation 1: Fade + Zoom In (Gentle Opening) */
@keyframes fadeZoomIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.slideshow-image.anim-fadeZoomIn {
    animation: fadeZoomIn 6s ease-out forwards;
}

/* Animation 2: Slide from Right + Zoom Out (Build Up) */
@keyframes slideRightZoomOut {
    0% {
        opacity: 0;
        transform: translateX(100%) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.slideshow-image.anim-slideRight {
    animation: slideRightZoomOut 6s ease-out forwards;
}

/* Animation 3: Fade + Pan Left (Dynamic Middle) */
@keyframes fadePanLeft {
    0% {
        opacity: 0;
        transform: translateX(5%);
    }
    100% {
        opacity: 1;
        transform: translateX(-5%);
    }
}

.slideshow-image.anim-panLeft {
    animation: fadePanLeft 6s ease-in-out forwards;
}

/* Animation 4: Slide from Bottom + Subtle Rotate (Peak Energy) */
@keyframes slideUpRotate {
    0% {
        opacity: 0;
        transform: translateY(100%) rotate(-2deg) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotate(2deg) scale(1.05);
    }
}

.slideshow-image.anim-slideUp {
    animation: slideUpRotate 6s ease-out forwards;
}

/* Animation 5: Cross Fade + Scale Pulse (Wind Down) */
@keyframes scalePulse {
    0% {
        opacity: 0;
        transform: scale(1.1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.slideshow-image.anim-pulse {
    animation: scalePulse 6s ease-in-out forwards;
}

/* Animation 6: Fade + Zoom Out Slow (Closing Gentle) */
@keyframes fadeZoomOut {
    0% {
        opacity: 0;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(0.98);
    }
}

.slideshow-image.anim-fadeZoomOut {
    animation: fadeZoomOut 6s ease-in forwards;
}

/* Slideshow Audio */
.slideshow-audio {
    display: none;
}

/* Chart Container */
.chart-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #0B0E11;
    display: flex;
    flex-direction: column;
}

.chart-wrapper {
    flex: 1;
    width: 100%;
    min-height: 0;
}

.chart-info {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(11, 14, 17, 0.9);
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #2B3139;
    max-width: calc(100% - 40px);
    backdrop-filter: blur(10px);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .chart-info {
        top: 10px;
        left: 10px;
        padding: 8px 12px;
        gap: 4px;
        max-width: calc(100% - 20px);
    }
}

.chart-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.price-label {
    font-size: 0.9rem;
    color: #848E9C;
    font-weight: 600;
}

.price-value {
    font-size: 1.4rem;
    color: #F0B90B;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .price-label {
        font-size: 0.7rem;
    }

    .price-value {
        font-size: 1.1rem;
    }
}

.chart-change {
    font-size: 0.85rem;
    color: #848E9C;
}

.change-value {
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.change-value.positive {
    color: #0ECB81;
}

.change-value.negative {
    color: #F6465D;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .chart-change {
        font-size: 0.7rem;
    }
}

/* ===========================
   Social Hub Styles
   =========================== */

.social-hub-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #0B0E11 0%, #1a1d23 100%);
    padding: 30px;
    box-sizing: border-box;
}

.social-hub-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #F0B90B;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.social-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.social-card {
    background: linear-gradient(145deg, #1a1d23, #0f1116);
    border: 2px solid #2B3139;
    border-radius: 12px;
    padding: 18px 24px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 70px;
}

.social-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, transparent, rgba(240, 185, 11, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-card:hover::before,
.social-card.selected::before {
    opacity: 1;
}

.social-card.selected {
    border-color: #F0B90B;
    transform: translateX(10px);
    box-shadow:
        0 0 20px rgba(240, 185, 11, 0.3),
        0 0 40px rgba(240, 185, 11, 0.2),
        inset 0 0 20px rgba(240, 185, 11, 0.1);
}

.social-icon {
    font-size: 2rem;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.social-icon svg {
    width: 100%;
    height: 100%;
}

.social-info {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.social-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #F0B90B;
    white-space: nowrap;
    min-width: 100px;
}

.social-username {
    font-size: 0.9rem;
    color: #848E9C;
    white-space: nowrap;
}

.social-divider {
    width: 1px;
    height: 24px;
    background: #2B3139;
    flex-shrink: 0;
}

/* Social Stats Container - List Style */
.social-stats {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: #F0B90B;
}

.stat-label {
    font-size: 0.85rem;
    color: #848E9C;
}

.stat-icon {
    font-size: 0.9rem;
    color: #848E9C;
}

/* Member Facepile - Inline */
.member-facepile {
    display: flex;
    align-items: center;
    gap: 4px;
}

.facepile-avatars {
    display: flex;
    align-items: center;
}

.facepile-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #1a1d23;
    object-fit: cover;
    margin-left: -8px;
    transition: transform 0.2s ease;
}

.facepile-avatar:first-child {
    margin-left: 0;
}

.facepile-avatar:hover {
    transform: scale(1.15);
    z-index: 10;
}

.facepile-more {
    font-size: 0.8rem;
    color: #F0B90B;
    font-weight: 600;
    margin-left: 2px;
}

.social-hint {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: #848E9C;
}

.social-hint .key {
    color: #F0B90B;
    font-weight: 700;
}

/* QR Code Modal */
.qr-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(11, 14, 17, 0.95);
    border: 2px solid #F0B90B;
    border-radius: 16px;
    padding: 30px;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 0 30px rgba(240, 185, 11, 0.3),
        0 0 60px rgba(240, 185, 11, 0.2);
}

.qr-modal.active {
    display: flex;
}

.qr-modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #F0B90B;
}

.qr-modal-code {
    background: white;
    padding: 15px;
    border-radius: 8px;
}

.qr-modal-hint {
    font-size: 0.9rem;
    color: #848E9C;
}

/* Desktop: Show all cards */
@media (min-width: 769px) {
    .social-card {
        display: flex;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .social-hub-container {
        padding: 15px;
    }

    .social-hub-title {
        font-size: 1.1rem;
        margin-bottom: 15px;
        letter-spacing: 1.5px;
    }

    .social-cards-grid {
        gap: 15px;
        max-width: 100%;
    }

    .social-card {
        padding: 12px 14px;
        min-height: auto;
        gap: 10px;
        flex-wrap: wrap;
    }

    .social-icon {
        width: 38px;
        height: 38px;
        font-size: 1.5rem;
    }

    /* Mobile: Show only selected card */
    .social-card {
        display: none;
    }

    .social-card.selected {
        display: flex;
    }

    .social-info {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        width: calc(100% - 58px);
    }

    .social-name {
        font-size: 0.9rem;
        min-width: auto;
        flex-shrink: 0;
    }

    .social-username {
        font-size: 0.75rem;
        flex-shrink: 0;
    }

    .social-divider {
        height: 16px;
    }

    .social-stats {
        gap: 8px;
        width: 100%;
    }

    .stat-item {
        gap: 4px;
    }

    .stat-value {
        font-size: 0.85rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .stat-icon {
        width: 12px;
        height: 12px;
    }

    .facepile-avatar {
        width: 22px;
        height: 22px;
        margin-left: -6px;
        border-width: 1px;
    }

    .facepile-more {
        font-size: 0.7rem;
    }

    .qr-modal {
        width: 90%;
        padding: 20px;
    }

}
