/**
 * Styles des notifications serveur Hytale
 * Animations dans le widget (comme XP/badges)
 */

/* ========================================
   OVERLAY PRINCIPAL (dans le widget)
   ======================================== */

.hytale-server-notification-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1a2e1a 0%, #162e21 50%, #0f1a15 100%);
    border: 2px solid var(--notif-color, #10b981);
    border-radius: var(--kl-user-radius, 12px);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    overflow: hidden;
    box-shadow:
        0 0 30px rgba(16, 185, 129, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hytale-server-notification-overlay.active {
    opacity: 1;
    pointer-events: auto;
    animation: hytaleOverlayReveal 4s ease-in-out forwards;
}

@keyframes hytaleOverlayReveal {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    8% {
        opacity: 1;
        transform: scale(1.02);
    }
    15% {
        transform: scale(1);
    }
    85% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* ========================================
   PARTICULES
   ======================================== */

.hytale-server-notif-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.hytale-notif-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    bottom: 0;
    animation: hytaleParticleRise 2s ease-out forwards;
    pointer-events: none;
}

@keyframes hytaleParticleRise {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-150px) scale(0);
        opacity: 0;
    }
}

/* ========================================
   CONTENU
   ======================================== */

.hytale-server-notif-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
    gap: 8px;
}

/* Icône */
.hytale-server-notif-icon {
    font-size: 42px;
    animation: hytaleIconBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
    filter: drop-shadow(0 0 15px var(--notif-color, #10b981));
}

@keyframes hytaleIconBounce {
    0% {
        transform: scale(0) rotate(-20deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Titre */
.hytale-server-notif-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--notif-color, #10b981);
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: hytaleFadeIn 0.5s ease 0.3s both;
    text-shadow: 0 0 10px var(--notif-color, #10b981);
}

@keyframes hytaleFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Message (nom du serveur) */
.hytale-server-notif-message {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    animation: hytaleFadeIn 0.5s ease 0.4s both;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Détail */
.hytale-server-notif-detail {
    font-size: 13px;
    font-weight: 500;
    color: var(--notif-color, #10b981);
    animation: hytaleFadeIn 0.5s ease 0.5s both;
}

/* Hint (cliquez pour fermer) */
.hytale-server-notif-hint {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    animation: hytaleFadeIn 0.5s ease 0.6s both;
    margin-top: 4px;
}

/* ========================================
   VARIANTES PAR TYPE
   ======================================== */

/* Vote - Vert clair */
.hytale-server-notification-overlay[data-type="server_vote"] {
    background: linear-gradient(135deg, #1a2e1a 0%, #162e21 50%, #0f1a15 100%);
    border-color: #22c55e;
}

/* Review - Bleu */
.hytale-server-notification-overlay[data-type="server_review"] {
    background: linear-gradient(135deg, #1a1a2e 0%, #162136 50%, #0f0f1a 100%);
    border-color: #3b82f6;
}

/* Rank Up - Émeraude (avec glow plus prononcé) */
.hytale-server-notification-overlay[data-type="server_rank_up"] {
    background: linear-gradient(135deg, #0f2e1a 0%, #0d3321 50%, #0a1f15 100%);
    border-color: #10b981;
    box-shadow:
        0 0 40px rgba(16, 185, 129, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Rank Down - Rouge */
.hytale-server-notification-overlay[data-type="server_rank_down"] {
    background: linear-gradient(135deg, #2e1a1a 0%, #361616 50%, #1a0f0f 100%);
    border-color: #ef4444;
}

.hytale-server-notification-overlay[data-type="server_rank_down"] .hytale-server-notif-title,
.hytale-server-notification-overlay[data-type="server_rank_down"] .hytale-server-notif-detail {
    color: #ef4444;
    text-shadow: 0 0 10px #ef4444;
}

/* ========================================
   ÉTOILES DÉCORATIVES
   ======================================== */

.hytale-server-notification-overlay::before,
.hytale-server-notification-overlay::after {
    content: '✦';
    position: absolute;
    font-size: 12px;
    color: var(--notif-color, #10b981);
    opacity: 0;
    animation: hytaleStarSparkle 2s ease-in-out infinite;
}

.hytale-server-notification-overlay.active::before {
    top: 15%;
    left: 15%;
    animation-delay: 0s;
}

.hytale-server-notification-overlay.active::after {
    bottom: 20%;
    right: 15%;
    animation-delay: 0.5s;
}

@keyframes hytaleStarSparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1) rotate(180deg);
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .hytale-server-notification-overlay {
        display: none !important;
    }
}
