/* ═══════════════════════════════════════════════════════
   HORROR ICONS — Modern Dark Theme + Fog Animation
   ═══════════════════════════════════════════════════════ */

:root {
    --hi-bg: #08080a;
    --hi-surface: #101014;
    --hi-card: #141418;
    --hi-card-hover: #1a1a20;
    --hi-border: #222230;
    --hi-border-hover: #33334a;
    --hi-fg: #eaeaf0;
    --hi-fg-muted: #9898b0;
    --hi-fg-dim: #555568;
    --hi-red: #dc2626;
    --hi-red-soft: rgba(220, 38, 38, 0.08);
    --hi-red-glow: rgba(220, 38, 38, 0.25);
    --hi-radius: 14px;
    --hi-radius-sm: 8px;
}

/* ── Reset & Base ──────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100vh;
    /* Put the background image on html so body can overlay it */
    background-image: url('../gjc123/Images/white-background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

body {
    font-family: 'Arial', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Darken the background image drastically to fit the dark theme */
    background-color: rgba(8, 8, 10, 0.92);
    color: var(--hi-fg);
    position: relative;
    overflow-x: hidden;
}

/* ── Fog Animation Layers ──────────────────────────── */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: 
        radial-gradient(ellipse at 20% 40%, rgba(120, 20, 20, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 60%, rgba(20, 20, 20, 0.5) 0%, transparent 50%);
    filter: blur(80px);
    z-index: 0;
    pointer-events: none;
    animation: fog-drift-1 25s ease-in-out infinite alternate;
}

body::after {
    content: '';
    position: fixed;
    bottom: -40%;
    right: -15%;
    width: 120%;
    height: 120%;
    background: 
        radial-gradient(ellipse at 70% 70%, rgba(80, 10, 10, 0.15) 0%, transparent 55%),
        radial-gradient(ellipse at 10% 80%, rgba(10, 10, 10, 0.6) 0%, transparent 50%);
    filter: blur(90px);
    z-index: 0;
    pointer-events: none;
    animation: fog-drift-2 30s ease-in-out infinite alternate-reverse;
}

@keyframes fog-drift-1 {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(40px, 30px) scale(1.05); }
    100% { transform: translate(-20px, -15px) scale(0.98); }
}

@keyframes fog-drift-2 {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(-35px, -20px) scale(1.03); }
    100% { transform: translate(25px, 15px) scale(1); }
}

/* ── Z-Index Fix (Keeps text above the fog) ────────── */
header, 
.intro, 
.content, 
footer, 
figure, 
.alien-icon, 
.icon-gallery {
    position: relative;
    z-index: 1;
}

.content {
    flex: 1;
}

/* ── Header ────────────────────────────────────────── */
header {
    background: rgba(14, 14, 18, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--hi-fg);
    text-align: center;
    padding: 24px 0;
    border-bottom: 1px solid var(--hi-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-image {
    max-width: 100%;
    height: auto;
}

.home-button {
    position: absolute;
    bottom: 12px;
    left: 22px;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.home-button:hover {
    opacity: 1;
}

.home-button img {
    width: 36px;
    height: auto;
}

/* ── Typography ────────────────────────────────────── */
h2 {
    text-shadow: none; /* Removed old heavy shadows */
    font-weight: 700;
    color: var(--hi-fg);
    margin-bottom: 12px;
}

.alien-icon {
    text-align: left;
    margin: 40px;
}

.alien-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* ── Intro ─────────────────────────────────────────── */
.intro {
    text-align: center;
    padding: 24px 30px;
    font-size: 1.05rem;
    line-height: 1.6;
    background: var(--hi-card);
    color: var(--hi-fg-muted);
    border-top: 4px solid var(--hi-red);
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    border-radius: var(--hi-radius);
    margin: 30px auto;
    max-width: 700px;
}

/* ── Content Layout ────────────────────────────────── */
.content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 24px;
    margin: 40px auto;
    padding: 0 24px;
    max-width: 1000px;
}

/* ── Past / Today Cards ────────────────────────────── */
.past,
.today {
    width: 48%;
    background: var(--hi-card);
    padding: 28px;
    color: var(--hi-fg-muted);
    border-radius: var(--hi-radius);
    border: 1px solid var(--hi-border);
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

/* Red accent strip at top of cards */
.past::before, .today::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--hi-red), transparent);
    opacity: 0.7;
    transition: opacity 0.4s ease;
}

.past:hover, .today:hover {
    transform: translateY(-6px);
    border-color: var(--hi-border-hover);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
    background: var(--hi-card-hover);
}

