body {
    background-color: #111111;
    color: #ffffff;
    font-family: sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative; 
}

.webring-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.webring-random {
    color: #ffffff;
    font-family: monospace;
    font-size: 11px;
    text-decoration: underline;
    letter-spacing: 0.5px;
    opacity: 0;
    transition: opacity 0.25s ease, color 0.15s ease;
    cursor: pointer;
    padding: 2px 4px;
}

.webring-container:hover .webring-random {
    opacity: 0.4;
}

.webring-random:hover {
    opacity: 1 !important;
    color: #44aaff;
}

.webring-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 6px;
    padding: 6px 10px;
    font-family: monospace;
    font-size: 12px;
    color: #bbbbbb;
}

.webring-site-name {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.webring-site-name:hover {
    background: #282828;
    color: #44aaff;
}

.webring-sep {
    color: #555555;
    user-select: none;
}

.webring-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #222222;
    border: 1px solid #444444;
    border-radius: 4px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.15s ease;
}

.webring-btn:hover {
    background: #333333;
    border-color: #666666;
    color: #ffffff;
    transform: translateY(-1px);
}

.webring-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

.main-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    max-width: 650px;
    padding: 20px;
    box-sizing: border-box;
}

.profile-section {
    display: flex;
    gap: 30px;
    align-items: center;
}

.avatar {
    flex-shrink: 0;
}

.avatar-placeholder {
    width: 150px;
    height: 150px;
    background-color: #222222;
    border: 2px dashed #444444;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #777777;
    font-family: monospace;
}

.avatar img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 2px solid #555555;
    display: block;
}

.info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Google Sans", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

.name {
    margin: 0;
    font-size: 2.5em;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.nickname {
    font-size: 0.65em; /* A bit smaller */
    font-style: italic; /* Cursive / italicized */
    font-weight: 500; /* Softer than the main name */
    color: #dddddd; /* Slightly lighter color */
}

.bio {
    margin: 0;
    color: #bbbbbb;
    line-height: 1.6;
    font-weight: 400;
}

.socials {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background-color: #1a1a1a;
    color: #dddddd;
    text-decoration: none;
    font-family: monospace;
    font-size: 14px;
    border: 1px solid #333333;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.social-link:hover {
    background-color: #242424;
    border-color: #666666;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.social-link:active {
    transform: translateY(0);
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.social-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-height: 50px;
}

.badges a {
    display: block;
}

.badges img {
    width: 88px;
    height: 31px;
    border: none;
    image-rendering: pixelated;
}

/* Now Playing Widget */
.now-playing {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: #1a1a1a;
    border: 2px solid #555555;
    padding: 12px 15px;
    width: 100%;
    box-sizing: border-box;
}

.np-icon {
    font-size: 32px;
    /* Keeps the retro blocky feel */
    background: #000000;
    padding: 5px;
    border: 1px solid #333333;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.np-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.np-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    overflow: hidden; /* Prevents long song names from breaking the box */
    width: 100%;
    justify-content: center;
}

.np-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 6px;
}

.np-text {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.np-title {
    font-family: monospace;
    font-weight: bold;
    font-size: 16px;
    color: #ffffff;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.np-artist {
    font-family: monospace;
    font-size: 14px;
    color: #aaaaaa;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.np-timecode {
    font-family: monospace;
    font-size: 12px;
    font-weight: bold;
    color: #dddddd;
    white-space: nowrap;
    margin-left: 10px;
    flex-shrink: 0;
}

.np-progress-bar-container {
    background-color: #0c0c0c;
    border: 1px solid #333333;
    border-radius: 4px;
    height: 16px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.np-progress-bar-fill {
    background: repeating-linear-gradient(
        45deg,
        #dddddd,
        #dddddd 10px,
        #bbbbbb 10px,
        #bbbbbb 20px
    );
    height: 100%;
    width: 0%;
    transition: width 0.05s linear;
    animation: moveStripes 1s linear infinite;
}

/* Birthday Progress Widget */
.bday-widget {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background-color: #1a1a1a;
    border: 2px solid #555555;
    border-radius: 6px;
    padding: 16px;
    width: 100%;
    box-sizing: border-box;
    font-family: monospace;
}

.bday-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.bday-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
}

.bday-percentage {
    font-size: 15px;
    font-weight: bold;
    color: #dddddd;
    font-variant-numeric: tabular-nums;
}

.bday-bar-container {
    background-color: #0c0c0c;
    border: 1px solid #333333;
    border-radius: 4px;
    height: 16px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.bday-bar-fill {
    background: repeating-linear-gradient(
        45deg,
        #dddddd,
        #dddddd 10px,
        #bbbbbb 10px,
        #bbbbbb 20px
    );
    height: 100%;
    width: 0%;
    transition: width 0.05s linear;
    animation: moveStripes 1s linear infinite;
}

.bday-countdown-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.bday-unit {
    background: #111111;
    border: 1px solid #333333;
    border-radius: 4px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.bday-val {
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.bday-label {
    font-size: 11px;
    color: #aaaaaa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes moveStripes {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 28.28px 0;
    }
}

/* --- Mobile Adaptation --- */
@media (max-width: 650px) {
    body {
        /* Allow natural scrolling instead of absolute centering if the screen is tiny */
        padding: 20px 0;
        height: auto;
        flex-direction: column; /* Stack body elements vertically */
    }

    .profile-section {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .info {
        align-items: center;
    }

    .socials {
        justify-content: center;
    }

    .badges {
        justify-content: center;
    }

    .webring-container {
        position: static;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 15px;
    }

    .bday-countdown-grid {
        gap: 4px;
    }

    .bday-val {
        font-size: 14px;
    }

    .bday-label {
        font-size: 9px;
    }

    .bday-title {
        font-size: 12px;
    }

    .bday-percentage {
        font-size: 13px;
    }
}
