/* ============================================
   VOIDBORNE LEGACY - EVENTS & MAIL STYLES
   Arcane Ink Productions
   ============================================ */

/* ==========================================
   EVENT BANNER
   ========================================== */
#event-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 700;
    transform: translateY(-100%);
    transition: transform 0.5s ease;
}

#event-banner.active {
    transform: translateY(0);
}

.event-banner-content {
    padding: 16px 24px;
    text-align: center;
    position: relative;
}

.event-banner-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 4px;
}

.event-banner-message {
    font-family: var(--font-body);
    font-size: 0.9375rem;
}

.event-banner-countdown {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    margin-top: 8px;
    opacity: 0.8;
}

.event-banner-close {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.7;
}

.event-banner-close:hover {
    opacity: 1;
}

/* Banner Styles */
#event-banner.menacing {
    background: linear-gradient(90deg, #1a0000 0%, #4a0000 50%, #1a0000 100%);
    color: #ff4444;
    border-bottom: 2px solid #dc2626;
    animation: menacingPulse 2s ease-in-out infinite;
}

@keyframes menacingPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(220, 38, 38, 0.3); }
    50% { box-shadow: 0 0 40px rgba(220, 38, 38, 0.6); }
}

#event-banner.arcane {
    background: linear-gradient(90deg, #1a0033 0%, #2d1b4e 50%, #1a0033 100%);
    color: var(--arcane-glow);
    border-bottom: 2px solid var(--arcane-purple);
    animation: arcanePulse 2s ease-in-out infinite;
}

@keyframes arcanePulse {
    0%, 100% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.3); }
    50% { box-shadow: 0 0 40px rgba(139, 92, 246, 0.6); }
}

#event-banner.golden {
    background: linear-gradient(90deg, #1a1500 0%, #3d2800 50%, #1a1500 100%);
    color: var(--gold-ancient);
    border-bottom: 2px solid var(--gold-ancient);
    animation: goldenPulse 2s ease-in-out infinite;
}

@keyframes goldenPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(212, 165, 116, 0.3); }
    50% { box-shadow: 0 0 40px rgba(212, 165, 116, 0.6); }
}

#event-banner.dark {
    background: linear-gradient(90deg, #000 0%, #0a0a0f 50%, #000 100%);
    color: #888;
    border-bottom: 2px solid #333;
}

/* ==========================================
   HERALD TICKER
   ========================================== */
#herald-ticker {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: 28px;
    overflow: hidden;
    z-index: 650;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#herald-ticker.active {
    opacity: 1;
}

.herald-message {
    display: inline-block;
    white-space: nowrap;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 6px 20px;
    animation: heraldScroll 8s linear forwards;
}

@keyframes heraldScroll {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

#herald-ticker.normal { background: rgba(18, 18, 26, 0.9); color: var(--text-secondary); }
#herald-ticker.menacing { background: rgba(50, 0, 0, 0.9); color: #ff4444; }
#herald-ticker.arcane { background: rgba(30, 0, 50, 0.9); color: var(--arcane-glow); }
#herald-ticker.golden { background: rgba(40, 30, 0, 0.9); color: var(--gold-ancient); }

/* ==========================================
   ANNOUNCEMENT MODAL
   ========================================== */
#announcement-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

#announcement-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.announcement-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
}

.announcement-content {
    position: relative;
    max-width: 500px;
    padding: 40px;
    text-align: center;
    border-radius: 8px;
    transform: scale(0.8);
    transition: transform 0.5s ease;
}

#announcement-modal.active .announcement-content {
    transform: scale(1);
    animation: announcementPulse 3s ease-in-out infinite;
}

@keyframes announcementPulse {
    0%, 100% { box-shadow: 0 0 30px currentColor; }
    50% { box-shadow: 0 0 60px currentColor; }
}

.announcement-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.announcement-title {
    font-family: var(--font-display);
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 8px;
}

.announcement-subtitle {
    font-family: var(--font-heading);
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 16px;
}

.announcement-message {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.announcement-btn {
    padding: 12px 32px;
    font-family: var(--font-ui);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.announcement-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Modal Styles */
#announcement-modal.menacing .announcement-content { background: #1a0000; color: #ff4444; border: 2px solid #dc2626; }
#announcement-modal.arcane .announcement-content { background: #1a0033; color: var(--arcane-glow); border: 2px solid var(--arcane-purple); }
#announcement-modal.golden .announcement-content { background: #1a1500; color: var(--gold-ancient); border: 2px solid var(--gold-ancient); }
#announcement-modal.void .announcement-content { background: #000; color: #666; border: 2px solid #333; }

/* ==========================================
   MAIL INDICATOR (HUD)
   ========================================== */
#mail-indicator {
    position: relative;
    width: 230px;
    height: 130px;
    background: url('../img/ui/buttons/messages.png') center/100% 100% no-repeat;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

#mail-indicator:hover {
    filter: brightness(1.2);
}

#mail-indicator.has-mail {
    filter: drop-shadow(0 0 8px var(--gold-ancient));
}

