
/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Lato:wght@300;400&display=swap');

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Color Variables */
:root {
    --primary-color: #bfa980; /* Rich Gold */
    --primary-hover-color: #a58c5f;
    --background-gradient-start: #000000; /* Deep Black */
    --background-gradient-end: #1a1a1a; /* Dark Gray */
    --header-footer-bg: #0d0d0d; /* Almost Black */
    --text-color: #f5f5f5; /* Off White */
    --accent-color: #bfa980; /* Gold */
    --accent-hover-color: #d4bd8b; /* Lighter Gold */
    --subtext-color: #c0c0c0; /* Light Gray */
    --gold-color: #ffcc00; /* Bright Gold */
    --sidebar-bg-start: #1a1a1a; /* Dark Gray */
    --sidebar-bg-end: #0d0d0d; /* Almost Black */
    --shadow-color: rgba(0, 0, 0, 0.5);
    --highlight-color: rgba(191, 169, 128, 0.1); /* Gold Tint */
    --gradient-duration: 30s;
    --transition-duration: 0.3s;
    --font-family: 'Playfair Display', serif;
    --secondary-font: 'Lato', sans-serif;
}


/* Scroll behavior and fonts */
html {
    height: 100%;
    overflow-x: hidden;
    font-family: var(--font-family);
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, var(--background-gradient-start), var(--background-gradient-end));
    background-size: 400% 400%;
    animation: gradientBackground var(--gradient-duration) ease infinite;
    color: var(--text-color);
}

/* Header */
header {
    background-color: var(--header-footer-bg);
    color: var(--text-color);
    padding: 0 1rem;
    font-size: 2rem;
    letter-spacing: 0.05rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: 70px;
    box-shadow: 0 4px 8px var(--shadow-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.5s ease forwards;
}

header h1 {
    margin: 0;
    font-size: 2rem;
    animation: fadeIn 1s ease forwards;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.7);
}

nav {
    display: flex;
    align-items: center;
}


.weakaura-link {
    font-size: 1.2rem;
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover-color));
    border-radius: 30px;
    transition: background-color var(--transition-duration) ease, transform var(--transition-duration) ease, box-shadow var(--transition-duration);
    margin-left: 0.5rem;
    box-shadow: 0 2px 4px var(--shadow-color);
    font-family: var(--secondary-font);
}

.weakaura-link:hover {
    background-color: var(--primary-hover-color);
    box-shadow: 0 0 15px var(--primary-color);
    transform: scale(1.05);
    animation: pulse 0.5s ease-in-out;
}

.hall-of-fame {
    flex: 1 1 50%;
    box-sizing: border-box; 
}

.cc-nb-main-container {
    display: block;
    background-color: var(--header-footer-bg);
    padding: 3rem;
    width: 100% !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    box-sizing: border-box;
    z-index: 9999;
}

/* Creators Section */
.creators {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 40px;
    gap: 40px;
    background-color: #111111;
}

.creator {
    flex: 1 1 20%;
    padding: 20px;
    text-align: center;
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border-radius: 20px;
    transition: transform var(--transition-duration), box-shadow var(--transition-duration);
    box-shadow: 10px 10px 20px #0b0b0b, -10px -10px 20px #1f1f1f;
}

.creator:hover {
    transform: translateY(-10px);
    box-shadow: 0 4px 20px var(--shadow-color);
}

.pictures {
    width: 100%;
    height: auto;
    max-width: 200px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--accent-color);
    box-shadow: 0 0 15px var(--accent-color);
}

.name {
    font-size: 30px;
    margin-bottom: 10px;
    color: var(--accent-color);
    text-shadow: 2px 2px 5px rgba(0,0,0,0.7);
    font-family: var(--font-family);
}

@media (max-width: 768px) {
    .creator {
        flex: 1 1 100%;
    }
    .pictures {
        max-width: 150px;
        max-height: 150px;
    }
}

