/* ========================================
   COMPACT VOICE CARDS
   Компактные карточки голосов
   ======================================== */

.voice-card-compact {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
    overflow: hidden;
}

.voice-card-compact::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 0, 60, 0.03), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.voice-card-compact:hover {
    border-color: rgba(255, 0, 60, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(255, 0, 60, 0.15);
}

.voice-card-compact:hover::before {
    opacity: 1;
}

/* Активный плеер - зеленая рамка с анимацией */
.voice-card-compact.playing {
    border-color: rgba(0, 255, 100, 0.5);
    box-shadow: 0 0 20px rgba(0, 255, 100, 0.2), 0 6px 24px rgba(0, 255, 100, 0.15);
    animation: playingPulse 2s ease-in-out infinite;
}

.voice-card-compact.playing::before {
    background: linear-gradient(135deg, rgba(0, 255, 100, 0.05), transparent);
    opacity: 1;
}

@keyframes playingPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 255, 100, 0.2), 0 6px 24px rgba(0, 255, 100, 0.15);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 255, 100, 0.35), 0 8px 32px rgba(0, 255, 100, 0.25);
    }
}

/* Badge - звёздочка для топовых */
.card-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFD700;
    filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.7));
    z-index: 5;
}

.card-badge svg {
    width: 12px;
    height: 12px;
}

/* Header */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
}

.card-code {
    font-size: 14px;
    letter-spacing: 0.5px;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 0, 60, 0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    /* Код — идентификатор голоса, его не режем: при нехватке места
       сжимается название языка справа */
    flex-shrink: 0;
}

a.card-code:hover {
    color: #00f2ff;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    min-width: 0;
}

.meta-lang {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Узкие карточки: сначала убираем точку-разделитель, потом уводим пол+язык
   на вторую строку — код голоса всегда виден целиком */
@media (max-width: 1400px) {
    .meta-separator { display: none; }
}

@media (max-width: 1200px) {
    .card-header { flex-wrap: wrap; gap: 2px 6px; }
    .card-meta { width: 100%; }
}

.meta-gender {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 10px;
}

.meta-gender.male {
    background: rgba(100, 150, 255, 0.15);
    color: #6496ff;
    border: 1px solid rgba(100, 150, 255, 0.3);
}

.meta-gender.female {
    background: rgba(255, 100, 200, 0.15);
    color: #ff64c8;
    border: 1px solid rgba(255, 100, 200, 0.3);
}

.meta-separator {
    opacity: 0.3;
}

.meta-lang {
    font-weight: 500;
}

/* Info */
.card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.info-label {
    color: rgba(255, 255, 255, 0.4);
}

.info-value {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Styles */
.card-styles {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.style-tag {
    padding: 4px 8px;
    background: rgba(255, 0, 60, 0.08);
    border: 1px solid rgba(255, 0, 60, 0.2);
    border-radius: 4px;
    font-size: 9px;
    color: var(--accent-red);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 600;
}

.style-more {
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.5);
}

/* Compact Player */
.card-player {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-play-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: rgba(255, 0, 60, 0.1);
    border: 1px solid rgba(255, 0, 60, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-red);
    cursor: pointer;
    transition: all 0.2s ease;
}

.player-play-btn:hover {
    background: rgba(255, 0, 60, 0.2);
    transform: scale(1.05);
}

.player-play-btn:active {
    transform: scale(0.95);
}

.card-player.playing .icon-play {
    display: none;
}

.card-player.playing .icon-pause {
    display: block !important;
}

.player-progress-area {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.player-time-current,
.player-time-total {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

.player-progress-track {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.player-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-red), #ff6b9d);
    width: 0;
    transition: width 0.1s linear;
}

.player-controls {
    position: relative;
    flex-shrink: 0;
}

.player-control-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.player-control-btn:hover {
    background: rgba(255, 0, 60, 0.1);
    border-color: rgba(255, 0, 60, 0.3);
}

.speed-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.speed-dropdown {
    position: absolute;
    bottom: calc(100% + 4px);
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 0, 60, 0.3);
    border-radius: 6px;
    padding: 4px;
    display: none;
    flex-direction: column;
    gap: 2px;
    z-index: 100;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.player-controls:hover .speed-dropdown {
    display: flex;
}

.speed-dropdown button {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.speed-dropdown button:hover {
    background: rgba(255, 0, 60, 0.15);
    border-color: rgba(255, 0, 60, 0.3);
    color: #fff;
}

.speed-dropdown button.active {
    background: rgba(255, 0, 60, 0.2);
    border-color: var(--accent-red);
    color: var(--accent-red);
}

/* Footer */
.card-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: auto;
}

.card-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.price-amount {
    font-size: 18px;
    color: var(--accent-red);
    letter-spacing: -0.5px;
    font-weight: 700;
}

.price-currency {
    font-size: 12px;
    color: var(--accent-red);
    opacity: 0.8;
    font-family: 'JetBrains Mono', monospace;
}

.price-unit {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    margin-left: 4px;
}

/* Card Actions */
.card-actions {
    display: flex;
    gap: 6px;
}

.card-actions .btn-cart,
.card-actions .btn-pay {
    flex: 1;
    justify-content: center;
}

/* Cart Button (Заявка) */
.btn-cart {
    padding: 6px 10px;
    background: rgba(255, 0, 60, 0.08);
    border: 1px solid rgba(255, 0, 60, 0.3);
    border-radius: 6px;
    color: var(--accent-red);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-cart::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-red);
    transform: translateY(100%);
    transition: transform 0.2s ease;
}

.btn-cart:hover::before {
    transform: translateY(0);
}

.btn-cart:hover {
    color: #fff;
    box-shadow: 0 4px 16px rgba(255, 0, 60, 0.3);
}

.btn-cart .btn-icon,
.btn-cart .btn-label {
    position: relative;
    z-index: 2;
}

.btn-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

.btn-sub {
    font-size: 9px;
    font-weight: 600;
    opacity: 1;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-cart:active {
    transform: scale(0.97);
}

/* В заявке */
.btn-cart.in-cart .btn-sub {
    display: none;
}

.btn-cart.in-cart {
    background: rgba(0, 255, 100, 0.08);
    border-color: rgba(0, 255, 100, 0.4);
    color: #00ff64;
}

.btn-cart.in-cart::before {
    background: #00ff64;
}

.btn-cart.in-cart:hover {
    color: #000;
    box-shadow: 0 4px 16px rgba(0, 255, 100, 0.3);
}

/* Pay Button (Оплатить) */
.btn-pay {
    padding: 6px 10px;
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 6px;
    color: #22c55e;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-pay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #22c55e;
    transform: translateY(100%);
    transition: transform 0.2s ease;
}

.btn-pay:hover::before {
    transform: translateY(0);
}

.btn-pay:hover {
    color: #fff;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}

.btn-pay .btn-icon,
.btn-pay .btn-label {
    position: relative;
    z-index: 2;
}

.btn-pay:active {
    transform: scale(0.97);
}

/* Responsive */
@media (max-width: 768px) {
    .voice-card-compact {
        padding: 14px;
        gap: 10px;
    }

    .card-code {
        font-size: 13px;
    }

    .card-player {
        flex-wrap: wrap;
    }

    .player-progress-area {
        order: 3;
        width: 100%;
        margin-top: 4px;
    }

    .btn-cart,
    .btn-pay {
        padding: 8px 6px;
    }
}