/* ============================================
   HN CALENDARIO ESTRENOS ULTIMATE v7
   Diseño tipo Netflix/Streaming PRO
   ============================================ */

/* Variables */
:root {
    --hn-primary: #ff2d75;
    --hn-primary-dark: #d41d5c;
    --hn-secondary: #8b5cf6;
    --hn-accent: #06ffa5;
    --hn-dark-1: #05050a;
    --hn-dark-2: #0c0c14;
    --hn-dark-3: #14141f;
    --hn-dark-4: #1c1c2a;
    --hn-glass: rgba(20, 20, 31, 0.85);
    --hn-glass-border: rgba(255, 255, 255, 0.08);
    --hn-text: #ffffff;
    --hn-text-soft: #a0a0b0;
    --hn-gradient-1: linear-gradient(135deg, #ff2d75, #8b5cf6);
    --hn-gradient-2: linear-gradient(135deg, #06ffa5, #00d4ff);
    --hn-radius: 16px;
    --hn-radius-sm: 10px;
    --hn-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ============ FLOATING ACTION BUTTON ============ */
.hn-fab-wrapper {
    position: fixed;
    bottom: 28px;
    left: 28px;
    z-index: 999990;
}

.hn-fab {
    display: flex;
    align-items: center;
    padding: 0;
    background: linear-gradient(135deg, #ff0055 0%, #ff0088 50%, #cc00ff 100%);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 
        0 10px 40px rgba(255, 0, 136, 0.5),
        0 0 0 2px rgba(255, 255, 255, 0.15) inset,
        0 0 60px rgba(255, 0, 136, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: visible;
    animation: hn-float 3s ease-in-out infinite;
    position: relative;
}

@keyframes hn-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.hn-fab::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 23px;
    background: linear-gradient(135deg, #ff0055, #ff0088, #cc00ff, #ff0088, #ff0055);
    background-size: 300% 300%;
    animation: hn-border-glow 4s ease infinite;
    z-index: 1;
    opacity: 0.8;
}

@keyframes hn-border-glow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hn-fab::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, #ff0055 0%, #ff0088 50%, #cc00ff 100%);
    z-index: 2;
}

.hn-fab:hover {
    transform: scale(1.1) translateY(-8px);
    box-shadow: 
        0 20px 60px rgba(255, 0, 136, 0.6),
        0 0 0 2px rgba(255, 255, 255, 0.25) inset,
        0 0 80px rgba(255, 0, 136, 0.4);
    animation: none;
}

.hn-fab:active {
    transform: scale(1.05) translateY(-4px);
}

.hn-fab.open {
    background: linear-gradient(135deg, #1a1a2e, #2d2d44);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    animation: none;
}

.hn-fab.open::before {
    opacity: 0;
}

.hn-fab.open::after {
    background: linear-gradient(135deg, #1a1a2e, #2d2d44);
}

.hn-fab-inner {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 22px;
}

.hn-fab-icon {
    width: 22px;
    height: 22px;
    color: white;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.hn-fab-label {
    color: white;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    text-transform: uppercase;
}

.hn-fab-count {
    position: absolute;
    top: -12px;
    right: -12px;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    background: linear-gradient(135deg, #00ff88, #00cc66);
    color: #000;
    font-size: 15px;
    font-weight: 900;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 4px 15px rgba(0, 255, 136, 0.6),
        0 0 20px rgba(0, 255, 136, 0.4);
    animation: hn-pulse 1.5s ease-in-out infinite;
    z-index: 999999;
    border: 3px solid #0a0a0f;
    pointer-events: none;
}

.hn-fab-ring {
    position: absolute;
    inset: -8px;
    border-radius: 28px;
    background: transparent;
    border: 3px solid rgba(255, 0, 136, 0.6);
    opacity: 0;
    animation: hn-ring 2.5s ease-out infinite;
    z-index: 0;
}

@keyframes hn-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 15px rgba(0, 255, 136, 0.6); }
    50% { transform: scale(1.15); box-shadow: 0 6px 25px rgba(0, 255, 136, 0.8); }
}

@keyframes hn-ring {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* ============ PANEL ============ */
.hn-panel {
    position: fixed;
    bottom: 90px;
    left: 24px;
    z-index: 999991;
    width: 440px;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - 140px);
    background: var(--hn-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--hn-radius);
    border: 1px solid var(--hn-glass-border);
    box-shadow: var(--hn-shadow);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
}

.hn-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.hn-panel-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at top left, rgba(255, 45, 117, 0.15), transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(139, 92, 246, 0.15), transparent 50%);
    pointer-events: none;
}

/* Header */
.hn-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(180deg, rgba(255, 45, 117, 0.1), transparent);
    border-bottom: 1px solid var(--hn-glass-border);
}

.hn-header-left {
    display: flex;
    align-items: center;
}

.hn-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hn-logo-icon {
    font-size: 32px;
    filter: drop-shadow(0 0 10px rgba(255, 45, 117, 0.5));
    animation: hn-glow 2s ease-in-out infinite alternate;
}

@keyframes hn-glow {
    from { filter: drop-shadow(0 0 5px rgba(255, 45, 117, 0.3)); }
    to { filter: drop-shadow(0 0 15px rgba(255, 45, 117, 0.6)); }
}

.hn-logo-text strong {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--hn-text);
    background: var(--hn-gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hn-logo-text small {
    font-size: 12px;
    color: var(--hn-text-soft);
}

.hn-close {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--hn-glass-border);
    border-radius: 50%;
    color: var(--hn-text-soft);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.hn-close:hover {
    background: var(--hn-primary);
    border-color: var(--hn-primary);
    color: white;
    transform: rotate(90deg);
}

.hn-close svg {
    width: 20px;
    height: 20px;
}

/* Navigation */
.hn-nav {
    display: flex;
    padding: 12px;
    gap: 8px;
    background: var(--hn-dark-2);
}

.hn-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: transparent;
    border: none;
    border-radius: var(--hn-radius-sm);
    color: var(--hn-text-soft);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.hn-nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--hn-text);
}

.hn-nav-btn.active {
    background: var(--hn-gradient-1);
    color: white;
    box-shadow: 0 4px 20px rgba(255, 45, 117, 0.4);
}

.hn-nav-icon {
    font-size: 20px;
}

/* Content */
.hn-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
}

.hn-content::-webkit-scrollbar {
    width: 6px;
}

.hn-content::-webkit-scrollbar-track {
    background: transparent;
}

.hn-content::-webkit-scrollbar-thumb {
    background: var(--hn-secondary);
    border-radius: 3px;
}

.hn-section {
    display: none;
}

.hn-section.active {
    display: block;
    animation: hn-fadeIn 0.4s ease;
}

@keyframes hn-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Empty State */
.hn-empty-state {
    text-align: center;
    padding: 40px 20px;
}

.hn-empty-icon {
    font-size: 60px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.hn-empty-state h3 {
    margin: 0 0 8px;
    color: var(--hn-text);
    font-size: 18px;
}

.hn-empty-state p {
    margin: 0;
    color: var(--hn-text-soft);
    font-size: 14px;
}

/* ============ CARDS ============ */
.hn-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hn-card {
    position: relative;
    display: flex;
    gap: 14px;
    padding: 12px;
    background: var(--hn-dark-3);
    border-radius: var(--hn-radius-sm);
    border: 1px solid transparent;
    transition: all 0.3s;
    animation: hn-slideUp 0.5s ease backwards;
    animation-delay: var(--delay);
}

@keyframes hn-slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hn-card:hover {
    background: var(--hn-dark-4);
    border-color: var(--hn-primary);
    transform: translateX(8px);
    box-shadow: 0 8px 30px rgba(255, 45, 117, 0.2);
}

.hn-card-visual {
    position: relative;
    width: 80px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.hn-card-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.hn-card:hover .hn-card-visual img {
    transform: scale(1.1);
}

.hn-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--hn-dark-4), var(--hn-dark-3));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    opacity: 0.5;
}

