/* Document Content Style Overrides */
.my-div, .doc-content {
    background-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    color: #e0e0e0 !important;
    font-family: var(--font-body) !important;
    line-height: 1.6 !important;
}

.my-div p, .doc-content p,
.my-div span, .doc-content span,
.my-div li, .doc-content li,
.my-div td, .doc-content td,
.my-div th, .doc-content th {
    color: #e0e0e0 !important;
    font-family: var(--font-body) !important;
    background-color: transparent !important;
    background: transparent !important;
}

/* Headings within the document */
.my-div h1, .my-div h1 span, .doc-content h1, .doc-content h1 span,
.my-div h2, .my-div h2 span, .doc-content h2, .doc-content h2 span,
.my-div h3, .my-div h3 span, .doc-content h3, .doc-content h3 span,
.my-div h4, .my-div h4 span, .doc-content h4, .doc-content h4 span,
.my-div h5, .my-div h5 span, .doc-content h5, .doc-content h5 span,
.my-div h6, .my-div h6 span, .doc-content h6, .doc-content h6 span {
    color: var(--accent) !important;
    font-family: var(--font-display) !important;
    font-weight: 700 !important;
}

/* Accentuate links */
.my-div a, .my-div a span, .doc-content a, .doc-content a span {
    color: var(--accent) !important;
    text-decoration: underline !important;
    transition: opacity 0.2s !important;
}

.my-div a:hover, .my-div a span:hover, .doc-content a:hover, .doc-content a span:hover {
    opacity: 0.8 !important;
}

/* Table overrides */
.my-div table {
    border-color: var(--border) !important;
    background-color: rgba(255, 255, 255, 0.02) !important;
    border-collapse: collapse !important;
}

.my-div td, 
.my-div th {
    border-color: var(--border) !important;
    padding: 10px !important;
}

/* Divider lines inside document */
.my-div hr {
    border: none !important;
    border-top: 1px solid var(--border) !important;
    margin: 1.5rem 0 !important;
}

/* Bottom sheet sidebar styling (slides up from the bottom when active) */
.sidebar {
    position: fixed !important;
    bottom: 0 !important;
    left: 50% !important;
    width: 100% !important;
    max-width: 500px !important;
    max-height: 70vh !important;
    background: rgba(15, 15, 15, 0.95) !important;
    border: 1px solid var(--border) !important;
    border-bottom: none !important;
    border-radius: 24px 24px 0 0 !important;
    backdrop-filter: blur(24px);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6), 0 0 30px var(--accent-glow) !important;
    transform: translate(-50%, 100%) !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    z-index: 2000 !important;
    overflow-y: auto;
    display: flex !important;
    flex-direction: column !important;
    padding-bottom: 20px !important;
}

.sidebar.active {
    transform: translate(-50%, 0) !important;
}

.sidebar-header {
    background: transparent !important;
    border-bottom: 1px solid var(--border);
    padding: 20px 20px 10px !important;
    margin-top: 0 !important;
    text-align: center;
    position: relative;
}

/* Pull-to-dismiss bar indicator for bottom sheet look */
.sidebar-header::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.sidebar-header h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff !important;
    text-shadow: none !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 5px 0 0 !important;
}

.sidebar-header p {
    font-size: 0.78rem;
    color: var(--text-muted) !important;
    text-shadow: none !important;
    margin-top: 4px !important;
}

.sidebar-nav {
    padding: 10px 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

.sidebar-nav li {
    border-bottom: 1px solid var(--border) !important;
    padding: 0 !important;
}

.sidebar-nav a {
    color: #ccc !important;
    font-family: var(--font-body);
    font-size: 0.95rem !important;
    padding: 12px 24px !important;
    display: block !important;
    text-decoration: none !important;
    border-left: none !important;
    margin-left: 0 !important;
    transition: all 0.2s ease !important;
}

.sidebar-nav a:hover {
    background: rgba(255, 221, 0, 0.08) !important;
    color: var(--accent) !important;
    padding-left: 30px !important; /* nudge animation */
}

.sidebar-nav .submenu-item a {
    padding-left: 40px !important;
}

.sidebar-nav .submenu-item a:hover {
    padding-left: 46px !important;
}

.sidebar-nav span {
    color: #ccc !important;
    font-family: var(--font-body);
    font-size: 0.95rem !important;
    padding: 12px 24px !important;
    display: block !important;
}

.sidebar-nav .submenu-item span {
    padding-left: 40px !important;
}

.sidebar-nav .sub-submenu-item a {
    padding-left: 56px !important;
}

.sidebar-nav .sub-submenu-item a:hover {
    padding-left: 62px !important;
}

.sidebar-nav .sub-submenu-item span {
    padding-left: 56px !important;
}

/* Glassmorphic Back button */
.back-btn {
    position: fixed;
    top: 80px;
    left: 22px;
    z-index: 1000;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.back-btn:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    box-shadow: 0 8px 25px var(--accent-glow2);
    transform: scale(1.1) translateY(-2px);
}

/* Glassmorphic Scroll Button */
.scroll-btn {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 1000;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
}

.scroll-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-btn:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    box-shadow: 0 8px 25px var(--accent-glow2);
    transform: scale(1.1) translateY(-2px);
}

/* Hamburger menu overrides */
.hamburger-menu {
    position: fixed;
    bottom: 80px;
    right: 22px;
    z-index: 1001;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border) !important;
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 0 !important;
}

.hamburger-menu:hover {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 8px 25px var(--accent-glow2) !important;
    transform: scale(1.1) translateY(-2px);
}

.hamburger-menu .bar {
    width: 18px !important;
    height: 2px !important;
    background-color: #fff !important;
    border-radius: 1px;
    transition: all 0.3s ease-in-out;
}

.hamburger-menu:hover .bar {
    background-color: #000 !important;
}

/* Expand the page wrapper slightly for these content-heavy lists */
.page-wrapper {
    max-width: 900px !important;
}

/* Image styling updates for dark mode */
.my-div img {
    border: 1px solid var(--border) !important;
    border-radius: 10px;
    max-width: 100% !important;
    height: auto !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .home-btn {
        top: auto;
        bottom: 22px;
        left: auto;
        right: 22px;
    }
    .back-btn {
        top: auto;
        bottom: 22px;
        left: 22px;
    }
    .scroll-btn {
        bottom: 80px;
        right: 22px;
    }
    .hamburger-menu {
        bottom: 138px;
        right: 22px;
    }
    .sidebar {
        right: 12px;
        bottom: 200px;
        width: calc(100% - 24px);
        max-width: 300px;
    }
}
