/* ================================ */
/*  Combined Styles + Last.fm CSS   */
/* ================================ */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #313338;
    --bg-secondary: #2b2d31;
    --bg-tertiary: #1e1f22;
    --text-primary: #f2f3f5;
    --text-secondary: #b5bac1;
    --text-muted: #949ba4;
    --accent: #5865f2;
    --accent-hover: #4752c4;
    --green: #23a559;
    --yellow: #f0b232;
    --red: #f23f43;
    --offline: #80848e;
    --card-border: #1e1f22;
    --divider: #3f4147;
}

body {
    font-family: 'gg sans', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

/* Profile Header */
.profile-header {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
}

.profile-info {
    display: flex;
    align-items: flex-end;
    gap: 20px;
    padding: 24px;
    position: relative;
}

/* Clock */
.clock {
    position: absolute;
    top: 24px;
    right: 24px;
    text-align: right;
}

.clock-time {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.clock-date {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.clock-timezone {
    display: block;
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
    margin-top: 2px;
}

.avatar-container {
    position: relative;
    flex-shrink: 0;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 8px solid var(--bg-secondary);
    object-fit: cover;
    background-color: var(--bg-tertiary);
}

.status-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 5px solid var(--bg-secondary);
    background-color: var(--offline);
    transition: background-color 0.3s ease;
}

.status-indicator.online { background-color: var(--green); }
.status-indicator.idle { background-color: var(--yellow); }
.status-indicator.dnd { background-color: var(--red); }
.status-indicator.offline { background-color: var(--offline); }

.user-details {
    padding-bottom: 10px;
}

.user-details h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.discriminator {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Custom Status Emoji */
.custom-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.custom-status img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.custom-status .emoji-custom {
    vertical-align: middle;
}

.custom-status .emoji-text {
    font-size: 1.2rem;
}

/* Navigation */
.nav-links {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: inherit;
}

.nav-link:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.nav-link.active {
    background-color: var(--accent);
    color: var(--text-primary);
}

.nav-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Page Visibility + Animations */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Slide animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.slide-in-left {
    animation: slideInLeft 0.35s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.35s ease-out;
}

.slide-in-scale {
    animation: scaleUp 0.4s ease-out;
}

/* Main Content */
.main-content {
    display: grid;
    gap: 24px;
}

/* Cards */
.card {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.card h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.icon {
    width: 24px;
    height: 24px;
    color: var(--accent);
    flex-shrink: 0;
}

/* Discord Status */
.activity-container {
    min-height: 80px;
    margin-bottom: 12px;
}

.activity {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 12px;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 12px;
}

.activity-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.activity-details h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.activity-details p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.activity-timer {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.no-activity {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Activity Links */
.activity-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.activity-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* About Me - Compact */
.about-me p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

/* About Me - Expanded (About Me Tab) */
.about-me-expanded {
    padding: 0;
    overflow: hidden;
}

.about-me-expanded .about-me-intro {
    padding: 24px;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border-bottom: 1px solid var(--divider);
}

.about-me-expanded .about-me-intro p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-me-sections {
    padding: 24px;
}

.about-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--divider);
}

.about-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.about-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 12px;
}

.about-section h3 svg {
    width: 20px;
    height: 20px;
}

.about-section p,
.about-section li {
    color: var(--text-secondary);
    line-height: 1.7;
}

.about-section ul {
    list-style: none;
    padding-left: 0;
}

.about-section li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
}

.about-section li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Staggered card animations */
.card.animate-in {
    animation: cardSlideUp 0.4s ease-out both;
}

.card.animate-in:nth-child(1) { animation-delay: 0.05s; }
.card.animate-in:nth-child(2) { animation-delay: 0.1s; }
.card.animate-in:nth-child(3) { animation-delay: 0.15s; }
.card.animate-in:nth-child(4) { animation-delay: 0.2s; }

@keyframes cardSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Social Links */
.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.2s ease;
    background-color: var(--bg-tertiary);
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.social-link svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.social-link.discord:hover { background-color: #5865f2; }
.social-link.github:hover { background-color: #6e7681; }
.social-link.spotify:hover { background-color: #1db954; }
.social-link.roblox:hover { background-color: #e2231a; }
.social-link.lastfm:hover { background-color: #d5100d; }

/* Footer */
.footer {
    text-align: center;
    padding: 24px;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Now Playing */
.now-playing {
    padding: 0;
    overflow: hidden;
}

.now-playing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    padding-bottom: 0;
}

.now-playing-header h2 {
    margin-bottom: 0;
}

/* Last.fm Profile Link */
.lastfm-profile-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: #d5100d;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.lastfm-profile-link:hover {
    background-color: #b50d0a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(213, 16, 13, 0.3);
}

.lastfm-profile-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.now-playing-content {
    display: flex;
    gap: 24px;
    padding: 24px;
    align-items: flex-start;
}

.album-art-container {
    flex-shrink: 0;
}

.album-art {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.album-art:hover {
    transform: scale(1.05);
}

.track-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.track-info p {
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-size: 1rem;
}

.track-info #track-artist {
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 500;
}

.scrobble-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
}

.scrobble-info svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
    flex-shrink: 0;
}

.scrobble-info span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Recent Tracks */
.recent-tracks-list {
    display: grid;
    gap: 12px;
}

.track-item {
    display: flex;
    gap: 16px;
    padding: 12px;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    transition: all 0.2s ease;
    align-items: center;
}

.track-item:hover {
    background-color: var(--divider);
    transform: translateX(4px);
}

.track-item-album {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.track-item-info {
    flex: 1;
}

.track-item-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.track-item-artist {
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 2px;
}

.track-item-album-name {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.track-item-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Top Artists */
.top-artists-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.artist-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    transition: all 0.2s ease;
    align-items: center;
}

.artist-item:hover {
    background-color: var(--divider);
    transform: translateY(-2px);
}

.artist-item-image {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background-color: var(--bg-primary);
}

.artist-item-info {
    flex: 1;
}

.artist-item-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.artist-item-plays {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Track and Artist Links */
.track-link,
.artist-link,
.track-item-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.track-link:hover,
.artist-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.track-item-link {
    display: contents;
}

.track-item-link:hover .track-item-name {
    color: var(--accent);
}

.track-item:hover {
    cursor: pointer;
}

/* Loading State */
.loading-placeholder {
    animation: shimmer 1.5s infinite;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--divider) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }

    .profile-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .clock {
        position: static;
        text-align: center;
        margin-top: 16px;
    }

    .avatar {
        width: 100px;
        height: 100px;
    }

    .user-details h1 {
        font-size: 1.5rem;
    }

    .social-grid {
        grid-template-columns: 1fr;
    }

    .activity {
        flex-direction: column;
        text-align: center;
    }

    .now-playing-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .album-art {
        width: 150px;
        height: 150px;
    }

    .top-artists-list {
        grid-template-columns: 1fr;
    }

    .track-item {
        flex-direction: column;
        text-align: center;
    }

    .track-item-album {
        width: 100px;
        height: 100px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: var(--divider);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