.hn-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.8));
    pointer-events: none;
}

/* Countdown Badge */
.hn-countdown {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--hn-secondary);
    padding: 4px 8px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.5);
    z-index: 2;
}

.hn-countdown.soon {
    background: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.5);
}

.hn-countdown.hot {
    background: var(--hn-primary);
    box-shadow: 0 4px 12px rgba(255, 45, 117, 0.5);
    animation: hn-shake 0.5s ease infinite;
}

@keyframes hn-shake {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

.hn-countdown-num {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: white;
    line-height: 1;
}

.hn-countdown-txt {
    font-size: 8px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.8);
    letter-spacing: 0.5px;
}

.hn-countdown-now {
    font-size: 11px;
    font-weight: 800;
    color: white;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* Card Body */
.hn-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hn-card-title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--hn-text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hn-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.hn-tag {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.hn-tag.studio {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.hn-tag.ep {
    background: rgba(255, 45, 117, 0.2);
    color: #ff6b9d;
}

.hn-card-date {
    font-size: 11px;
    color: var(--hn-text-soft);
}

/* Card Link */
.hn-card-link {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--hn-gradient-1);
    border-radius: 6px;
    color: white;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s;
}

.hn-card:hover .hn-card-link {
    opacity: 1;
    transform: translateX(0);
}

.hn-card-link:hover {
    box-shadow: 0 4px 15px rgba(255, 45, 117, 0.5);
}

/* ============ ARCHIVE GRID ============ */
.hn-archive-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.hn-archive-card {
    position: relative;
    aspect-ratio: 16/10;
    border-radius: var(--hn-radius-sm);
    overflow: hidden;
    background: var(--hn-dark-3);
    text-decoration: none;
    transition: all 0.3s;
}

.hn-archive-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(255, 45, 117, 0.3);
}

.hn-archive-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.hn-archive-card:hover img {
    transform: scale(1.1);
}

.hn-archive-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(5,5,10,0.95));
}

