:root {
    --bg-color: #fcfdc8;
    --text-color: #222;
    --link-color: #7b5dff;
    --button-bg: #fff;
    --button-border: #ddd;
    --button-text: #333;
    --code-bg: #f8f8f8;
}

[data-theme="dark"] {
    --bg-color: #000000;
    --bg-color: #000000;
    --text-color: #e0e0e0;
    --link-color: #9d7eff;
    --button-bg: #333;
    --button-border: #555;
    --button-text: #e0e0e0;
    --code-bg: #141414;
}

body {
    font-family: "Times New Roman", Times, serif;
    max-width: 700px;
    margin: 80px auto;
    padding: 0 20px;
    padding: 0 20px;
    line-height: 1.6;
    background: var(--bg-color);
    color: var(--text-color);
    transition:
        background-color 0.3s ease,
        color 0.3s ease;
}

.home-container {
    flex: 1;
    margin-top: -60px;
}

.home-content {
    flex: 1;
}

.home-header {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted, #666);
    margin-bottom: 3rem;
    margin-top: 0;
    padding-top: 0;
}

.home-header a {
    text-decoration: none;
}

.home-header a:hover {
    color: var(--link-color);
    text-decoration: underline;
}

.home-header span {
    margin: 0 0.5rem;
}

@media (max-width: 768px) {
    body {
        margin: 40px auto;
        padding: 0 16px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .theme-toggle {
        top: 16px;
        right: 16px;
    }

    .theme-icon {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 768px) {
    body {
        margin: 40px auto;
        padding: 0 16px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .theme-toggle {
        top: 16px;
        right: 16px;
    }

    .theme-icon {
        width: 32px;
        height: 32px;
    }
}

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

a:hover {
    text-decoration: underline;
}

h1 {
    font-size: 2rem;
}

.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1000;
    padding: 0;
}

.theme-toggle:active {
    opacity: 0.7;
}

.theme-icon {
    width: 40px;
    height: 40px;
    transition: transform 0.6s ease;
    filter: invert(0);
    animation: rotate 0.6s ease-in-out;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

nav {
    margin-bottom: 2rem;
}

nav a {
    font-size: 0.9rem;
}

nav a:not([href]),
nav a[href=""],
nav a[href="#"] {
    opacity: 0.7;
    cursor: default;
}

nav a:not([href]):hover,
nav a[href=""]:hover,
nav a[href="#"]:hover {
    opacity: 0.7;
    text-decoration: none;
}

@import url("https://fonts.googleapis.com/css2?family=Monaspace+Neon:wght@300;400;500;600;700&display=swap");

code {
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 6px;
    font-family:
        "Monaspace Neon", "SF Mono", Monaco, "Cascadia Code", "Roboto Mono",
        Consolas, "Courier New", monospace;
    font-size: 0.75em;
}

.screentime-title {
    display: block;
    margin: 0 0 2rem 0;
    width: 100%;
    max-width: 400px;
    height: auto;
    filter: invert(0);
    transition: filter 0.3s ease;
}

[data-theme="dark"] .screentime-title {
    filter: invert(1);
}

.kwashiorkor-title {
    display: block;
    margin: 0 0 2rem 0;
    width: 100%;
    max-width: 400px;
    height: auto;
    filter: invert(0);
    transition: filter 0.3s ease;
}

[data-theme="dark"] .kwashiorkor-title {
    filter: invert(1);
}

@media (max-width: 768px) {
    .screentime-title {
        max-width: 300px;
        margin: 0 0 1.5rem 0;
    }
}

.content-wrapper {
    display: flex;
    gap: 20px;
}

.text-content {
    flex: 1;
}

.image-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.image-content img {
    max-width: 70%;
    height: auto;
}

.audio-player-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(
        to bottom,
        #4db8ff 0%,
        #0a8dd9 50%,
        #0074c2 100%
    );
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    z-index: 999;
    padding: 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.audio-player-fixed::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
}

[data-theme="dark"] .audio-player-fixed {
    background: linear-gradient(
        to bottom,
        #1a5c85 0%,
        #0d3d5c 50%,
        #082a3d 100%
    );
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.audio-player-content {
    display: flex;
    align-items: center;
    padding: 4px 20px;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.audio-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.audio-controls button {
    background: linear-gradient(
        to bottom,
        #ffffff 0%,
        #f0f8ff 40%,
        #e1f0ff 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    position: relative;
}

.audio-controls button::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 3px;
    right: 3px;
    height: 40%;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.6) 0%,
        rgba(255, 255, 255, 0) 100%
    );
    border-radius: 50%;
    pointer-events: none;
}

.audio-controls button:hover {
    background: linear-gradient(
        to bottom,
        #ffffff 0%,
        #f5faff 40%,
        #e8f4ff 100%
    );
    transform: scale(1.05);
}

.audio-controls button:active {
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
}

.audio-controls button svg {
    width: 12px;
    height: 12px;
    fill: #1a5c85;
    position: relative;
    z-index: 1;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.volume-container svg {
    width: 14px;
    height: 14px;
    fill: rgba(255, 255, 255, 0.95);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

[data-theme="dark"] .volume-container svg {
    fill: rgba(255, 255, 255, 0.8);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.volume-container input[type="range"] {
    flex: 1;
    height: 3px;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.8) 100%
    );
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .volume-container input[type="range"] {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.volume-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    background: linear-gradient(to bottom, #ffffff 0%, #e8f4ff 100%);
    cursor: pointer;
    border-radius: 50%;
    border: 1px solid rgba(26, 92, 133, 0.5);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.volume-container input[type="range"]::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: linear-gradient(to bottom, #ffffff 0%, #e8f4ff 100%);
    cursor: pointer;
    border-radius: 50%;
    border: 1px solid rgba(26, 92, 133, 0.5);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.marquee-container {
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.7) 100%
    );
    border-radius: 3px;
    padding: 3px 10px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.5);
    flex: 1;
    min-width: 0;
}

[data-theme="dark"] .marquee-container {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.4) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.3),
        0 1px 0 rgba(255, 255, 255, 0.1);
}

.marquee-track {
    position: relative;
    width: 100%;
    height: 1.4em;
}

.song-title {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: #1a5c85;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate3d(0, -50%, 0);
    will-change: transform;
}

[data-theme="dark"] .song-title {
    color: #d0e8f5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.audio-player-fixed audio {
    display: none;
}

.audio-player-fixed.playing {
    animation: glitterPulse 2s ease-in-out infinite;
}

.audio-player-fixed.playing::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 25%,
        rgba(255, 182, 255, 0.4) 50%,
        rgba(182, 255, 255, 0.4) 75%,
        transparent 100%
    );
    animation: shine 3s linear infinite;
    pointer-events: none;
    z-index: 2;
}

