:root {
    --accent: #fbe8a6;       /* pale gold */
    --bg: #f0f8f5;           /* soft mint background */
    --sidebar-bg: #f7f0ff;   /* pale lilac sidebar */
    --text: #4b3b6c;         /* lilac text */
    --header: #bfa5ff;       /* header lilac */
}

/* -------------------------------
   BASIC RESET
---------------------------------*/
body, h1, h2, p, ul, li {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* -------------------------------
   BODY
---------------------------------*/
body {
    font-family: Georgia, serif;
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* -------------------------------
   SIDEBAR
---------------------------------*/
#sidebar {
    width: 220px;
    background-color: var(--sidebar-bg);
    padding: 20px;
    border-right: 3px solid var(--accent);
    height: 100vh;
    position: fixed;
}

#sidebar h2 {
    text-align: center;
    color: var(--header);
    margin-bottom: 20px;
}

#sidebar ul {
    list-style: none;
}

#sidebar ul li {
    margin: 12px 0;
}

#sidebar ul li a {
    text-decoration: none;
    color: var(--text);
    position: relative;
    overflow: hidden;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    padding-left: 4px;
}

/* Add icons via CSS before each link */
#sidebar ul li:nth-child(1) a::before { content: "🏠 "; }
#sidebar ul li:nth-child(2) a::before { content: "✨ "; }
#sidebar ul li:nth-child(3) a::before { content: "📝 "; }
#sidebar ul li:nth-child(4) a::before { content: "✒️ "; }
#sidebar ul li:nth-child(5) a::before { content: "🌸 "; }
#sidebar ul li:nth-child(6) a::before { content: "🕯️ "; }
#sidebar ul li:nth-child(7) a::before { content: "🏛️ "; }
#sidebar ul li:nth-child(8) a::before { content: "🐾 "; }
#sidebar ul li:nth-child(9) a::before { content: "🔗 "; }

#sidebar ul li a:hover {
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent);
}

#sidebar ul li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform: translateX(-100%);
    transition: 0.3s ease;
}

#sidebar ul li a:hover::after {
    transform: translateX(0%);
}

/* -------------------------------
   MAIN CONTENT
---------------------------------*/
#main {
    margin-left: 240px;
    padding: 40px;
    max-width: 800px;
    animation: fadeIn 0.8s ease;
}

#main h1 {
    color: var(--header);
    margin-bottom: 20px;
    position: relative;
    padding-left: 24px;
    padding-right: 24px;
}

#main h1::before {
    content: "✨ ";
}
#main h1::after {
    content: " ✨";
}

#main h1:hover {
    text-shadow: 0 0 12px var(--accent);
    cursor: default;
}

#main p {
    margin-bottom: 16px;
    line-height: 1.6;
    border-bottom: 1px dashed var(--accent);
    padding-bottom: 12px;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

#main p:hover {
    color: var(--text);
    text-shadow: 0 0 8px var(--accent);
    cursor: default;
}

/* -------------------------------
   ANIMATIONS
---------------------------------*/
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

@keyframes sparkleFade {
    from { opacity: 0.8; transform: translateY(-4px); }
    to   { opacity: 0; transform: translateY(6px); }
}

/* -------------------------------
   STARRY BACKGROUND
---------------------------------*/
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.6) 2px, transparent 2px),
        radial-gradient(circle, rgba(255,255,255,0.4) 2px, transparent 2px),
        radial-gradient(circle, rgba(255,255,255,0.2) 2px, transparent 2px),
        radial-gradient(circle, rgba(255,255,255,0.15) 2px, transparent 2px);
    background-size: 300px 300px, 250px 250px, 200px 200px, 150px 150px;
    background-position: 0 0, 50px 80px, -30px -50px, 20px 20px;
    animation: twinkle 4s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

/* -------------------------------
   SPARKLE CURSOR
---------------------------------*/
.sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.6;
    pointer-events: none;
    animation: sparkleFade 0.7s ease-out forwards;
}

/* -------------------------------
   LINK GLOW
---------------------------------*/
a:hover {
    text-shadow: 0 0 6px var(--accent);
    color: var(--accent);
}

/* -------------------------------
   FOOTER
---------------------------------*/
body::after {
    content: "🌙 Made with ✨ in Starlight Study";
    position: fixed;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: var(--header);
    opacity: 0.6;
    pointer-events: none;
}