#mail-indicator.pulse {
    animation: mailPulse 0.5s ease 4;
}

@keyframes mailPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 15px var(--gold-ancient)) brightness(1.3); }
}

#mail-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    min-width: 22px;
    height: 22px;
    background: #dc2626;
    border-radius: 50%;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.8);
}

/* ==========================================
   MAIL PANEL
   ========================================== */
#panel-mail .game-panel-body {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 12px;
    padding: 12px;
}

/* ==========================================
   RAVEN CAGE - FANTASY MAIL PANEL
   ========================================== */
#panel-mail {
    min-width: 750px;
    min-height: 550px;
}

#panel-mail .game-panel-body {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    padding: 0;
    height: 480px;
}

.mail-list-container {
    height: 100%;
    overflow-y: auto;
    background: linear-gradient(180deg, rgba(20, 15, 30, 0.95) 0%, rgba(10, 8, 18, 0.98) 100%);
    border-right: 2px solid var(--border-dark);
    position: relative;
}

.mail-list-container::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, var(--arcane-purple), transparent, var(--arcane-purple));
    opacity: 0.5;
}

.mail-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.1) 0%, transparent 100%);
    border-bottom: 1px solid var(--arcane-purple);
    position: sticky;
    top: 0;
    z-index: 5;
}

.mail-list-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--arcane-glow);
    text-shadow: 0 0 10px var(--arcane-glow);
}

.mail-clear-btn {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid var(--border-dark);
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mail-clear-btn:hover {
    color: var(--blood-crimson);
    border-color: var(--blood-crimson);
    background: rgba(220, 38, 38, 0.1);
}

#mail-list {
    padding: 12px;
}

.mail-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(30, 25, 45, 0.9) 0%, rgba(20, 15, 35, 0.95) 100%);
    border: 1px solid var(--border-dark);
    border-left: 4px solid var(--border-dark);
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.mail-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.3), transparent);
}

.mail-item:hover {
    border-color: var(--arcane-purple);
    background: linear-gradient(135deg, rgba(40, 30, 60, 0.95) 0%, rgba(30, 20, 50, 0.98) 100%);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.2);
}

.mail-item.unread {
    background: linear-gradient(135deg, rgba(40, 35, 55, 0.95) 0%, rgba(25, 20, 40, 0.98) 100%);
    border-left-color: var(--gold-ancient);
}

.mail-item.unread::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: var(--gold-ancient);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--gold-ancient);
    animation: mailGlow 2s ease-in-out infinite;
}

@keyframes mailGlow {
    0%, 100% { opacity: 1; box-shadow: 0 0 10px var(--gold-ancient); }
    50% { opacity: 0.6; box-shadow: 0 0 5px var(--gold-ancient); }
}

.mail-item.urgent { border-left-color: #dc2626; }
.mail-item.urgent.unread::after { background: #dc2626; box-shadow: 0 0 10px #dc2626; }
.mail-item.event { border-left-color: var(--arcane-purple); }
.mail-item.event.unread::after { background: var(--arcane-purple); box-shadow: 0 0 10px var(--arcane-purple); }
.mail-item.reward { border-left-color: #22c55e; }
.mail-item.reward.unread::after { background: #22c55e; box-shadow: 0 0 10px #22c55e; }

.mail-item-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.mail-item-content {
    flex: 1;
    min-width: 0;
}

.mail-item-sender {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.mail-item-subject {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mail-reward-icon {
    font-size: 1.125rem;
    filter: drop-shadow(0 0 4px rgba(212, 165, 116, 0.5));
}

.mail-unread-dot {
    display: none; /* Using ::after instead */
}

.mail-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 1rem;
    font-style: italic;
}

.mail-empty::before {
    content: '🦅';
    display: block;
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* ==========================================
   MAIL DETAIL PANEL
   ========================================== */
#mail-detail {
    padding: 24px;
    background: linear-gradient(180deg, rgba(15, 12, 25, 0.98) 0%, rgba(8, 6, 15, 0.99) 100%);
    overflow-y: auto;
    position: relative;
}

#mail-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: radial-gradient(ellipse at 50% 0%, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.mail-detail-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-style: italic;
}

.mail-detail-empty::before {
    content: '📜';
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.mail-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-dark);
    margin-bottom: 20px;
    position: relative;
}

.mail-detail-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-ancient), transparent);
}

