/*
Theme Name: World Has Gone Mad
Theme URI: https://worldgoingcrazy.site
Author: Grok
Description: Апокалиптическая тема про конец света
Version: 1.6
*/

body {
    background: url('https://thumbs.dreamstime.com/b/desolate-urban-landscape-apocalyptic-sunset-flames-ruins-devastated-city-skyline-illuminated-erupt-393024560.jpg') no-repeat center center fixed;
    background-size: cover;
    color: yellow;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    position: relative;
}

/* ====================== ФОНОВЫЕ ЭФФЕКТЫ ====================== */
.background-effects {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}
.lightning-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    background-image: url('https://media.istockphoto.com/id/504848916/video/4k-lighting-strike-packs-animation-red-color.jpg?s=640x640&k=20&c=wWR8zB9QHLtDK53Gx0GdTlmAAEdV40hlBgE3VVpOaX0=');
    background-size: cover;
    background-position: center;
    mix-blend-mode: screen;
}
.lightning-bg1 { animation: flash-bg 3s infinite; opacity: 0.3; }
.lightning-bg2 { animation: flash-bg 4s infinite 1s; opacity: 0.3; }
.lightning-bg3 { animation: flash-bg 3.5s infinite 2s; opacity: 0.3; }

@keyframes flash-bg {
    0% { opacity: 0; } 5% { opacity: 0.3; } 10% { opacity: 0; } 100% { opacity: 0; }
}

.ufo {
    position: absolute;
    width: 150px; height: 75px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.7;
    animation: fly linear infinite;
}
.ufo1 { background-image: url('https://media.istockphoto.com/id/1304045830/vector/ufo-flying-saucer-alien-space-ship-isolated-vector-icon.jpg?s=612x612&w=0&k=20&c=2oQ3hNL5X3W9k3P6yJcq6M4dYkO7C1W0C6aJ0D6w3A='); top: 10%; animation-duration: 30s; }
.ufo2 { background-image: url('https://www.publicdomainpictures.net/pictures/30000/velka/ufo-in-the-sky.jpg'); top: 40%; animation-duration: 20s; animation-delay: 5s; }
.ufo3 { background-image: url('https://media.istockphoto.com/id/1304045830/vector/ufo-flying-saucer-alien-space-ship-isolated-vector-icon.jpg?s=612x612&w=0&k=20&c=2oQ3hNL5X3W9k3P6yJcq6M4dYkO7C1W0C6aJ0D6w3A='); top: 70%; animation-duration: 25s; animation-delay: 10s; }

@keyframes fly {
    0% { left: -150px; transform: rotate(0deg); }
    100% { left: 100%; transform: rotate(5deg); }
}

/* ====================== ШАПКА ====================== */
header {
    background-color: black;
    padding: 45px 20px 30px;
    text-align: center;
    position: relative;
    overflow: visible;
    z-index: 1;
}

h1.site-title {
    color: red;
    font-size: 3.3em;
    margin: 0 0 65px 0; /* большой отступ для НЛО и пришельца */
    z-index: 30;
    position: relative;
    
    /* ЖЁЛТАЯ ОБВОДКА + СВЕЧЕНИЕ */
    -webkit-text-stroke: 3px #ffff00;     /* толщина жёлтой обводки */
    text-stroke: 3px #ffff00;              /* для совместимости */
    text-shadow: 
        0 0 15px #ffff00,
        0 0 30px #ffff00,
        0 0 45px #ffdd00,
        0 0 60px #ffaa00,
        0 0 75px #ff5500;
}

/* ОДНА ОГРОМНАЯ МОЛНИЯ */
.lightning-main {
    position: absolute;
    top: -115px;
    left: 50%;
    transform: translateX(-50%);
    width: 1280px;
    height: 360px;
    opacity: 0.85;
    background-image: url('https://media.istockphoto.com/id/504848916/video/4k-lighting-strike-packs-animation-red-color.jpg?s=640x640&k=20&c=wWR8zB9QHLtDK53Gx0GdTlmAAEdV40hlBgE3VVpOaX0=');
    background-size: cover;
    background-position: center;
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 1;
    animation: flash-main 1.05s infinite;
}

@keyframes flash-main {
    0% { opacity: 0; }
    4% { opacity: 0.85; }
    11% { opacity: 0; }
    100% { opacity: 0; }
}

