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

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg:            #0a0a0a;
    --surface:       #111111;
    --surface-2:     #181818;
    --border:        rgba(255,255,255,0.07);
    --border-hover:  rgba(255,255,255,0.13);
    --text:          #e8e8e8;
    --text-muted:    #555;
    --text-dim:      #888;
    --green:         #22c55e;
    --red:           #ef4444;
    --spotify:       #1DB954;
    --radius:        14px;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem 4rem;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overscroll-behavior-y: auto;
}

.page {
    width: 100%;
    max-width: 760px;
    will-change: transform, opacity;
}

.animate-in {
    animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.profile-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-dim);
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    letter-spacing: 0.01em;
    transform: translateZ(0);
}

.social-btn img,
.social-btn svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
    flex-shrink: 0;
    object-fit: contain;
}

.social-btn:hover {
    color: var(--text);
    border-color: var(--border-hover);
    background: var(--surface-2);
}

.social-btn:hover img,
.social-btn:hover svg {
    opacity: 1;
}

.roblox-btn:hover        { border-color: rgba(226,50,50,0.35); color: #ff6b6b; }
.spotify-btn:hover        { border-color: rgba(29,185,84,0.35); color: var(--spotify); }
.spotify-btn svg          { fill: currentColor; }
.discord-btn:hover        { border-color: rgba(88,101,242,0.35); color: #7b8ef0; }
.discord-canary-btn:hover { border-color: rgba(240,188,38,0.35); color: #f0bc26; }

.pc-badge-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    flex-shrink: 0;
}

.status-badge {
    padding: 0.35rem 0.8rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    font-family: 'Inter', monospace;
}

.status-badge.online {
    background: rgba(34,197,94,0.1);
    color: var(--green);
    border: 1px solid rgba(34,197,94,0.2);
}

.status-badge.offline {
    background: rgba(239,68,68,0.1);
    color: var(--red);
    border: 1px solid rgba(239,68,68,0.2);
}

.uptime-small {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-align: right;
}

.section-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.section-divider span {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    white-space: nowrap;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: border-color 0.25s, box-shadow 0.25s;
    width: 100%;
    min-width: 0;
    transform: translateZ(0);
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}

.card-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 1.1rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-display {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.activity-icon-wrap {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.activity-icon-img {
    max-width: 100%;
    height: auto;
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.activity-icon-img.roblox-thumb {
    width: 52px;
    height: 52px;
    border-radius: 10px;
}

.activity-details {
    flex: 1;
    min-width: 0;
}

.activity-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    margin-bottom: 2px;
}

.activity-subtitle {
    font-size: 0.72rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.spotify-current {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.spotify-cover {
    width: 52px;
    height: 52px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--surface-2);
}

.song-details {
    flex: 1;
    min-width: 0;
}

.song-title {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    margin-bottom: 3px;
}

.song-artist {
    font-size: 0.78rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.discord-progress {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.time-text {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    min-width: 32px;
}

.time-text.right {
    text-align: right;
}

.progress-track {
    flex: 1;
    height: 3px;
    background: var(--surface-2);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--text-dim);
    width: 0%;
    border-radius: 999px;
    transition: width 1s linear;
}

.spotify-stats {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--surface-2);
    border-radius: 8px;
    overflow: hidden;
}

.stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.6rem 0;
    gap: 2px;
}

.stat-sep {
    width: 1px;
    height: 28px;
    background: var(--border);
}

.stat-label {
    font-size: 0.62rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.stat-value {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 640px) {
    body { 
        padding: 1.5rem 1rem 3rem; 
    }
    .page {
        max-width: 100%;
    }
    .profile-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.25rem;
        margin-bottom: 2rem;
    }
    .social-links {
        justify-content: center;
        width: 100%;
    }
    .social-btn {
        flex: 0 1 auto;
        justify-content: center;
        min-width: 70px;
        padding: 0.4rem 0.6rem;
    }
    .pc-badge-wrap {
        align-items: center;
        width: 100%;
    }
    .uptime-small {
        text-align: center;
    }
    .grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .card {
        padding: 1rem;
    }
    .section-divider span {
        font-size: 0.65rem;
    }
    .activity-icon-wrap {
        width: 48px;
        height: 48px;
    }
    .activity-icon-img.roblox-thumb {
        width: 48px;
        height: 48px;
    }
    .spotify-cover {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 380px) {
    .social-btn span {
        display: none;
    }
    .social-btn {
        padding: 0.5rem;
        min-width: 40px;
    }
}

.offline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.offline-overlay.active {
    display: flex;
    opacity: 1;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.glow-text {
    font-size: 4rem;
    font-weight: 900;
    color: #fff;
    text-align: center;
    letter-spacing: -2px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
    animation: pulse-glow 2.5s ease-in-out infinite;
    padding: 2rem;
    will-change: transform, text-shadow;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1) translateZ(0);
        text-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
    }
    50% {
        transform: scale(1.03) translateZ(0);
        text-shadow: 0 0 40px rgba(239, 68, 68, 0.8), 0 0 10px rgba(255, 255, 255, 0.3);
    }
}

@media (max-width: 640px) {
    .glow-text {
        font-size: 2.2rem;
    }
}
