/* ---------- Reset ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    text-decoration: none;
    box-sizing: border-box;
}

/* ---------- Theme (Shinobu Oshino: golden blonde / amber / warm night) ---------- */
:root {
    --accent: 255, 214, 102;      /* golden blonde */
    --pink: 240, 160, 60;         /* amber (secondary) */
    --muted: 200, 185, 150;
    --soft-white: 255, 245, 215;
    --bg: 20, 16, 8;              /* page background, buttons */
    --surface: 40, 32, 16;        /* card background, borders */
    --bg-image: url("assets/bg.png");
}

/* ---------- Base ---------- */
::-webkit-scrollbar {
    width: 3px;
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(rgb(var(--accent)), rgb(var(--pink)));
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    background: rgb(var(--bg)) var(--bg-image) center/cover no-repeat fixed;
    font-family: 'Poppins', sans-serif;
}

.profile {
    width: fit-content;
    padding: 40px;
    text-align: center;
    color: #fff;
    animation: fadeInDown 1s; /* keyframes come from animate.css */
}

/* ---------- Banner and card ---------- */
.header {
    position: relative;
    z-index: -1;
    height: 200px;
    margin: auto;
    padding: 40px;
    border-radius: 6px 6px 0 0;
    background-position: 50%;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: inset 0 0 250px rgba(20, 16, 8, 0.85);
}

.box {
    width: inherit;
    margin: auto;
    padding: 40px 200px 5px;
    border-radius: 0 0 6px 6px;
    background: rgb(var(--surface));
    color: #fff;
    box-shadow: 0 0 60px rgba(var(--accent), 0.15);
}

.box-img {
    width: 200px;
    height: 200px;
    margin-top: -150px; /* overlaps the banner */
    border: 6px solid rgb(var(--accent));
    border-radius: 50%;
    box-shadow:
        0 0 30px 15px rgba(var(--accent), 0.35),
        0 0 60px 20px rgba(var(--pink), 0.2);
    transition: 0.5s;
}
.box-img:hover {
    transform: scale(1.08);
    border-color: rgb(var(--pink));
    box-shadow:
        0 0 40px 20px rgba(var(--accent), 0.5),
        0 0 80px 30px rgba(var(--pink), 0.3);
}

.box h1 {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: 2px;
    color: rgb(var(--accent));
    text-shadow:
        0 0 20px rgba(var(--accent), 0.5),
        0 0 40px rgba(var(--pink), 0.3);
}
.box h5 {
    font-weight: 600;
    color: rgb(var(--pink));
}
.box p {
    margin-top: 12px;
    font-size: 0.9rem;
    color: rgb(var(--soft-white));
}

/* ---------- Section titles and full-width sections ---------- */
.box .social-title,
.box .activity-title {
    display: flex;
}
.box .social-title   { padding-top: 20px; }
.box .activity-title { padding-top: 10px; }

/* Sections extend past the box padding to fill its full width */
.box .social-title,
.box .activity-title,
.box .activity,
.box .date {
    width: calc(100% + 160px);
    margin-left: -80px;
}

/* Small slate title with a leading bar, matches the social-title image */
.box .activity-title h2 {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgb(75, 82, 104);
}
.box .activity-title h2::before {
    content: "";
    width: 35px;
    height: 4px;
    border-radius: 2px;
    background: rgb(62, 70, 88);
}

/* ---------- Social buttons ---------- */
.box .social {
    display: grid;
    grid-template-columns: repeat(4, 108px);
    justify-content: center;
    gap: 14px;
    padding-top: 12px;
}
.box .social a {
    grid-column: span 2;
}
.box .social a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 52px;
    border: 3px solid rgb(var(--surface));
    border-radius: 10px;
    background: rgb(var(--bg));
    transition: 0.25s;
}
.box .social a:hover {
    transform: scale(0.95);
    border-color: rgb(var(--accent));
    background: rgb(var(--surface));
    box-shadow:
        0 0 20px rgba(var(--accent), 0.35),
        0 0 40px rgba(var(--pink), 0.2);
    transition: 0.5s;
}
.box .social img {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    object-fit: contain;
    /* Tints the icons golden */
    filter: brightness(0) saturate(100%) invert(85%) sepia(55%) saturate(500%) hue-rotate(5deg) brightness(1.05);
}
.box .social span {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: #fff;
}

