/* =========================
   BASE
   ========================= */
body.body {
    margin: 0;
    padding: 0;
    background: #111; /* Темный фон под плеер */
    height: 100vh;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

.xh-player-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================
   PLAYER CONTAINER
   ========================= */
.xh-fake-player {
    width: 100%;
    max-width: 600px; /* Имитация мобилки */
    height: 100vh;
    position: relative;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
}

/* =========================
   PREVIEW IMAGE
   ========================= */
.xh-frame {
    width: 100%;
    max-height: 100vh;
    object-fit: contain; 
    opacity: 0;
    transition: opacity 0.25s ease-out;
    z-index: 1;
}

.xh-frame.loaded {
    opacity: 1;
}

/* =========================
   CENTER PLAY BUTTON (ONLY TRIANGLE, PULSING)
   ========================= */
.xh-play-btn {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.xh-play-btn.ready {
    opacity: 1;
    /* Пульсация самого треугольника */
    animation: pulseTriangle 1.8s ease-in-out infinite;
}

/* Сам треугольник (цвет, размер, тень) */
.xh-play-btn svg {
    width: min(75px, 20vw);
    height: min(75px, 20vw);
    fill: rgba(220, 220, 220, 0.95); /* Светло-серый, как в оригинале */
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5)); /* Тень, чтобы не сливался со светлым фоном */
}

@keyframes pulseTriangle {
    0%   { transform: translate(-50%, -50%) scale(1); }
    50%  { transform: translate(-50%, -50%) scale(1.15); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* =========================
   BOTTOM BAR (Controls)
   ========================= */
.xh-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px 15px 15px 15px;
    box-sizing: border-box;
    /* Градиент затемнения снизу */
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    z-index: 5;
}

/* Время над контролами */
.xh-time {
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.xh-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}

/* =========================
   PROGRESS BAR (Moving Red)
   ========================= */
.xh-progress-container {
    flex-grow: 1;
    height: 3px;
    background: #444; 
    position: relative;
    display: flex;
    align-items: center;
    margin: 0 5px;
}

.xh-progress-filled {
    width: 12%; 
    height: 100%;
    background: #ff2a00; 
    position: relative;
    animation: moveProgressLine 30s linear forwards;
}

/* Красный кружок (ползунок) на конце */
.xh-progress-filled::after {
    content: "";
    width: 14px;
    height: 14px;
    background: #ff2a00;
    border-radius: 50%;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translate(50%, -50%);
}

@keyframes moveProgressLine {
    from { width: 12%; }
    to   { width: 35%; }
}

/* =========================
   ICONS & BUTTONS
   ========================= */
.xh-icon {
    width: 30px; /* Увеличил иконки */
    height: 30px;
    fill: #e6e6e6; /* Чуть серый цвет иконок */
}

/* Свитч паузы (пилюля) */
.xh-pause-pill {
    width: 38px;
    height: 20px;
    background: #222;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

.xh-pause-pill::before,
.xh-pause-pill::after {
    content: '';
    width: 3px;
    height: 10px;
    background: #777;
    margin: 0 2px;
    border-radius: 1px;
}

/* =========================
   LOADER
   ========================= */
.xh-loader {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.5);
    z-index: 5;
}

.xh-loader::after {
    content: "";
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* =========================
   UNMUTE BADGE (Icon Only)
   ========================= */
.xh-unmute-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    border-radius: 50%; /* Делаем плашку идеально круглой */
    padding: 10px; /* Равномерный отступ со всех сторон */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    cursor: pointer;
    /* Легкая пульсация */
    animation: pulseUnmute 2s infinite;
}

.xh-mute-icon {
    width: 24px; /* Сделали иконку крупнее, так как нет текста */
    height: 24px;
    fill: #fff;
}

@keyframes pulseUnmute {
    0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); }
    70%  { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