.mail-detail-icon {
    font-size: 3.5rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

.mail-detail-meta {
    flex: 1;
}

.mail-detail-sender {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.mail-detail-time {
    font-family: var(--font-ui);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.mail-delete-btn {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.7;
    transition: all var(--transition-fast);
}

.mail-delete-btn:hover {
    opacity: 1;
    background: rgba(220, 38, 38, 0.2);
    border-color: #dc2626;
}

.mail-detail-subject {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--gold-ancient);
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(212, 165, 116, 0.3);
    line-height: 1.3;
}

.mail-detail-body {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-left: 3px solid var(--arcane-purple);
    border-radius: 0 8px 8px 0;
}

.mail-detail-rewards {
    padding: 20px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08) 0%, rgba(22, 101, 52, 0.12) 100%);
    border: 2px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.mail-detail-rewards::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #22c55e, transparent);
}

.mail-rewards-title {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #22c55e;
    margin-bottom: 16px;
}

.mail-rewards-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.reward-item {
    padding: 10px 16px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 6px;
    font-family: var(--font-ui);
    font-size: 0.9375rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.reward-item span:first-child {
    font-size: 1.25rem;
}

.btn-claim-rewards {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #166534 0%, #22c55e 50%, #166534 100%);
    background-size: 200% 100%;
    border: 2px solid #22c55e;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all var(--transition-fast);
    animation: claimShimmer 3s ease infinite;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-claim-rewards:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
    background-position: 100% 0;
}

@keyframes claimShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.rewards-claimed {
    text-align: center;
    padding: 16px;
    color: #22c55e;
    font-family: var(--font-heading);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.rewards-claimed::before {
    content: '✓ ';
}

/* ==========================================
   WORLD FLAG EFFECTS
   ========================================== */

/* ---- BLOOD MOON ---- */
#game-screen.blood-moon .game-world {
    filter: sepia(0.3) hue-rotate(-30deg) brightness(0.85);
    animation: bloodMoonFlicker 8s ease-in-out infinite;
}

@keyframes bloodMoonFlicker {
    0%, 100% { filter: sepia(0.3) hue-rotate(-30deg) brightness(0.85); }
    50% { filter: sepia(0.4) hue-rotate(-25deg) brightness(0.75); }
}

#game-screen.blood-moon::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 85% 15%, rgba(180, 0, 0, 0.4) 0%, transparent 40%),
        radial-gradient(ellipse at center, transparent 50%, rgba(80, 0, 0, 0.3) 100%);
    pointer-events: none;
    z-index: 50;
    animation: bloodMoonPulse 4s ease-in-out infinite;
}

@keyframes bloodMoonPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* ---- VOID CORRUPTION - EPIC MENACING EFFECT ---- */
#game-screen.void-corruption {
    animation: voidScreenShake 10s ease-in-out infinite;
}

@keyframes voidScreenShake {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-1px, 0); }
    50% { transform: translate(1px, -1px); }
    75% { transform: translate(-1px, 1px); }
}

#game-screen.void-corruption .game-world {
    filter: saturate(0.5) brightness(0.7) hue-rotate(20deg);
    animation: voidDistort 3s ease-in-out infinite;
}

@keyframes voidDistort {
    0%, 100% { filter: saturate(0.5) brightness(0.7) hue-rotate(20deg); }
    33% { filter: saturate(0.4) brightness(0.6) hue-rotate(25deg); }
    66% { filter: saturate(0.6) brightness(0.65) hue-rotate(15deg); }
}

#game-screen.void-corruption::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(88, 28, 135, 0.4) 0%, transparent 35%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.3) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.5) 0%, transparent 70%);
    pointer-events: none;
    z-index: 49;
    animation: voidSwirl 8s linear infinite;
}

@keyframes voidSwirl {
    0% { 
        background: 
            radial-gradient(ellipse at 20% 80%, rgba(88, 28, 135, 0.4) 0%, transparent 35%),
            radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.3) 0%, transparent 40%),
            radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.5) 0%, transparent 70%);
    }
    33% { 
        background: 
            radial-gradient(ellipse at 80% 60%, rgba(88, 28, 135, 0.4) 0%, transparent 35%),
            radial-gradient(ellipse at 20% 40%, rgba(139, 92, 246, 0.3) 0%, transparent 40%),
            radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.5) 0%, transparent 70%);
    }
    66% { 
        background: 
            radial-gradient(ellipse at 30% 20%, rgba(88, 28, 135, 0.4) 0%, transparent 35%),
            radial-gradient(ellipse at 70% 80%, rgba(139, 92, 246, 0.3) 0%, transparent 40%),
            radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.5) 0%, transparent 70%);
    }
    100% { 
        background: 
            radial-gradient(ellipse at 20% 80%, rgba(88, 28, 135, 0.4) 0%, transparent 35%),
            radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.3) 0%, transparent 40%),
            radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.5) 0%, transparent 70%);
    }
}