.past:hover::before, .today:hover::before {
    opacity: 1;
}

.content .icon {
    margin-left: 14px;
    width: 44px;
    position: absolute;
    height: auto;
    margin-top: 3px;
}

/* Modern ghost/glow buttons */
.content a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    padding: 10px 20px;
    margin-top: 16px;
    text-decoration: none;
    color: var(--hi-red);
    background: var(--hi-red-soft);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: var(--hi-radius-sm);
    font-weight: 600;
    transition: all 0.25s ease;
}

.content a:hover {
    background: rgba(220, 38, 38, 0.15);
    border-color: var(--hi-red);
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.15);
}

/* ── Figures ───────────────────────────────────────── */
figure {
    background: var(--hi-card);
    color: var(--hi-fg-muted);
    border-radius: var(--hi-radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    margin-bottom: 30px;
    padding: 24px;
    border: 1px solid var(--hi-border);
    max-width: 600px;
    width: 100%;
    line-height: 1.7;
}

figure img {
    max-width: 100%;
    height: auto;
    border-radius: var(--hi-radius-sm);
}

figcaption {
    text-align: center;
    margin-top: 16px;
    font-style: italic;
    color: var(--hi-fg-dim);
}

figcaption a {
    display: inline-block;
    font-size: 0.85rem;
    padding: 10px 20px;
    margin-top: 14px;
    text-decoration: none;
    color: var(--hi-red);
    background: var(--hi-red-soft);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: var(--hi-radius-sm);
    font-weight: 600;
    transition: all 0.25s ease;
}

figcaption a:hover {
    background: rgba(220, 38, 38, 0.15);
    border-color: var(--hi-red);
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.1);
}

/* ── Icon Gallery ──────────────────────────────────── */
.icon-gallery {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    flex-direction: row;
    align-items: flex-end;
}

.icon-gallery a {
    position: relative;
    text-align: center;
    display: block;
    text-decoration: none;
}

.icon-gallery img {
    max-width: 88%;
    height: auto;
    border-radius: 16px;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6));
}

/* Modern hover: Lift + Red glow instead of white bar */
.icon-gallery a:hover img {
    transform: translateY(-8px) scale(1.05);
    filter: drop-shadow(0 8px 20px rgba(220, 38, 38, 0.4));
}

/* Hide the old white bar effect */
.icon-gallery a::before {
    display: none;
}

.icon-gallery a::after {
    content: attr(data-text);
    display: block;
    text-align: center;
    color: var(--hi-fg);
    margin-top: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.icon-gallery a:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.shadow-float {
    display: inline-block;
    vertical-align: middle;
    border-radius: 16px;
    transition: transform 0.3s ease;
}

.shadow-float:hover {
    transform: translateY(-5px);
    box-shadow: none; /* Handled by the parent anchor now */
}

.icon-gallery a:visited {
    text-decoration: none;
}

/* ── Footer ────────────────────────────────────────── */
footer {
    text-align: center;
    padding: 24px;
    margin-top: auto;
    background: var(--hi-surface);
    border-top: 1px solid var(--hi-border);
    color: var(--hi-fg-dim);
    width: 100%;
    font-size: 0.9rem;
}

/* ═══════════════════════════════════════════════════════
   MOBILE STYLES
   ═══════════════════════════════════════════════════════ */

@media only screen and (max-width: 800px) {
    .header-image {
        width: 100%;
        height: auto;
    }

    .intro {
        margin: 20px;
        max-width: 100%;
    }
    
    .home-button {
        left: 10px;
    }

    .alien-icon {
        margin: 20px;
    }

    .content {
        flex-direction: column;
        align-items: center;
        padding: 0 16px;
    }

    .past,
    .today {
        width: 100%;
        margin: 10px 0;
    }

    figure {
        margin: 10px;
        max-width: 100%;
        width: auto;
    }

    .icon {
        position: static;
        margin: 10px auto;
        padding: 10px;
    }

    .icon-gallery {
        flex-direction: column;
        align-items: center;
    }

    .icon-gallery img {
        width: 60%;
        max-width: 250px;
    }
}

@media only screen and (max-width: 600px) {
    .intro {
        padding: 16px;
        font-size: 0.95rem;
    }
    
    .past, .today {
        padding: 20px;
    }

    .icon {
        width: 60px;
        height: auto;
    }
}

/* ── Reduced Motion ────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    body::before, body::after {
        animation: none;
    }
    * {
        transition-duration: 0.01ms !important;
    }
}