/* Footer */
footer {
    background-color: var(--header-footer-bg);
    color: var(--text-color);
    width: 100%;
    position: fixed;
    bottom: 0;
    z-index: 1000;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 1rem;
    animation: slideUp 0.5s ease forwards;
    box-shadow: 0 -4px 8px var(--shadow-color);
}

.footer-content {
    display: flex;
    justify-content: center;
    width: 100%;
}

footer .center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

footer .right {
    margin-left: auto; 
    padding-right: 1rem;
}

footer a {
    color: var(--text-color);
    font-size: 12px;
    text-decoration: none;
    background-color: var(--primary-color);
    border-radius: 30px;
    padding: 0.5rem 1rem;
    transition: background-color var(--transition-duration) ease, box-shadow var(--transition-duration) ease;
    font-family: var(--secondary-font);
}

footer a:hover {
    background-color: var(--primary-hover-color);
    box-shadow: 0 0 15px var(--primary-color);
}

/* Sidebar */
.sidebar {
    width: 285px;
    position: fixed;
    top: 70px;
    bottom: 40px;
    background: linear-gradient(to bottom, var(--sidebar-bg-start), var(--sidebar-bg-end));
    color: var(--text-color);
    padding-top: 1rem;
    padding-left: 1rem;
    overflow-y: scroll;
    height: calc(100% - 110px);
    box-shadow: 2px 0 10px var(--shadow-color);
    overflow-x: hidden;
    transition: transform var(--transition-duration) ease-in-out;
}

.sidebar.closed {
    transform: translateX(-285px);
}

/* Hide scrollbar but still allow scrolling */
.sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar {
    scrollbar-width: none;
}

.solid-line {
    border: none;
    border-top: 1px solid #505050;
    margin: 10px 10px 10px 0;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    position: relative;
}

.sidebar ul li a.chapter {
    text-decoration: none;
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.1rem;
    padding: 0.6rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-duration);
    position: relative;
    font-family: var(--secondary-font);
}

.sidebar ul li a.chapter:hover {
    background-color: var(--highlight-color);
    color: var(--accent-hover-color);
    border-radius: 5px;
}

.subchapter {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
}

.subchapter.active {
    max-height: 1000px;
}

.subchapter li a {
    font-size: 0.9rem;
    color: var(--subtext-color);
    font-weight: normal;
    text-decoration: none;
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity var(--transition-duration) ease, transform var(--transition-duration) ease;
}

.subchapter.active li a {
    opacity: 1;
    transform: translateX(0);
}

.subchapter li a:hover {
    color: var(--accent-hover-color);
}

.sidebar ul li a.has-subchapter::after {
    content: '';
    border: solid var(--text-color);
    border-width: 0 1px 1px 0;
    display: inline-block;
    padding: 5px;
    transform: rotate(45deg);
    transition: transform var(--transition-duration) ease;
}

.sidebar a.has-subchapter[aria-expanded="true"]::after {
    transform: rotate(-135deg);
}

.sidebar a.active {
    font-weight: bold;
    color: var(--gold-color);
    position: relative;
}

.sidebar a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--gold-color);
    border-radius: 0 5px 5px 0;
}

/* Adjusting padding to align text */
.sidebar ul li a.chapter {
    padding-left: 1.5rem;
}

.subchapter li a {
    padding-left: 2rem;
}

.subchapter .subchapter li a {
    padding-left: 2.5rem;
}

.subchapter .subchapter .subchapter li a {
    padding-left: 3rem;
}

/* Main content */
main {
    margin-left: 285px;
    padding: 2rem;
    padding-top: 90px;
    background-color: var(--sidebar-bg-end);
    color: var(--text-color);
    flex-grow: 1;
    overflow-y: auto;
    min-height: calc(100vh - 120px);
    font-family: var(--secondary-font);
}

main h1, main h2, main h3 {
    animation: fadeInUp 0.5s ease forwards;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.7);
}

