        /* --- Part 1: Define Color Variables (Light Mode Default) --- */
        :root {
            --bg-color: #fff;
            --text-color: #333;
            --text-secondary-color: #666;
            --link-color: #007bff;
            --border-color: #ddd;
            --code-bg: #f4f4f4;
            --controls-bg: #fff;
            --button-bg: #007bff;
            --button-text: #fff;
            --button-disabled-bg: #ccc;
            --blockquote-bg: #f9f9f9;
            --table-border-color: #ddd;
            --table-header-bg: #f5f5f5;
            --table-row-even-bg: #fafafa;
        }

        /* --- Part 2: Dark Mode Overrides --- */
        @media (prefers-color-scheme: dark) {
            :root {
                --bg-color: #1e1e1e;
                --text-color: #eee;
                --text-secondary-color: #aaa;
                --link-color: #64b5f6;
                /* A lighter blue for better contrast */
                --border-color: #444;
                --code-bg: #2d2d2d;
                --controls-bg: #252526;
                --button-bg: #64b5f6;
                --button-text: #1e1e1e;
                --button-disabled-bg: #555;
                --blockquote-bg: #2a2a2a;
                --table-border-color: #444;
                --table-header-bg: #333;
                --table-row-even-bg: #2a2a2a;
            }

            /* Optional: Make images less bright in dark mode */
            img {
                filter: brightness(.85) contrast(1.1);
            }
        }

        /* --- Part 3: Apply Variables to Elements (Your Original Stylesheet) --- */
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            line-height: 1.6;
            font-size: 1.2em;
            color: var(--text-color);
            background-color: var(--bg-color);
            margin: 0;
            word-break: break-word;
            padding: 1em 1em 5em 1em;
            transition: background-color 0.2s, color 0.2s;
            /* Smooth transition */
        }

        @media (max-width: 500px) {
            body {
                font-size: 1em;
            }
        }

        main {
            max-width: 800px;
            margin: 0 auto;
        }

        h1,
        h2,
        h3 {
            margin-top: 0;
            line-height: 1.2;
        }

        p {
            margin-bottom: 1em;
        }

        a {
            color: var(--link-color);
            text-decoration: none;
        }

        a:hover {
            text-decoration: underline;
        }

        pre {
            background-color: var(--code-bg);
            padding: 1em;
            overflow-x: auto;
            border-radius: 4px;
        }

        code {
            font-family: monospace;
            font-size: 0.9em;
        }

        p>code,
        li>code {
            background-color: var(--code-bg);
            padding: 0.2em 0.4em;
            border-radius: 3px;
        }

        blockquote {
            background-color: var(--blockquote-bg);
            border-left: 5px solid var(--link-color);
            margin: 1.5em 0;
            padding: 1em 1.5em;
            font-style: italic;
            border-radius: 4px;
            color: var(--text-secondary-color);
        }

        img {
            max-width: 100%;
            height: auto;
            vertical-align: middle;
            border-radius: 8px;
        }

        p>img:first-child:last-child {
            display: block;
            margin: 2em auto;

        }

        hr {
            border: none;
            border-top: 1px solid var(--border-color);
            margin: 2em 0;
        }

        .slide {
            display: none;
        }

        .slide.active {
            display: block;
        }

        #slide-controls {
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            background-color: var(--controls-bg);
            border-top: 1px solid var(--border-color);
            padding: 10px;
            display: flex;
            box-sizing: border-box;
            justify-content: space-between;
            align-items: center;
            gap: 20px;
            box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
            transition: background-color 0.2s, border-top-color 0.2s;
        }

        #slide-controls button {
            background-color: var(--button-bg);
            color: var(--button-text);
            border: none;
            cursor: pointer;
            font-size: 1em;

            /* Make the button a circle */
            border-radius: 50%;

            /* Set a fixed size and center the icon inside */
            width: 44px;
            height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            /* Remove padding */
        }

        #slide-controls button:disabled {
            background-color: var(--button-disabled-bg);
            cursor: not-allowed;
        }

        #slide-counter {
            font-family: monospace;
            font-size: 1.1em;
        }

        #slide-controls button svg {
            /* This makes the icon color match the button's text color automatically */
            stroke: currentColor;

            /* Ensure the icon is centered if button dimensions change */
            display: block;
        }

        /* --- Curvy Table Design (with Dark Mode support) --- */

        table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            border: 1px solid var(--table-border-color);
            border-radius: 12px;
            overflow: hidden;
            margin: 0;
        }

        th,
        td {
            padding: 12px 15px;
            text-align: left;
            border-bottom: 1px solid var(--table-border-color);
            word-break: keep-all;
        }

        thead th {
            background-color: var(--table-header-bg);
            font-weight: 600;
        }

        tbody tr:last-child td {
            border-bottom: none;
        }

        tbody tr:nth-child(even) {
            background-color: var(--table-row-even-bg);
        }

        iframe {
            width: 100%;
            aspect-ratio: 16/9;
            height: auto;
            border-radius: 12px;
        }