/**
 * Raid Enhancement CSS
 * Visual effects and styling for raid battle obstacles and enhancements
 * Integrates with existing battle.css without conflicts
 */

/* ===========================================
   RAID STATUS DISPLAY
   =========================================== */

.raid-status-display {
    position: fixed;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid #0f3460;
    border-radius: 8px;
    padding: 12px 16px;
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    min-width: 200px;
}

.raid-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.raid-type {
    font-weight: bold;
    font-size: 16px;
    color: #ffd700;
    text-transform: capitalize;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.raid-phase {
    color: #ff6b6b;
    font-weight: 600;
    animation: phase-pulse 2s ease-in-out infinite;
}

.boss-health {
    color: #4ecdc4;
    font-weight: 500;
}

@keyframes phase-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ===========================================
   RAID MESSAGE DISPLAY
   =========================================== */

.raid-message-display {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 20px 30px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(255, 107, 107, 0.4);
    border: 3px solid #ff8a80;
    animation: raid-message-appear 0.5s ease-out;
    max-width: 80%;
    word-wrap: break-word;
}

@keyframes raid-message-appear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ===========================================
   FIELD ZONE RAID OVERLAYS
   =========================================== */

.field-zone {
    position: relative;
    overflow: hidden;
}

.raid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    z-index: 5;
    border-radius: 8px;
}

/* ===========================================
   BLOCKED LANES
   =========================================== */

.field-zone.raid-blocked {
    background: linear-gradient(45deg, 
        rgba(139, 0, 0, 0.7) 0%, 
        rgba(178, 34, 34, 0.7) 25%, 
        rgba(139, 0, 0, 0.7) 50%, 
        rgba(178, 34, 34, 0.7) 75%, 
        rgba(139, 0, 0, 0.7) 100%);
    background-size: 20px 20px;
    animation: blocked-pulse 1.5s ease-in-out infinite;
    pointer-events: none !important;
    border: 2px solid #8b0000 !important;
}

.blocked-overlay {
    background: rgba(139, 0, 0, 0.9);
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid #ff0000;
    border-radius: 6px;
    animation: blocked-text-flash 1s ease-in-out infinite;
}

@keyframes blocked-pulse {
    0%, 100% { 
        background-position: 0 0;
        box-shadow: 0 0 10px rgba(139, 0, 0, 0.5);
    }
    50% { 
        background-position: 10px 10px;
        box-shadow: 0 0 20px rgba(139, 0, 0, 0.8);
    }
}

@keyframes blocked-text-flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ===========================================
   VOID HAZARDS
   =========================================== */

.field-zone.raid-hazard-void {
    background: radial-gradient(circle at center, 
        rgba(75, 0, 130, 0.8) 0%, 
        rgba(138, 43, 226, 0.6) 30%, 
        rgba(148, 0, 211, 0.7) 70%, 
        rgba(75, 0, 130, 0.9) 100%);
    animation: void-swirl 3s linear infinite;
    border: 2px solid #9370db;
}

.hazard-overlay.void_rift {
    background: linear-gradient(135deg, 
        rgba(75, 0, 130, 0.9), 
        rgba(138, 43, 226, 0.9));
    color: #e6e6fa;
    border: 1px solid #9370db;
    animation: void-text-flicker 2s ease-in-out infinite;
}

@keyframes void-swirl {
    0% { 
        background-position: 0 0;
        filter: hue-rotate(0deg);
    }
    50% {
        filter: hue-rotate(15deg);
    }
    100% { 
        background-position: 20px 20px;
        filter: hue-rotate(0deg);
    }
}