main a {
    color: var(--primary-color);
    text-decoration: underline;
}

main a:hover {
    color: var(--primary-hover-color);
}

h1 {
    font-size: 2.4rem;
    color: var(--accent-color);
    letter-spacing: 1px;
    font-weight: 700;
}

h2 {
    font-size: 1.8rem;
    color: var(--accent-hover-color);
}

h3 {
    font-size: 1.5rem;
    color: #A3A3A3;
}

h4, h5, h6 {
    font-size: 1.2rem;
    color: #B3B3B3;
}

h1 > a {
    color: var(--accent-color);
}

/* Chapter navigation */
.chapter-navigation {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background-color: #1a1a1a;
    position: sticky;
    z-index: 1;
    margin-left: 285px;
    max-width: calc(100% - 285px);
    top: 70px;
    animation: fadeIn 0.5s ease forwards;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.chapter-nav {
    text-decoration: none;
    font-size: 0.9rem;
    color: var(--text-color);
    padding: 10px 20px;
    background-color: var(--primary-color);
    border: 2px solid var(--primary-hover-color);
    border-radius: 30px;
    transition: background-color var(--transition-duration), transform var(--transition-duration), box-shadow var(--transition-duration);
    font-weight: bold;
    font-family: var(--secondary-font);
}

.chapter-nav:hover {
    background-color: var(--primary-hover-color);
    cursor: pointer;
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--primary-color);
}

/* Ordered List Styling */
ol {
    display: block;
    list-style-type: decimal;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    padding-inline-start: 40px;
    unicode-bidi: isolate;
    color: var(--text-color);
    font-family: var(--secondary-font);
}

/* Keyframe Animations */
@keyframes gradientBackground {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 rgba(191, 169, 128, 0); }
    50% { transform: scale(1.05); box-shadow: 0 0 15px var(--primary-color); }
    100% { transform: scale(1); box-shadow: 0 0 0 rgba(191, 169, 128, 0); }
}

@keyframes slideDown {
    0% { transform: translateY(-70px); }
    100% { transform: translateY(0); }
}

@keyframes slideUp {
    0% { transform: translateY(40px); }
    100% { transform: translateY(0); }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    0% { transform: translateX(-10px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

main.fade-in {
    animation: fadeInContent 0.5s forwards;
}

main.fade-out {
    animation: fadeOutContent 0.5s forwards;
}

@keyframes fadeInContent {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOutContent {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Media Queries */
@media (max-width: 768px) {
    header {
        height: 60px;
        font-size: 1.5rem;
        padding: 0 1rem;
        justify-content: space-between;
    }

    header h1 {
        font-size: 1rem;
        margin: 0;
        margin-left: 35px;
    }

    .sidebar-toggle {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1100;
        font-size: 1.5rem;
        cursor: pointer;
        color: var(--text-color);
        background: none;
        border: none;
    }

    main {
        margin-left: 0;
        padding: 1rem;
        padding-top: 70px;
        margin-bottom: 30px;
        min-height: calc(100vh - 110px);
    }

    .hall-of-fame {
        flex-direction: column;
    }

    .chapter-navigation {
        margin-left: 0;
        max-width: 100%;
        top: 60px;
    }

    .footer-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 1rem;
    }

    footer .center, footer .right {
        position: static;
        transform: none;
        margin: 0;
        padding: 0;
    }

    footer {
        height: auto;
        padding: 10px 1rem;
    }

    footer a {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    .sidebar {
        width: 0;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1050;
        overflow-x: hidden;
        transition: width var(--transition-duration) ease;
        padding: 70px 0 0 0;
        height: 100%;
    }

    .sidebar.active {
        width: 285px;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .overlay {
        display: none;
    }

    .overlay.active {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1040;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.7);
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .weakaura-link {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }

    .chapter-nav {
        font-size: 0.8rem;
        padding: 8px 16px;
    }
}