.audio-player-fixed.playing .audio-player-content::before {
    content: "✨";
    position: absolute;
    font-size: 16px;
    animation: sparkle1 2s ease-in-out infinite;
    z-index: 10;
    pointer-events: none;
}

.audio-player-fixed.playing .audio-player-content::after {
    content: "✨";
    position: absolute;
    font-size: 20px;
    animation: sparkle2 2.5s ease-in-out infinite;
    z-index: 10;
    pointer-events: none;
}

.audio-player-fixed.playing .marquee-container::before {
    content: "★";
    position: absolute;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    animation: sparkle3 1.8s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

.audio-player-fixed.playing .marquee-container::after {
    content: "✦";
    position: absolute;
    font-size: 14px;
    color: rgba(255, 182, 255, 0.9);
    animation: sparkle4 2.2s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes glitterPulse {
    0%,
    100% {
        box-shadow:
            0 2px 6px rgba(0, 0, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        box-shadow:
            0 2px 6px rgba(0, 0, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.4),
            0 0 20px rgba(255, 182, 255, 0.6),
            0 0 30px rgba(182, 255, 255, 0.4);
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 200%;
    }
}

@keyframes sparkle1 {
    0%,
    100% {
        opacity: 0;
        transform: translate(20px, 5px) scale(0.5) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: translate(40px, -5px) scale(1) rotate(180deg);
    }
}

@keyframes sparkle2 {
    0%,
    100% {
        opacity: 0;
        transform: translate(80%, 8px) scale(0.5) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: translate(90%, -8px) scale(1.2) rotate(-180deg);
    }
}

@keyframes sparkle3 {
    0%,
    100% {
        opacity: 0;
        left: 10%;
        top: -5px;
        transform: scale(0.5) rotate(0deg);
    }
    50% {
        opacity: 1;
        left: 15%;
        top: -10px;
        transform: scale(1) rotate(180deg);
    }
}

@keyframes sparkle4 {
    0%,
    100% {
        opacity: 0;
        right: 20%;
        top: -5px;
        transform: scale(0.5) rotate(0deg);
    }
    50% {
        opacity: 1;
        right: 25%;
        top: -10px;
        transform: scale(1.2) rotate(-180deg);
    }
}

@media (max-width: 768px) {
    .audio-player-content {
        padding: 3px 16px;
    }

    .audio-controls {
        gap: 6px;
    }

    .audio-controls button {
        width: 22px;
        height: 22px;
    }

    .audio-controls button svg {
        width: 11px;
        height: 11px;
    }

    .volume-container svg {
        width: 12px;
        height: 12px;
    }

    .song-title {
        font-size: 0.7rem;
    }
}