@keyframes void-text-flicker {
    0%, 100% { opacity: 1; text-shadow: 0 0 8px #9370db; }
    25% { opacity: 0.7; text-shadow: 0 0 12px #8a2be2; }
    50% { opacity: 0.9; text-shadow: 0 0 6px #9370db; }
    75% { opacity: 0.8; text-shadow: 0 0 10px #8a2be2; }
}

/* ===========================================
   LAVA HAZARDS
   =========================================== */

.field-zone.raid-hazard-lava {
    background: radial-gradient(ellipse at center, 
        rgba(255, 69, 0, 0.9) 0%, 
        rgba(255, 140, 0, 0.7) 30%, 
        rgba(255, 99, 71, 0.8) 70%, 
        rgba(178, 34, 34, 0.9) 100%);
    animation: lava-bubble 2s ease-in-out infinite;
    border: 2px solid #ff4500;
}

.hazard-overlay.lava_pool {
    background: linear-gradient(135deg, 
        rgba(255, 69, 0, 0.95), 
        rgba(255, 140, 0, 0.95));
    color: #fff8dc;
    border: 1px solid #ff6347;
    animation: lava-text-glow 1.5s ease-in-out infinite;
}

@keyframes lava-bubble {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 15px rgba(255, 69, 0, 0.6);
    }
    25% { 
        transform: scale(1.02);
        box-shadow: 0 0 25px rgba(255, 140, 0, 0.8);
    }
    50% { 
        transform: scale(1.01);
        box-shadow: 0 0 20px rgba(255, 69, 0, 0.7);
    }
    75% { 
        transform: scale(1.03);
        box-shadow: 0 0 30px rgba(255, 99, 71, 0.9);
    }
}

@keyframes lava-text-glow {
    0%, 100% { 
        text-shadow: 0 0 8px #ff4500, 0 0 16px #ff6347;
        color: #fff8dc;
    }
    50% { 
        text-shadow: 0 0 12px #ff6347, 0 0 24px #ff8c00;
        color: #ffffff;
    }
}

/* ===========================================
   WATER HAZARDS
   =========================================== */

.field-zone.raid-hazard-whirlpool {
    background: radial-gradient(circle at center, 
        rgba(0, 191, 255, 0.8) 0%, 
        rgba(30, 144, 255, 0.6) 30%, 
        rgba(65, 105, 225, 0.7) 70%, 
        rgba(25, 25, 112, 0.9) 100%);
    animation: whirlpool-spin 2.5s linear infinite;
    border: 2px solid #00bfff;
}

.hazard-overlay.whirlpool {
    background: linear-gradient(135deg, 
        rgba(0, 191, 255, 0.9), 
        rgba(30, 144, 255, 0.9));
    color: #f0f8ff;
    border: 1px solid #87ceeb;
    animation: whirlpool-text-spin 3s ease-in-out infinite;
}

@keyframes whirlpool-spin {
    0% { 
        transform: rotate(0deg);
        background-position: 0 0;
    }
    100% { 
        transform: rotate(360deg);
        background-position: 15px 15px;
    }
}

@keyframes whirlpool-text-spin {
    0% { 
        transform: rotate(0deg);
        text-shadow: 0 0 8px #00bfff;
    }
    25% { 
        transform: rotate(5deg);
        text-shadow: 0 0 12px #1e90ff;
    }
    50% { 
        transform: rotate(0deg);
        text-shadow: 0 0 10px #4169e1;
    }
    75% { 
        transform: rotate(-5deg);
        text-shadow: 0 0 12px #1e90ff;
    }
    100% { 
        transform: rotate(0deg);
        text-shadow: 0 0 8px #00bfff;
    }
}

/* ===========================================
   MIST HAZARDS
   =========================================== */

.field-zone.raid-hazard-mist {
    background: linear-gradient(45deg, 
        rgba(128, 128, 128, 0.6) 0%, 
        rgba(169, 169, 169, 0.4) 25%, 
        rgba(192, 192, 192, 0.5) 50%, 
        rgba(169, 169, 169, 0.4) 75%, 
        rgba(128, 128, 128, 0.6) 100%);
    animation: mist-drift 4s ease-in-out infinite;
    border: 2px solid #a9a9a9;
}

.hazard-overlay.mist {
    background: linear-gradient(135deg, 
        rgba(128, 128, 128, 0.8), 
        rgba(169, 169, 169, 0.8));
    color: #2f4f4f;
    border: 1px solid #c0c0c0;
    animation: mist-text-fade 3s ease-in-out infinite;
}

@keyframes mist-drift {
    0%, 100% { 
        background-position: 0 0;
        opacity: 0.7;
    }
    25% { 
        background-position: 10px 5px;
        opacity: 0.5;
    }
    50% { 
        background-position: 20px 0px;
        opacity: 0.8;
    }
    75% { 
        background-position: 30px -5px;
        opacity: 0.6;
    }
}

@keyframes mist-text-fade {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 0.5; }
}

/* ===========================================
   BREAKABLE BARRIERS
   =========================================== */

.field-zone.raid-blocked.breakable {
    background: linear-gradient(45deg, 
        rgba(139, 69, 19, 0.8) 0%, 
        rgba(160, 82, 45, 0.6) 25%, 
        rgba(139, 69, 19, 0.8) 50%, 
        rgba(160, 82, 45, 0.6) 75%, 
        rgba(139, 69, 19, 0.8) 100%);
    border: 3px solid #8b4513;
    animation: barrier-crack 2s ease-in-out infinite;
}

@keyframes barrier-crack {
    0%, 100% { 
        border-style: solid;
        filter: brightness(1);
    }
    25% { 
        border-style: dashed;
        filter: brightness(1.1);
    }
    50% { 
        border-style: dotted;
        filter: brightness(0.9);
    }
    75% { 
        border-style: dashed;
        filter: brightness(1.1);
    }
}

/* ===========================================
   PHASE TRANSITION EFFECTS
   =========================================== */

.raid-phase-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, 
        rgba(255, 0, 0, 0.1), 
        rgba(255, 69, 0, 0.1), 
        rgba(255, 140, 0, 0.1));
    z-index: 9998;
    pointer-events: none;
    animation: phase-transition-flash 2s ease-out forwards;
}

