/* ============================================
 * Cumbia News - Main Stylesheet
 * ============================================ */

/* Custom scrollbar for webkit */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #121212; 
}
::-webkit-scrollbar-thumb {
    background: #2D2D35; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #FF6B35; 
}

/* ============================================
 * Player
 * ============================================ */
.glass-player {
    background: rgba(30, 30, 36, 0.95);
    backdrop-filter: blur(12px);
}

.lyrics-section {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(30, 30, 36, 0.9) 100%);
    border-left: 4px solid #FF6B35;
}

.news-detail-overlay {
    animation: slideUp 0.3s ease-out;
}

.playing-now {
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.3);
}

/* ============================================
 * Typewriter Effect
 * ============================================ */
.typewriter {
    overflow: hidden;
    border-right: .15em solid #FF6B35;
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: .15em;
    animation: 
        typing 3.5s steps(40, end),
        blink-caret .75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #FF6B35; }
}

/* ============================================
 * Clickable Indicators
 * ============================================ */
.clickable-indicator {
    position: relative;
    display: inline-block;
}

.clickable-indicator::after {
    content: "👈 Click para ver letra y resumen";
    position: absolute;
    bottom: -25px;
    left: 0;
    background: #FF6B35;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(5px);
    pointer-events: none;
    z-index: 100;
}

.clickable-indicator:hover::after {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
 * News Cards
 * ============================================ */
.news-card {
    transition: all 0.3s ease;
    position: relative;
}

.news-card:hover {
    transform: translateY(-4px);
}

.news-card:hover .news-overlay {
    opacity: 1;
}

.news-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(255, 107, 53, 0.9), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    border-radius: 1rem;
}

.user-cumbia-card {
    border: 2px solid #10B981;
}

.user-cumbia-card:hover {
    border-color: #34D399;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

/* ============================================
 * Share
 * ============================================ */
.share-btn {
    transition: all 0.2s ease;
}

.share-btn:hover {
    transform: scale(1.1);
    background-color: #3B82F6;
}

.share-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 200;
    display: none;
    justify-content: center;
    align-items: center;
}

.share-modal {
    background: #1E1E24;
    border-radius: 1.5rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    animation: slideUp 0.3s ease-out;
}

/* ============================================
 * Popup / Modal de Detalles
 * ============================================ */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.popup-content {
    background: #1E1E24;
    border-radius: 1.5rem;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    border: 2px solid #FF6B35;
    box-shadow: 0 20px 60px rgba(255, 107, 53, 0.3);
    animation: slideInRight 0.3s ease-out;
}

.popup-header {
    background: linear-gradient(135deg, #FF6B35 0%, #FFD166 100%);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-body {
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(90vh - 120px);
}

.popup-tabs {
    display: flex;
    border-bottom: 2px solid #2D2D35;
    margin-bottom: 1.5rem;
}

.popup-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    color: #b3b3b3;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.popup-tab:hover {
    color: white;
}

.popup-tab.active {
    color: #FF6B35;
}

.popup-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #FF6B35;
}

.popup-tab-content {
    display: none;
}

.popup-tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

/* ============================================
 * Lyrics
 * ============================================ */
.lyrics-line {
    padding: 0.5rem 0;
    border-bottom: 1px solid #2D2D35;
}

.lyrics-line:last-child {
    border-bottom: none;
}

.lyrics-section-title {
    color: #FF6B35;
    font-weight: bold;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.lyrics-text {
    color: white;
    line-height: 1.6;
    padding-left: 1rem;
}

/* ============================================
 * Context
 * ============================================ */
.context-text {
    color: #b3b3b3;
    line-height: 1.8;
    font-size: 1.1rem;
}

.context-text p {
    margin-bottom: 1rem;
}

/* ============================================
 * News Meta
 * ============================================ */
.news-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.news-meta-item {
    background: #2D2D35;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
 * Popup Close Button
 * ============================================ */
.popup-close {
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.popup-close:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: rotate(90deg);
}

/* ============================================
 * Popup Audio Player
 * ============================================ */
.popup-audio-player {
    background: #2D2D35;
    border-radius: 1rem;
    padding: 1rem;
    margin-top: 1.5rem;
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.play-popup-btn {
    background: #FF6B35;
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-popup-btn:hover {
    background: #ff5a1f;
    transform: scale(1.05);
}

.audio-progress {
    flex: 1;
    height: 4px;
    background: #3D3D45;
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
}

.audio-progress-bar {
    height: 100%;
    background: #FF6B35;
    width: 0%;
    transition: width 0.1s linear;
}

.audio-time {
    color: #b3b3b3;
    font-size: 0.9rem;
    min-width: 100px;
    text-align: center;
}

/* ============================================
 * Responsive
 * ============================================ */
@media (max-width: 768px) {
    .popup-content {
        max-height: 95vh;
    }
    
    .popup-body {
        padding: 1rem;
        max-height: calc(95vh - 120px);
    }
    
    .popup-header {
        padding: 1rem;
    }
    
    .popup-tabs {
        overflow-x: auto;
        white-space: nowrap;
    }
}