#game-screen.void-corruption::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-conic-gradient(from 0deg at 50% 50%, 
            transparent 0deg, 
            rgba(139, 92, 246, 0.05) 1deg, 
            transparent 2deg);
    pointer-events: none;
    z-index: 50;
    animation: voidRotate 20s linear infinite;
    mix-blend-mode: screen;
}

@keyframes voidRotate {
    0% { transform: rotate(0deg) scale(2); }
    100% { transform: rotate(360deg) scale(2); }
}

/* Void Particles Container */
.void-particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 51;
    overflow: hidden;
}

/* Floating Void Eyes */
.void-eye {
    position: absolute;
    font-size: 2rem;
    opacity: 0;
    animation: voidEyeWatch 8s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.8)) 
            drop-shadow(0 0 20px rgba(88, 28, 135, 0.6));
    transform-origin: center;
}

@keyframes voidEyeWatch {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    20% { opacity: 0.8; transform: scale(1); }
    40% { opacity: 0.9; transform: scale(1.1) rotate(5deg); }
    60% { opacity: 0.7; transform: scale(1) rotate(-5deg); }
    80% { opacity: 0.4; transform: scale(0.8); }
}

/* Void Tendrils rising from bottom */
.void-tendril {
    position: absolute;
    bottom: 0;
    width: 60px;
    height: 200px;
    background: linear-gradient(to top, 
        rgba(88, 28, 135, 0.7) 0%,
        rgba(139, 92, 246, 0.4) 50%,
        transparent 100%);
    animation: tendrilRise 4s ease-in-out infinite;
    border-radius: 30px 30px 0 0;
    filter: blur(3px);
}

@keyframes tendrilRise {
    0%, 100% { 
        height: 100px; 
        opacity: 0.3;
        transform: translateX(0) skewX(0deg);
    }
    25% { 
        height: 250px; 
        opacity: 0.7;
        transform: translateX(-10px) skewX(-5deg);
    }
    50% { 
        height: 180px; 
        opacity: 0.5;
        transform: translateX(5px) skewX(3deg);
    }
    75% { 
        height: 300px; 
        opacity: 0.8;
        transform: translateX(-5px) skewX(-2deg);
    }
}

/* Floating void particles */
.void-particle {
    position: absolute;
    bottom: -20px;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.9) 0%, transparent 70%);
    border-radius: 50%;
    animation: particleFloat 5s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.8), 0 0 20px rgba(88, 28, 135, 0.5);
}

@keyframes particleFloat {
    0% { 
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { 
        transform: translateY(-100vh) translateX(20px) scale(0.3);
        opacity: 0;
    }
}

/* Scan line effect for extra menace */
#game-screen.void-corruption .game-world::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(139, 92, 246, 0.03) 2px,
        rgba(139, 92, 246, 0.03) 4px
    );
    pointer-events: none;
    animation: scanLines 0.1s linear infinite;
}

@keyframes scanLines {
    0% { transform: translateY(0); }
    100% { transform: translateY(4px); }
}

/* ---- MERCHANT FESTIVAL ---- */
#game-screen.merchant-festival .game-world {
    filter: brightness(1.1) saturate(1.2);
}

#game-screen.merchant-festival::after {
    content: '✨';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 30% 30%, rgba(255, 215, 0, 0.1) 0%, transparent 30%),
        radial-gradient(ellipse at 70% 70%, rgba(255, 215, 0, 0.1) 0%, transparent 30%);
    pointer-events: none;
    z-index: 50;
    font-size: 0;
    animation: festivalSparkle 2s ease-in-out infinite;
}

@keyframes festivalSparkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ---- DARKNESS FALLS ---- */
#game-screen.darkness-falls .game-world {
    filter: brightness(0.4) contrast(1.2);
    animation: darknessFlicker 5s ease-in-out infinite;
}

@keyframes darknessFlicker {
    0%, 100% { filter: brightness(0.4) contrast(1.2); }
    50% { filter: brightness(0.35) contrast(1.3); }
    52% { filter: brightness(0.5) contrast(1.1); }
    54% { filter: brightness(0.35) contrast(1.3); }
}

#game-screen.darkness-falls::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 20%, rgba(0, 0, 0, 0.7) 100%);
    pointer-events: none;
    z-index: 50;
}