@keyframes phase-transition-flash {
    0% { opacity: 0; }
    20% { opacity: 1; }
    100% { opacity: 0; }
}

/* ===========================================
   BOSS ABILITY INDICATORS
   =========================================== */

.boss-ability-warning {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 69, 0, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    z-index: 10;
    animation: warning-bounce 1s ease-in-out infinite;
    white-space: nowrap;
}

@keyframes warning-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

/* ===========================================
   ENVIRONMENTAL INTENSITY INDICATORS
   =========================================== */

.field-zone[data-intensity="1"] {
    filter: brightness(1.1);
}

.field-zone[data-intensity="2"] {
    filter: brightness(1.2) saturate(1.1);
}

.field-zone[data-intensity="3"] {
    filter: brightness(1.3) saturate(1.2) contrast(1.1);
}

/* ===========================================
   CORRUPTION EFFECTS
   =========================================== */

.card.corrupted {
    border: 2px solid #8a2be2 !important;
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.6) !important;
    animation: corruption-pulse 2s ease-in-out infinite !important;
}

.card.corrupted::before {
    content: "CORRUPTED";
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #8a2be2;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 8px;
    font-weight: bold;
    z-index: 10;
}

@keyframes corruption-pulse {
    0%, 100% { 
        box-shadow: 0 0 15px rgba(138, 43, 226, 0.6);
        border-color: #8a2be2;
    }
    50% { 
        box-shadow: 0 0 25px rgba(138, 43, 226, 0.9);
        border-color: #9370db;
    }
}

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */

@media (max-width: 768px) {
    .raid-status-display {
        top: 5px;
        right: 5px;
        padding: 8px 12px;
        font-size: 12px;
        min-width: 150px;
    }
    
    .raid-type {
        font-size: 14px;
    }
    
    .raid-message-display {
        padding: 15px 20px;
        font-size: 16px;
        max-width: 90%;
    }
    
    .boss-ability-warning {
        font-size: 10px;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .raid-status-display {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        margin-bottom: 10px;
        border-radius: 4px;
    }
    
    .raid-info {
        flex-direction: row;
        justify-content: space-between;
        gap: 8px;
    }
    
    .raid-overlay {
        font-size: 10px;
    }
}

/* ===========================================
   ACCESSIBILITY ENHANCEMENTS
   =========================================== */

@media (prefers-reduced-motion: reduce) {
    .field-zone.raid-blocked,
    .field-zone.raid-hazard-void,
    .field-zone.raid-hazard-lava,
    .field-zone.raid-hazard-whirlpool,
    .field-zone.raid-hazard-mist,
    .raid-phase,
    .blocked-overlay,
    .hazard-overlay,
    .card.corrupted {
        animation: none !important;
    }
    
    .raid-phase {
        opacity: 1 !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .field-zone.raid-blocked {
        border-width: 3px;
        background: rgba(255, 0, 0, 0.9);
    }
    
    .raid-overlay {
        background: rgba(0, 0, 0, 0.9) !important;
        border: 2px solid white;
    }
    
    .raid-status-display {
        border-width: 3px;
        background: rgba(0, 0, 0, 0.95);
    }
}