/* ---------- AniList activity ---------- */
.box .activity {
    display: flex;
    justify-content: center;
    padding: 8px 0 15px;
    border-bottom: 2px solid rgba(var(--muted), 0.2);
}
.activity-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 460px;
    max-width: 100%;
    padding: 10px 16px 10px 10px;
    border: 3px solid rgb(var(--surface));
    border-radius: 12px;
    background: rgb(var(--bg));
    color: inherit;
    text-align: left;
    transition: 0.3s;
}
.activity-card:hover {
    transform: scale(0.97);
    border-color: rgb(var(--accent));
    background: rgb(var(--surface));
    box-shadow:
        0 0 20px rgba(var(--accent), 0.35),
        0 0 40px rgba(var(--pink), 0.2);
}

.cover-container {
    width: 56px;
    height: 80px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(var(--accent), 0.1); /* placeholder while the cover loads */
}
.media-cover {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.activity-details {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    min-width: 0; /* lets the long title be truncated */
}
.activity-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    border: 1px solid rgba(var(--accent), 0.3);
    border-radius: 20px;
    background: rgba(var(--accent), 0.15);
    color: #fff3c4;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.status-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgb(var(--pink));
    box-shadow: 0 0 6px rgb(var(--pink));
}
.activity-time {
    font-size: 0.65rem;
    color: rgb(var(--muted));
}
.media-title {
    overflow: hidden;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.box .progress-info {
    margin: 0;
    font-size: 0.75rem;
    color: rgb(var(--muted));
}
.progress-highlight {
    font-weight: 600;
    color: rgb(var(--pink));
}
.activity-arrow {
    font-size: 1.1rem;
    color: rgb(var(--accent));
    opacity: 0.6;
    transition: 0.3s;
}
.activity-card:hover .activity-arrow {
    opacity: 1;
    transform: translate(2px, -2px);
}

/* ---------- Date ---------- */
.box .date {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0 11px;
    font-size: 0.7rem;
    font-weight: 100;
    color: rgb(var(--muted));
}

.credit {
    letter-spacing: 0.5px;
}
.credit-link {
    color: rgb(var(--accent));
    font-weight: 600;
    transition: 0.25s;
}
.credit-link:hover {
    color: rgb(var(--pink));
    text-shadow: 0 0 10px rgba(var(--pink), 0.6);
}
.heart {
    display: inline-block;
    color: rgb(var(--pink));
    text-shadow: 0 0 8px rgba(var(--pink), 0.6);
    animation: heartbeat 1.6s ease-in-out infinite;
}
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.25); }
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
    html, body {
        width: 100%;
        overflow-x: hidden;
    }
    body {
        align-items: flex-start;
        overflow-y: auto;
    }

    .profile {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        padding: 10px;
    }
    .header {
        height: 140px;
        padding: 0;
        background-position: center;
    }
    .box {
        width: 100%;
        padding: 20px 12px;
    }
    .box-img {
        width: 120px;
        height: 120px;
        margin-top: -60px;
        border-width: 4px;
    }
    .box h1 {
        margin-top: 8px;
        font-size: 26px;
    }
    .box h5 { font-size: 0.9rem; }
    .box p {
        margin-bottom: 15px;
        font-size: 0.85rem;
    }

    /* Sections go back to the normal box width */
    .box .social-title,
    .box .activity-title,
    .box .activity,
    .box .date {
        width: 100%;
        margin-left: 0;
    }

    .box .social {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px 0 0;
    }
    .box .social a {
        height: 48px;
        padding: 0 15px;
        overflow: hidden;
        border-width: 2px;
        border-radius: 8px;
    }
    .box .social img {
        width: 20px;
        height: 20px;
    }
    .box .social span {
        overflow: hidden;
        font-size: 0.9rem;
        letter-spacing: 1px;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .activity-card {
        width: 100%;
        gap: 12px;
    }

    .box .date {
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        padding: 10px 0;
        font-size: 0.65rem;
    }
    .box .social {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 0 0;
    }
    .box .social a {
        grid-column: auto;
    }    
}