/* ====================== MIDNIGHT ORACLE - ELOISAMPI VERSIO ====================== */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=EB+Garamond:ital,wght@0,400..800;1,400..800&family=Oldenburg&display=swap');

/* --- Tausta --- */
body {
    background-color: #0a0a1f;
    background-image:
        url('crystals-bg.jpg'),
        radial-gradient(circle at center, #2a1a4a 0%, #0a0a1f 80%);
    background-repeat: repeat, no-repeat;
    background-position: center top, center center;
    background-attachment: fixed, fixed;
    background-size: auto, cover;
    color: #e0d4ff;
    font-family: 'EB Garamond', serif;
    font-size: 1.25em;
    margin: 0;
    padding: 40px 15px;
    display: flex;
    justify-content: center;
    line-height: 1.8;
    min-height: 100vh;
}

/* Kevyempi verho */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 5, 30, 0.38);
    z-index: -1;
    pointer-events: none;
}

/* --- Loput tyylit --- */
#container {
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
    border: 1px solid #b38eff;
    outline: 4px double #d4b8ff;
    outline-offset: -12px;
    padding: 50px;
    background-color: rgba(15, 8, 35, 0.88);
    box-shadow: 0 0 70px rgba(180, 120, 255, 0.35);
    position: relative;
}

h1, h2, h3 {
    font-family: 'Cinzel', serif;
    letter-spacing: 4px;
    color: #f0c4ff;
    text-shadow: 0 0 20px rgba(220, 140, 255, 0.8);
}

.subtitle, .divider {
    color: #d4b8ff;
}

.box, .content-box, .side-box, .post {
    background-color: rgba(25, 12, 45, 0.85);
    border: 1px solid #b38eff;
    padding: 40px;
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(180, 120, 255, 0.15);
}

.box:hover, .content-box:hover, .post:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(220, 140, 255, 0.4);
    border-color: #f0c4ff;
}

/* ====================== KORJATTU KRISTALLIBANNERI ====================== */
.top-crystal, .bottom-crystal {
    height: 110px;
    background: url('crystals-bg.jpg') repeat-x;
    background-size: 320px 110px;
    filter: brightness(1.4) contrast(1.15) hue-rotate(12deg);
    position: relative;
    z-index: 1;
}
.top-crystal { margin: -40px 0 10px 0; border-radius: 0 0 40px 40px; }
.bottom-crystal { margin: 20px 0 -40px 0; border-radius: 40px 40px 0 0; }

/* Mobile fix (perus) */
@media (max-width: 850px) {
    #container {
        max-width: 92%;
        padding: 30px 25px;
    }
}

/* ====================== CUSTOM KURSORI ====================== */
html, body, * {
    cursor: url('/cursor.png') 0 0, auto !important;
}

a, button, input, textarea, label, nav a, .box, .content-box, .side-box, 
.post, *::before, *::after, [role="button"], div, section, header, footer {
    cursor: url('/cursor.png') 0 0, auto !important;
}

/* ====================== HAMBURGER MENU - MOBIILI-OPTIMOITU SLIDE-IN ====================== */
nav {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    margin-bottom: 50px;
    padding: 18px 25px;
    background: rgba(50, 20, 80, 0.4);
    border-top: 1px solid #c8a2ff;
    border-bottom: 1px solid #c8a2ff;
    z-index: 100;
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 36px;
    height: 28px;
    background: none;
    border: none;
    cursor: url('/cursor.png') 0 0, auto;
    padding: 0;
    z-index: 200;
}

.hamburger-line {
    width: 100%;
    height: 4px;
    background: #d4b8ff;
    border-radius: 3px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(212, 184, 255, 0.7);
}

/* Avoin hamburger */
.hamburger.active .hamburger-line:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger.active .hamburger-line:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Menu - slide-in vasemmalta */
.nav-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: rgba(15, 8, 35, 0.98);
    border-right: 1px solid #b38eff;
    box-shadow: 15px 0 35px rgba(180, 120, 255, 0.35);
    padding: 100px 30px 40px;
    z-index: 150;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.nav-menu.active {
    left: 0;
}

.nav-menu a {
    color: #d4b8ff;
    font-family: 'Cinzel', serif;
    font-size: 1.25em;
    letter-spacing: 3px;
    padding: 14px 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.nav-menu a:hover {
    background: rgba(179, 142, 255, 0.15);
    color: #ffffff;
    text-shadow: 0 0 20px #f0c4ff;
    padding-left: 30px;
}

/* Mobiili-parannukset */
@media (max-width: 850px) {
    .hamburger {
        width: 42px;
        height: 32px;
    }
    .hamburger-line {
        height: 4.5px;
    }
    .nav-menu {
        width: 85vw;
        max-width: 320px;
        left: -100%;
    }
    .nav-menu.active {
        left: 0;
    }
}

/* Taustapeite (sulkee menun klikkaamalla) */
.nav-menu::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 5, 30, 0.75);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.nav-menu.active::before {
    opacity: 1;
    pointer-events: auto;
/* === Midnight Oracle - Hyperlinkkien värit === */
}a:link,
a:visited {
    color: #d4a5ff !important;
    text-decoration: underline;
    transition: color 0.3s ease;
}

a:hover {
    color: #f0c8ff !important;
    text-decoration: underline;
}

a:active {
    color: #c98fff !important;
}