/* ===========================
   Theme Toggle - Dark Mode
   =========================== */

/* Dark Theme */
body.dark-theme {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #999999;
    --text-tertiary: #666666;
    --border-color: #2a2a2a;
}

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

/* Smooth transition between themes */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

a, .site-header, .site-footer, .post-item, .note-card {
    transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    vertical-align: middle;
}

.theme-toggle:hover {
    opacity: 1;
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-primary);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
}

/* Hide/show icons based on theme */
.theme-toggle .sun-icon {
    display: none;
}

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

body.dark-theme .theme-toggle .sun-icon {
    display: block;
}

body.dark-theme .theme-toggle .moon-icon {
    display: none;
}
