:root {
    --color-1: #593C47;
    --color-2: #F2E63D;
    --color-3: #F2C53D;
    --color-4: #F25C05;
    --color-5: #F24405;
    --blue-title: #1e40af;
    --text-color: #334155;
}

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

body {
    font-family: 'Zen Kurenaido', 'Noto Sans TC', sans-serif;
    display: flex;
    height: 100vh;
    overflow: hidden;
    background-color: #f8f9fa;
}

.sidebar {
    width: 20%;
    background-color: var(--color-1);
    color: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.sidebar-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px dashed rgba(255,255,255,0.3);
}

.sidebar-header h2 {
    font-family: 'Kaisei Decol', serif;
    font-size: 1.4rem;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.nav-menu {
    list-style: none;
    flex-grow: 1;
}

.nav-item {
    margin-bottom: 12px;
    transition: all 0.3s;
    position: relative;
    border-radius: 5px;
    overflow: hidden;
}

.nav-item a {
    display: block;
    padding: 10px 15px;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.nav-item.active {
    background-color: rgba(255,255,255,0.2);
}

.nav-item.active a {
    color: var(--color-2);
    font-weight: bold;
}

.nav-item:not(.active):hover {
    background-color: rgba(255,255,255,0.1);
}

.nav-item a:before {
    content: "📌 ";
    margin-right: 8px;
}

.main-content {
    width: 80%;
    overflow-y: auto;
    position: relative;
}

.slide {
    min-height: 100%;
    padding: 40px;
    display: none;
    animation: fadeIn 0.5s;
}

.slide.active {
    display: block;
}

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

.slide-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-4);
}

.slide-header i {
    font-size: 1.8rem;
    color: var(--color-5);
    margin-right: 15px;
}

.slide-header h2 {
    font-size: 1.8rem;
    color: var(--blue-title);
    font-family: 'Kaisei Decol', serif;
}

.hand-drawn-box {
    border: 2px solid var(--color-1);
    border-radius: 10px;
    padding: 20px;
    margin: 15px 0;
    position: relative;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 3px 3px 5px rgba(0,0,0,0.1);
    transform: rotate(-0.5deg);
}

.hand-drawn-box::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 20px;
    width: 25px;
    height: 10px;
    border-top: 2px solid var(--color-1);
    border-left: 2px solid var(--color-1);
    border-right: 2px solid var(--color-1);
    border-radius: 50% 50% 0 0;
    transform: rotate(5deg);
}

.hand-drawn-box a {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.concept-title {
    font-weight: bold;
    color: var(--color-5);
    margin-bottom: 10px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.concept-title i {
    margin-right: 10px;
}

a.concept-title {
    text-decoration: none;
}

.content-text {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 15px;
}

.content-text.center {
    text-align: center;
}

.content-text img {
    max-width: 60%;
    margin: 0px auto;
}

.highlight {
    background-color: rgba(242, 197, 61, 0.3);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

.note-box {
    border-left: 4px solid var(--color-3);
    background-color: rgba(242, 197, 61, 0.1);
    padding: 12px 15px;
    margin: 15px 0;
    position: relative;
}

.note-box::before {
    content: "📌";
    position: absolute;
    top: -10px;
    left: 10px;
    font-size: 1.2rem;
}

.code-example {
    background-color: #f8f8f8;
    padding: 12px;
    border-radius: 5px;
    font-family: monospace;
    white-space: pre-wrap;
    line-height: 1.4;
    margin: 15px 0;
    border-left: 3px solid var(--color-4);
}

.example-card {
    display: flex;
    flex-direction: column;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    margin: 15px 0;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.example-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.example-card-header i {
    color: var(--color-4);
    margin-right: 10px;
    font-size: 1.2rem;
}

.example-card-header h3 {
    font-size: 1.2rem;
    color: var(--blue-title);
}

.example-card-content {
    padding: 10px;
    border-top: 1px dashed var(--color-3);
}

.table-container {
    overflow-x: auto;
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

th {
    background-color: var(--color-1);
    color: white;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

.image-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.image-container img {
    max-width: 100%;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.navigation-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.nav-button {
    background-color: var(--color-1);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

.nav-button:hover:not(:disabled) {
    background-color: var(--color-5);
}

.nav-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.nav-button i {
    margin: 0 5px;
}

.two-column {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.two-column.flex-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.column {
    flex: 1;
}

.method-comparison {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

.method-card {
    flex: 1;
    min-width: 250px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 15px;
    border-top: 4px solid var(--color-4);
}

.method-card h3 {
    color: var(--color-5);
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px dashed var(--color-3);
}

.key-feature {
    display: flex;
    align-items: center;
    margin: 8px 0;
}

.key-feature i {
    color: var(--color-4);
    margin-right: 8px;
}

.process-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 25px 0;
}

.process-step {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.process-step:not(:last-child)::after {
    content: "→";
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--color-4);
}

.process-step h4 {
    color: var(--blue-title);
    margin-bottom: 8px;
}

.challenge-box {
    background-color: rgba(242, 92, 5, 0.1);
    border: 2px dashed var(--color-4);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.challenge-box h3 {
    color: var(--color-5);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.challenge-box h3 i {
    margin-right: 10px;
}

.ascii-card {
    margin: 20px 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.ascii-card-header {
    background-color: var(--color-1);
    color: white;
    padding: 10px 15px;
}

.ascii-card-content {
    padding: 15px;
    background-color: white;
}

.ascii-example {
    font-family: monospace;
    background-color: #f8f8f8;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}
.base64-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 1.1rem;
}

.base64-table th, 
.base64-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
}

.base64-table th {
    background-color: var(--color-1);
    color: white;
    font-weight: bold;
}

.base64-table tr:nth-child(even) {
    background-color: rgba(242, 230, 61, 0.1);
}

.base64-table tr:nth-child(odd) {
    background-color: white;
}

.index-cell {
    font-family: monospace;
    color: var(--blue-title);
    font-weight: bold;
}

.char-cell {
    font-size: 1.2rem;
    font-weight: bold;
}

.special-char {
    color: var(--color-5);
}