.hn-archive-info {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 2;
    color: white;
}

.hn-archive-month {
    display: block;
    font-size: 18px;
    font-weight: 700;
}

.hn-archive-year {
    font-size: 13px;
    color: var(--hn-text-soft);
}

.hn-archive-arrow {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    z-index: 2;
    transition: all 0.3s;
}

.hn-archive-card:hover .hn-archive-arrow {
    background: var(--hn-primary);
    transform: translateX(4px);
}

/* ============ CALENDAR ============ */
.hn-cal {
    background: var(--hn-dark-3);
    border-radius: var(--hn-radius-sm);
    padding: 16px;
}

.hn-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.hn-cal-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--hn-text);
}

.hn-cal-btn {
    width: 36px;
    height: 36px;
    background: var(--hn-dark-4);
    border: 1px solid var(--hn-glass-border);
    border-radius: 8px;
    color: var(--hn-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.hn-cal-btn:hover {
    background: var(--hn-secondary);
    border-color: var(--hn-secondary);
}

.hn-cal-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.hn-cal-week span {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--hn-text-soft);
    padding: 8px 0;
}

.hn-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.hn-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hn-dark-4);
    border-radius: 8px;
    font-size: 13px;
    color: var(--hn-text-soft);
    cursor: default;
    transition: all 0.2s;
    position: relative;
}

.hn-day.other {
    opacity: 0.3;
}

.hn-day.today {
    background: rgba(139, 92, 246, 0.3);
    color: white;
    font-weight: 700;
    box-shadow: inset 0 0 0 2px var(--hn-secondary);
}

.hn-day.has {
    background: var(--hn-gradient-1);
    color: white;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 45, 117, 0.4);
}

.hn-day.has:hover {
    transform: scale(1.15);
    z-index: 10;
}

.hn-day.has::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 6px;
    height: 6px;
    background: var(--hn-accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--hn-accent);
}

/* ============ OVERLAY ============ */
.hn-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 10, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999989;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.hn-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ============ MODAL ============ */
.hn-modal {
    position: fixed;
    inset: 0;
    z-index: 999992;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.hn-modal.open {
    opacity: 1;
    visibility: visible;
}

.hn-modal-box {
    background: var(--hn-dark-2);
    border-radius: var(--hn-radius);
    border: 1px solid var(--hn-glass-border);
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.hn-modal.open .hn-modal-box {
    transform: scale(1);
}

.hn-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--hn-gradient-1);
}

.hn-modal-head h3 {
    margin: 0;
    font-size: 16px;
    color: white;
}

.hn-modal-close {
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.3);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.hn-modal-close:hover {
    background: rgba(0,0,0,0.5);
}

.hn-modal-content {
    padding: 16px;
    max-height: 60vh;
    overflow-y: auto;
}

.hn-modal-item {
    padding: 14px;
    background: var(--hn-dark-3);
    border-radius: var(--hn-radius-sm);
    margin-bottom: 10px;
}

.hn-modal-item:last-child {
    margin-bottom: 0;
}

.hn-modal-item h4 {
    margin: 0 0 8px;
    font-size: 14px;
    color: white;
}

.hn-modal-item p {
    margin: 0 0 12px;
    font-size: 12px;
    color: var(--hn-text-soft);
}

.hn-modal-item a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--hn-gradient-1);
    border-radius: 6px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.hn-modal-item a:hover {
    box-shadow: 0 4px 20px rgba(255, 45, 117, 0.5);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 520px) {
    .hn-fab-wrapper {
        bottom: 20px;
        left: 20px;
    }
    
    .hn-fab {
        border-radius: 18px;
    }
    
    .hn-fab::before {
        border-radius: 21px;
    }
    
    .hn-fab::after {
        border-radius: 18px;
    }
    
    .hn-fab-inner {
        padding: 14px 18px;
        gap: 8px;
    }
    
    .hn-fab-icon {
        width: 20px;
        height: 20px;
    }
    
    .hn-fab-label {
        font-size: 13px;
        letter-spacing: 0.3px;
    }
    
    .hn-fab-count {
        top: -10px;
        right: -10px;
        min-width: 28px;
        height: 28px;
        font-size: 13px;
        border: 2px solid #0a0a0f;
    }
    
    .hn-fab-ring {
        inset: -6px;
        border-radius: 24px;
    }
    
    .hn-panel {
        bottom: 85px;
        left: 12px;
        right: 12px;
        width: auto;
        max-height: calc(100vh - 110px);
    }
    
    .hn-archive-grid {
        grid-template-columns: 1fr;
    }
    
    .hn-card-visual {
        width: 70px;
        height: 90px;
    }
    
    .hn-nav-btn span:not(.hn-nav-icon) {
        display: none;
    }
}
