:root {
    --bg-color: rgba(249, 245, 228, 0.51);
    --text-color: #333;
    --card-bg: rgba(255, 255, 250);
    --border-color: #ddd;
    --subtitle-color: #555;
    --metadata-color: #888;
    --link-color: #000;
    --button-bg: #cbd2f5;
    --button-hover: #a7b2e1;
    --shadow: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --card-bg: #2d2d2d;
    --border-color: #444;
    --subtitle-color: #b0b0b0;
    --metadata-color: #888;
    --link-color: #e0e0e0;
    --button-bg: #4a5568;
    --button-hover: #5a6678;
    --shadow: rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1 {
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    font-size: 2.5em;
    margin: 0;
    color: var(--text-color);
}

#essays-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: var(--card-bg);
    box-shadow: 0 2px 4px 0 var(--shadow);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#essays-container ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#essays-container li {
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
}

#essays-container li a {
    color: var(--link-color);
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
    display: block;
    transition: color 0.3s ease;
}

#essays-container li a:hover {
    opacity: 0.8;
}

#essays-container li .subtitle {
    color: var(--subtitle-color);
    font-size: 18px;
    margin: 10px 0;
    font-weight: normal;
}

#essays-container li .metadata {
    color: var(--metadata-color);
    font-size: 16px;
    margin-bottom: 5px;
    font-style: normal;
}

#theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    z-index: 1000;
}

#theme-toggle:hover {
    background-color: var(--border-color);
}

#theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: var(--text-color);
    transition: fill 0.3s ease;
}
