:root {
    /* Light theme variables */
    --bg-color-light: #ffffff;
    --text-color-light: #333333;
    --toc-bg-light: #f5f5f5;
    --border-color-light: #e0e0e0;
    --button-bg-light: #f0f0f0;
    --button-hover-light: #e0e0e0;
    
    /* Dark theme variables */
    --bg-color-dark: #1a1a1a;
    --text-color-dark: #ffffff;
    --toc-bg-dark: #2d2d2d;
    --border-color-dark: #404040;
    --button-bg-dark: #333333;
    --button-hover-dark: #404040;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color-light);
    color: var(--text-color-light);
    transition: background-color 0.3s, color 0.3s;
    font-size: 16px;
    line-height: 1.5;
}

body.dark-theme {
    background-color: var(--bg-color-dark);
    color: var(--text-color-dark);
}

.top-bar {
    position: fixed;
    top: 0;
    right: 0;
    padding: 1rem;
    z-index: 1000;
    display: flex;
    gap: 1rem;
}

.container {
    display: flex;
    margin-top: 60px;
    min-height: calc(100vh - 60px);
}

.table-of-contents {
    width: 250px;
    max-height: 80vh;
    position: fixed;
    top: 60px;
    right: 0;
    padding: 1rem;
    overflow-y: auto;
    background-color: var(--toc-bg-light);
    border-left: 1px solid var(--border-color-light);
    border-bottom: 1px solid var(--border-color-light);
    transition: transform 0.3s ease;
    z-index: 999;
}

.dark-theme .table-of-contents {
    background-color: var(--toc-bg-dark);
    border-left-color: var(--border-color-dark);
    border-bottom-color: var(--border-color-dark);
}

.table-of-contents.hidden {
    transform: translateX(100%);
}

.content {
    flex: 1;
    padding: 2rem;
    margin-right: 250px;
    transition: margin-right 0.3s ease;
}

.content.full-width {
    margin-right: 0;
}

button {
    background: var(--button-bg-light);
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.dark-theme button {
    background: var(--button-bg-dark);
}

button:hover {
    background: var(--button-hover-light);
}

.dark-theme button:hover {
    background: var(--button-hover-dark);
}

svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.theme-icon .moon {
    display: none;
}

.dark-theme .theme-icon .sun {
    display: none;
}

.dark-theme .theme-icon .moon {
    display: block;
}

.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

/* Table of Contents Navigation Styles */
#toc-nav {
    margin-top: 1rem;
}

#toc-nav a {
    display: block;
    padding: 0.5rem 0;
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

#toc-nav a:hover {
    color: #007bff;
}

.dark-theme #toc-nav a:hover {
    color: #66b0ff;
}

/* Price List Specific Styles */
.links-section {
    margin-bottom: 2rem;
}

.links-section {
    font-size: 1.1rem;
    line-height: 1.6;
}

.links-section a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}

.links-section a:hover {
    opacity: 0.8;
}

.note {
    font-size: 1.1rem;
    line-height: 1.6;
}

.discount-info {
    font-size: 1.1rem;
    line-height: 1.6;
}

.discount-info ul li {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
}

.shipping-info {
    font-size: 1.1rem;
    line-height: 1.6;
}

.shipping-info ul {
    list-style: none;
    padding-left: 0;
}

.shipping-info ul li {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    font-weight: normal;
}

.shipping-info ul li strong {
    font-weight: 600;
}

.note {
    font-style: italic;
    color: #666;
}

.dark-theme .note {
    color: #aaa;
}

.price-table {
    width: 85%;
    max-width: 800px;
    border-collapse: collapse;
    margin: 1.5rem auto;
    background-color: var(--bg-color-light);
}

.dark-theme .price-table {
    background-color: var(--bg-color-dark);
}

.price-table th,
.price-table td {
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border-color-light);
    font-size: 1.1rem;
}

.price-table th {
    background-color: var(--toc-bg-light);
    text-align: left;
    font-weight: 600;
    font-size: 1.15rem;
}

.price-table td {
    text-align: left;
}

/* Column widths */
.price-table th:nth-child(1),
.price-table td:nth-child(1) {
    width: 40%;
}

.price-table th:nth-child(2),
.price-table td:nth-child(2) {
    width: 40%;
}

.price-table th:nth-child(3),
.price-table td:nth-child(3) {
    width: 20%;
}

.dark-theme .price-table th,
.dark-theme .price-table td {
    border-color: var(--border-color-dark);
}

.dark-theme .price-table th {
    background-color: var(--toc-bg-dark);
}

.discount-info ul,
.shipping-info ul {
    list-style: none;
    padding-left: 0;
}

.discount-info li,
.shipping-info li {
    margin-bottom: 0.5rem;
}

section {
    margin-bottom: 3rem;
    width: 85%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.content h1 {
    width: 85%;
    max-width: 800px;
    margin: 1rem auto 2rem;
    font-size: 1.8rem;
}

h2 {
    margin-top: 2rem;
    padding-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Slightly smaller heading for the inline note to match content sizing */
.sub-heading {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.25rem;
}

h2 {
    margin-top: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color-light);
}

.dark-theme h2 {
    border-bottom-color: var(--border-color-dark);
}

/* Center content within sections */
.discount-info,
.shipping-info,
.links-section {
    width: 85%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Add spacing between rows */
.price-table tr:not(:last-child) td {
    border-bottom: 1px solid var(--border-color-light);
}

.dark-theme .price-table tr:not(:last-child) td {
    border-bottom-color: var(--border-color-dark);
}