/* НЛО слева — сильно ниже */
.header-ufo {
    position: absolute;
    top: 138px;
    left: 6%;
    width: 285px;
    height: 143px;
    background-image: url('https://pngimg.com/uploads/ufo/ufo_PNG14401.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 1;
    z-index: 12;
    animation: header-float 4.5s infinite alternate ease-in-out;
    filter: drop-shadow(0 0 60px #00ffff);
}

/* Пришелец по центру — сильно ниже */
.header-alien {
    position: absolute;
    top: 125px;
    left: 50%;
    transform: translateX(-50%);
    width: 205px;
    height: 285px;
    background-image: url('https://pngimg.com/uploads/alien/alien_PNG41.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 1;
    z-index: 15;
    animation: header-float 4.2s infinite alternate ease-in-out;
    filter: drop-shadow(0 0 50px #00ff00);
}

/* ====================== МОБИЛЬНАЯ ВЕРСИЯ ====================== */
@media (max-width: 768px) {
    h1.site-title {
        font-size: 2.7em;
        margin-bottom: 95px;
    }
    .header-ufo {
        top: 172px;
        width: 210px;
        left: 8%;
    }
    .header-alien {
        top: 162px;
        width: 165px;
    }
}

@keyframes header-float {
    0% { transform: translateY(0) rotate(-4deg); }
    100% { transform: translateY(-18px) rotate(6deg); }
}

/* ====================== МЕНЮ ====================== */
nav ul {
    list-style: none;
    padding: 0;
    margin: 15px 0 0;
    display: flex;
    justify-content: center;
    z-index: 10;
}
nav li { margin: 0 15px; }
nav a {
    color: yellow;
    text-decoration: none;
    font-size: 1.2em;
    transition: all 0.3s;
}
nav a:hover {
    color: red;
    text-shadow: 0 0 10px red;
    animation: shake 0.5s;
}
@keyframes shake {
    0%,100% { transform: translate(1px,1px) rotate(0deg); }
    10% { transform: translate(-1px,-2px) rotate(-1deg); }
    20% { transform: translate(-3px,0) rotate(1deg); }
    30% { transform: translate(3px,2px) rotate(0deg); }
    40% { transform: translate(1px,-1px) rotate(1deg); }
    50% { transform: translate(-1px,2px) rotate(-1deg); }
    60% { transform: translate(-3px,1px) rotate(0deg); }
    70% { transform: translate(3px,2px) rotate(-1deg); }
    80% { transform: translate(-1px,-1px) rotate(1deg); }
    90% { transform: translate(1px,2px) rotate(0deg); }
}

/* ====================== ОСНОВНОЙ КОНТЕНТ ====================== */
main {
    background: rgba(0,0,0,0.45) !important;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    border: none !important; /* УБРАЛИ красную рамку */
    position: relative;
    z-index: 1;
}

/* ====================== КАРТОЧКИ ====================== */
#latest-madness {
    margin-top: 60px;
    padding-top: 40px;
    border-top: none !important; /* УБРАЛИ красную линию */
}
.latest-posts {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)) !important;
    gap: 30px !important;
}
.post-card {
    background: rgba(0,0,0,0.85) !important;
    border: 3px solid red !important;
    padding: 20px;
    transition: all 0.4s;
}
.post-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 40px rgba(255,0,0,0.7);
    border-color: yellow;
}
.post-thumbnail {
    position: relative;
    padding-bottom: 56.25%;
    overflow: hidden;
    margin-bottom: 18px;
    border: 2px solid red;
}
.post-thumbnail img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.post-card:hover .post-thumbnail img {
    transform: scale(1.08);
}
.post-card h3 {
    color: red;
    font-size: 1.7em;
    margin: 0 0 12px 0;
}
.post-card h3 a { color: red; text-decoration: none; }
.post-card h3 a:hover { color: yellow; }
.post-card .excerpt {
    color: yellow;
    line-height: 1.6;
    margin-bottom: 15px;
}
.post-card .read-more {
    color: #ff0;
    font-weight: bold;
    text-decoration: underline;
}

/* ====================== ФУТЕР ====================== */
footer {
    background-color: black;
    color: yellow;
    text-align: center;
    padding: 15px;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1;
}

/* Яркость фона */
body {
    filter: brightness(1.45) contrast(1.15) saturate(1.25);
}

/* ====================== КАТАКЛИЗМ ЗА БУКВАМИ ====================== */
.header-cataclysm {
    position: absolute;
    inset: 0; /* top:0; left:0; right:0; bottom:0; */
    background-image: url('https://images.alphacoders.com/528/52831.jpg');
    background-size: cover;
    background-position: center 30%;
    opacity: 0.45; /* полупрозрачный, чтобы буквы читались */
    z-index: 2; /* ниже текста и молнии, но выше фона */
    mix-blend-mode: screen; /* делает взрыв ярче и краснее */
    pointer-events: none;
}

/* На мобильных чуть темнее и сдвинутый центр */
@media (max-width: 768px) {
    .header-cataclysm {
        opacity: 0.38;
        background-position: center 40%;
    }
}