/* ==========================================================
   Halloween Spooky Night Theme (Хэллоуин)
   Colors: Pumpkin Orange (#ff6a00) + Mystic Purple (#a855f7)
   Decorations: Animated glowing pumpkin, spiderwebs, spooky glows
   ========================================================== */

body[data-theme="halloween"] {
    --cnp-bg: #09060e;
    --cnp-header: #140b1e;
    --cnp-surface: #170d24;
    --cnp-surface2: #221535;
    --cnp-card-hover: #1f1230;
    --cnp-text: #f3e8ff;
    --cnp-secondary: #c084fc;
    --cnp-muted: #8b5cf6;
    --cnp-yellow: #ff6a00; /* Pumpkin Orange */
    --cnp-yellow-hover: #ff8533;
    --cnp-accent: #a855f7; /* Mystic Purple */
    --cnp-accent-hover: #c084fc;
    --cnp-border: rgba(255, 106, 0, 0.25);
    --cnp-border-hover: rgba(168, 85, 247, 0.6);
}

/* Header & Accent border */
body[data-theme="halloween"] .cnp-header {
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, #ff6a00 0%, #8b5cf6 50%, #ff6a00 100%) 1;
    box-shadow: 0 4px 25px rgba(255, 106, 0, 0.25);
}

/* Glowing Animated Pumpkin sitting on the site logo */
body[data-theme="halloween"] .cnp-brand {
    position: relative;
    display: inline-flex;
    align-items: center;
}
body[data-theme="halloween"] .cnp-brand::after {
    content: "🎃";
    font-size: 24px;
    position: absolute;
    top: -14px;
    right: -24px;
    filter: drop-shadow(0 0 10px rgba(255, 106, 0, 0.95)) drop-shadow(0 0 20px rgba(255, 106, 0, 0.5));
    animation: cnpPumpkinWobble 3.5s ease-in-out infinite;
    transform-origin: bottom center;
    pointer-events: none;
    user-select: none;
}
@keyframes cnpPumpkinWobble {
    0%, 100% { transform: translateY(0) rotate(-6deg) scale(1); }
    50% { transform: translateY(-5px) rotate(8deg) scale(1.12); }
}

/* Spiderwebs on article & content cards */
body[data-theme="halloween"] .cnp-card,
body[data-theme="halloween"] .cnp-article-card,
body[data-theme="halloween"] .cnp-news-card {
    position: relative;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
body[data-theme="halloween"] .cnp-card::after,
body[data-theme="halloween"] .cnp-article-card::after,
body[data-theme="halloween"] .cnp-news-card::after {
    content: "🕸️";
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 17px;
    opacity: 0.35;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 5;
}
body[data-theme="halloween"] .cnp-card:hover::after,
body[data-theme="halloween"] .cnp-article-card:hover::after,
body[data-theme="halloween"] .cnp-news-card:hover::after {
    opacity: 0.95;
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px #ff6a00);
}

/* Spooky card hover glow */
body[data-theme="halloween"] .cnp-card:hover,
body[data-theme="halloween"] .cnp-article-card:hover,
body[data-theme="halloween"] .cnp-news-card:hover {
    border-color: rgba(255, 106, 0, 0.65) !important;
    box-shadow: 0 10px 30px rgba(255, 106, 0, 0.25), 0 0 15px rgba(168, 85, 247, 0.3) !important;
    transform: translateY(-2px);
}

/* Section headers decoration with spooky pumpkin icon */
body[data-theme="halloween"] .cnp-section-title::before,
body[data-theme="halloween"] .cnp-block-title::before {
    content: "🎃 ";
    font-size: 0.95em;
    filter: drop-shadow(0 0 6px rgba(255, 106, 0, 0.8));
}

/* Buttons & Badges */
body[data-theme="halloween"] .cnp-badge,
body[data-theme="halloween"] .cnp-btn-primary {
    background: linear-gradient(135deg, #ff6a00 0%, #a855f7 100%) !important;
    color: #ffffff !important;
    border: none;
    box-shadow: 0 2px 14px rgba(255, 106, 0, 0.45);
}

/* Event Banner Halloween Style */
body[data-theme="halloween"] .cnp-theme-event-banner {
    background: linear-gradient(90deg, #ff6a00 0%, #7e22ce 50%, #ff6a00 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 20px rgba(255, 106, 0, 0.4) !important;
}
body[data-theme="halloween"] .cnp-theme-event-banner span::before {
    content: "🎃 ";
}
body[data-theme="halloween"] .cnp-theme-event-banner span::after {
    content: " 🦇";
}
body[data-theme="halloween"] .cnp-theme-event-banner a {
    color: #ffd800 !important;
    text-shadow: 0 0 8px rgba(255, 216, 0, 0.8);
}

/* Custom Halloween Cursors (Hardware Accelerated, 0% CPU) */
body[data-theme="halloween"],
body[data-theme="halloween"] * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ctext y='20' font-size='20'%3E🎃%3C/text%3E%3C/svg%3E") 4 4, auto;
}
body[data-theme="halloween"] a,
body[data-theme="halloween"] a *,
body[data-theme="halloween"] button,
body[data-theme="halloween"] button *,
body[data-theme="halloween"] [role="button"],
body[data-theme="halloween"] input[type="submit"],
body[data-theme="halloween"] select {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ctext y='20' font-size='20'%3E🦇%3C/text%3E%3C/svg%3E") 6 6, pointer !important;
}
