/**
 * ============================================
 * 🌟 STELLAR POINTS - FRONTEND STYLES - FIXED
 * ============================================
 */

/* ============================================
   LOADING STATE
   ============================================ */
body.stellar-loading {
    cursor: wait;
}

body.stellar-loading .btn-mark-watched {
    opacity: 0.6;
    pointer-events: none;
}

/* ============================================
   POINTS BADGE - STICKY
   ============================================ */
.stellar-badge {
    position: fixed;
    top: 100px;
    right: 20px;
    background: linear-gradient(135deg, #7476FC 0%, #5B5DD9 100%);
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(116, 118, 252, 0.4);
    z-index: 9999;
    animation: stellar-badge-pulse 2s infinite;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.stellar-badge:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 30px rgba(116, 118, 252, 0.6);
}

.stellar-badge:active {
    transform: translateY(-1px) scale(0.98);
}

.stellar-icon {
    font-size: 20px;
    animation: stellar-icon-rotate 3s linear infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.stellar-count {
    color: #fff;
    font-weight: 900;
    font-size: 18px;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    min-width: 30px;
    text-align: center;
}

.stellar-count.stellar-updating {
    animation: stellar-count-update 0.6s ease;
}

.stellar-label {
    color: rgba(255, 255, 255, 0.95);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes stellar-badge-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.90;
    }
}

@keyframes stellar-icon-rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes stellar-count-update {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
        color: #FFD700;
    }
    100% {
        transform: scale(1);
    }
}

/* ============================================
   NOTIFICATIONS CONTAINER
   ============================================ */
.stellar-notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.stellar-notification {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    display: flex;
    align-items: center;
    gap: 14px;
    animation: stellar-notification-slide-in 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 320px;
    max-width: 400px;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stellar-notification:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(16, 185, 129, 0.6);
}

.stellar-notification-error {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.stellar-notification-error:hover {
    box-shadow: 0 6px 30px rgba(239, 68, 68, 0.6);
}

.stellar-notification-icon {
    font-size: 28px;
    flex-shrink: 0;
    animation: stellar-icon-bounce 0.6s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.stellar-notification-content {
    flex: 1;
}

.stellar-notification-title {
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 4px;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.stellar-notification-message {
    font-size: 14px;
    opacity: 0.95;
    line-height: 1.3;
}

@keyframes stellar-notification-slide-in {
    from {
        transform: translateX(450px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes stellar-icon-bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* ============================================
   WATCH BUTTON - Points Received State
   ============================================ */
.btn-mark-watched.points-received {
    position: relative;
    overflow: visible;
}

.btn-mark-watched.points-received::after {
    content: '✅ Puncte Primite';
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.5);
    animation: stellar-points-badge-appear 0.5s ease;
    white-space: nowrap;
}

@keyframes stellar-points-badge-appear {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   📱 RESPONSIVE - MOBILE (FIXED!)
   ============================================ */

/* Tablet & Mobile - 768px și mai mic */
@media (max-width: 768px) {
    .stellar-badge {
        /* FORȚEAZĂ POZIȚIE FIX ÎN COLȚ DREAPTA-SUS */
        position: fixed !important;
        top: 10px !important;
        right: 10px !important;
        bottom: auto !important; /* ELIMINĂ BOTTOM! */
        left: auto !important;
        
        /* Sizing */
        padding: 8px 14px !important;
        gap: 6px !important;
        
        /* Z-index foarte mare */
        z-index: 99999 !important;
    }
    
    .stellar-icon {
        font-size: 18px !important;
    }
    
    .stellar-count {
        font-size: 16px !important;
    }
    
    /* Ascunde textul "PUNCTE" */
    .stellar-label {
        display: none !important;
    }
    
    /* Notifications jos */
    .stellar-notifications {
        top: auto !important;
        bottom: 20px !important;
        right: 10px !important;
        left: 10px !important;
    }
    
    .stellar-notification {
        min-width: auto !important;
        max-width: none !important;
        padding: 14px 18px !important;
    }
    
    .stellar-notification-icon {
        font-size: 24px !important;
    }
    
    .stellar-notification-title {
        font-size: 14px !important;
    }
    
    .stellar-notification-message {
        font-size: 13px !important;
    }
}

/* Mobile mic - 480px și mai mic */
@media (max-width: 480px) {
    .stellar-badge {
        /* MENȚINE POZIȚIE SUS! */
        position: fixed !important;
        top: 8px !important;
        right: 8px !important;
        bottom: auto !important; /* NU LĂSA BOTTOM! */
        
        /* Mai mic */
        padding: 6px 12px !important;
    }
    
    .stellar-icon {
        font-size: 16px !important;
    }
    
    .stellar-count {
        font-size: 14px !important;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .stellar-badge,
    .stellar-icon,
    .stellar-notification,
    .stellar-count {
        animation: none !important;
    }
    
    .stellar-badge:hover,
    .stellar-notification:hover {
        transform: none !important;
    }
}

/* Focus states pentru accessibility */
.stellar-badge:focus-visible,
.stellar-notification:focus-visible {
    outline: 3px solid #7476FC;
    outline-offset: 2px;
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */
@media (prefers-color-scheme: dark) {
    .stellar-badge {
        box-shadow: 0 4px 20px rgba(116, 118, 252, 0.5);
    }
    
    .stellar-notification {
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.5);
    }
}

/* ============================================
   PRINT - Hide elements
   ============================================ */
@media print {
    .stellar-badge,
    .stellar-notifications {
        display: none !important;
    }
}







/* ============================================
   🚫 MOBILE - ASCUNDE BADGE COMPLET
   ============================================ */
@media (max-width: 768px) {
    .stellar-badge {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        top: -9999px !important;
        left: -9999px !important;
    }
}