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

:root {
    --font-primary: 'Outfit', 'Inter', -apple-system, sans-serif;
    
    /* Base theme colors */
    --bg-dark: #07070c;
    --bg-darker: #030306;
    --text-main: #ffffff;
    --text-muted: #8b8b9f;
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-hover: rgba(255, 255, 255, 0.06);
    
    /* Platform colors */
    --c-telegram: #0088cc;
    --c-steam: #2a475e;
    --c-osu: #ff66aa;
    --c-endfield: #ff8800;
    --c-tracker: #ff4655;
    --c-spotify: #1db954;
    --c-zzz: #ffd700;
    --c-hsr: #00bfff;
    --c-genshin: #4ae8c8;
    --c-discord: #5865f2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-primary);
}

body {
    min-height: 100vh;
    background-color: var(--bg-darker);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    overflow-x: hidden;
    position: relative;
}

/* Background canvas and ambient light glow */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.ambient-glow {
    position: fixed;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(114, 46, 209, 0.07) 0%, rgba(0, 0, 0, 0) 70%);
    top: 10%;
    left: 20%;
    z-index: 0;
    pointer-events: none;
    filter: blur(80px);
    border-radius: 50%;
}

/* Container */
.container {
    max-width: 1000px;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 32px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    padding: 60px 40px;
    z-index: 10;
    position: relative;
    overflow: hidden;
}

/* Header */
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 50px;
    position: relative;
}

.avatar-wrapper {
    position: relative;
    margin-bottom: 24px;
}

.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    padding: 6px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 2;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}


.status-dot {
    position: absolute;
    z-index: 3;
}

.avatar-wrapper .status-dot {
    bottom: 5px;
    right: 5px;
    width: 32px;
    height: 32px;
}

.widget-avatar .status-dot {
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
}

/* Solid status circle */
.status-dot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background-color: var(--status-color, #23a55a);
    border: 4.5px solid #030306;
    box-shadow: 0 0 10px var(--status-color, rgba(35, 165, 90, 0.4));
    z-index: 2; /* On top of the pulse wave */
}

.widget-avatar .status-dot::before {
    border-width: 2.5px;
}


/* Pulse wave circle */
.status-dot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background-color: var(--status-color, #23a55a);
    opacity: 0;
    z-index: 1; /* Under the solid circle */
}

.status-dot:not(.status-offline)::after {
    animation: statusPulse 2s cubic-bezier(0.25, 0, 0, 1) infinite;
}

@keyframes statusPulse {
    0% { transform: scale(1); opacity: 0.75; }
    100% { transform: scale(2.2); opacity: 0; }
}


h1 {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 30%, #b3a4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(179, 164, 255, 0.1);
}

.subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

/* Local Time Widget */
.time-widget {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.time-widget i {
    color: #b3a4ff;
}

/* Category Filters */
.filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    background: rgba(0, 0, 0, 0.15);
    padding: 6px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.filter-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.filter-btn.active {
    color: #030306;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.15);
}

/* Grid Layout */
.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* Card Styling */
.platform-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 26px;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.platform-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255, 255, 255, 0.04), transparent 40%);
    z-index: 1;
    pointer-events: none;
}

.platform-card:hover {
    transform: translateY(-6px);
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.15);
}

.custom-icon {
    height: 52px;
    width: auto;
    margin-bottom: 18px;
    z-index: 2;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.platform-card:hover .custom-icon {
    transform: scale(1.12);
}

.platform-name {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
    z-index: 2;
}

.badge-wrapper {
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
}

.platform-username {
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.35);
    padding: 6px 14px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.platform-username i {
    font-size: 0.75rem;
    opacity: 0.5;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.platform-username:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.15);
}

.platform-username:hover i {
    opacity: 1;
    transform: scale(1.1);
}

/* Specific glows */
.platform-card:hover.telegram { box-shadow: 0 15px 30px rgba(0, 136, 204, 0.18), inset 0 0 15px rgba(0, 136, 204, 0.08); border-color: rgba(0, 136, 204, 0.4); }
.platform-card:hover.steam { box-shadow: 0 15px 30px rgba(42, 71, 94, 0.22), inset 0 0 15px rgba(42, 71, 94, 0.1); border-color: rgba(102, 192, 244, 0.4); }
.platform-card:hover.osu { box-shadow: 0 15px 30px rgba(255, 102, 170, 0.2), inset 0 0 15px rgba(255, 102, 170, 0.1); border-color: rgba(255, 102, 170, 0.4); }
.platform-card:hover.endfield { box-shadow: 0 15px 30px rgba(255, 136, 0, 0.18), inset 0 0 15px rgba(255, 136, 0, 0.08); border-color: rgba(255, 136, 0, 0.4); }
.platform-card:hover.tracker { box-shadow: 0 15px 30px rgba(255, 70, 85, 0.18), inset 0 0 15px rgba(255, 70, 85, 0.08); border-color: rgba(255, 70, 85, 0.4); }
.platform-card:hover.spotify { box-shadow: 0 15px 30px rgba(29, 185, 84, 0.18), inset 0 0 15px rgba(29, 185, 84, 0.08); border-color: rgba(29, 185, 84, 0.4); }
.platform-card:hover.zzz { box-shadow: 0 15px 30px rgba(255, 215, 0, 0.15), inset 0 0 15px rgba(255, 215, 0, 0.08); border-color: rgba(255, 215, 0, 0.4); }
.platform-card:hover.hsr { box-shadow: 0 15px 30px rgba(0, 191, 255, 0.18), inset 0 0 15px rgba(0, 191, 255, 0.08); border-color: rgba(0, 191, 255, 0.4); }
.platform-card:hover.genshin { box-shadow: 0 15px 30px rgba(74, 232, 200, 0.18), inset 0 0 15px rgba(74, 232, 200, 0.08); border-color: rgba(74, 232, 200, 0.4); }

/* Custom Row Widgets (Discord & Spotify) */
.widgets-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.widget {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none;
    color: inherit;
}


/* Discord Widget Specific */
.discord-widget:hover {
    border-color: rgba(88, 101, 242, 0.4);
    box-shadow: 0 15px 30px rgba(88, 101, 242, 0.15);
    background: rgba(88, 101, 242, 0.02);
}

.discord-logo-bg {
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 8rem;
    color: rgba(88, 101, 242, 0.04);
    pointer-events: none;
    transform: rotate(-15deg);
    transition: all 0.4s ease;
}

.discord-widget:hover .discord-logo-bg {
    color: rgba(88, 101, 242, 0.07);
    transform: rotate(-10deg) scale(1.05);
}

.widget-content {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    z-index: 2;
}

.widget-avatar {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.08);
}

.widget-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.widget-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.widget-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.widget-title {
    font-size: 1.15rem;
    font-weight: 700;
}

.widget-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.widget-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.widget-btn:hover {
    background: #ffffff;
    color: #030306;
    transform: scale(1.08);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* Spotify Widget Specific */
.spotify-widget:hover {
    border-color: rgba(29, 185, 84, 0.4);
    box-shadow: 0 15px 30px rgba(29, 185, 84, 0.15);
    background: rgba(29, 185, 84, 0.02);
}

.spotify-logo-bg {
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 8rem;
    color: rgba(29, 185, 84, 0.04);
    pointer-events: none;
    transform: rotate(-15deg);
    transition: all 0.4s ease;
}

.spotify-widget:hover .spotify-logo-bg {
    color: rgba(29, 185, 84, 0.07);
    transform: rotate(-10deg) scale(1.05);
}

.spotify-album-art {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    position: relative;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.spotify-album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Animated Sound Wave Visualizer */
.waveform {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 16px;
    width: 24px;
}

.wave-bar {
    width: 3px;
    height: 2px;
    background-color: var(--c-spotify);
    border-radius: 10px;
    animation: waveBounce 0.8s ease infinite alternate;
}

.wave-bar:nth-child(2) { animation-delay: 0.15s; animation-duration: 0.7s; }
.wave-bar:nth-child(3) { animation-delay: 0.3s; animation-duration: 0.9s; }
.wave-bar:nth-child(4) { animation-delay: 0.05s; animation-duration: 0.6s; }

@keyframes waveBounce {
    0% { height: 3px; }
    100% { height: 16px; }
}

/* Toast Notification styling */
.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translate(-50%, 100px);
    opacity: 0;
    background: rgba(18, 18, 30, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 0.92rem;
    font-weight: 600;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    z-index: 10000;
    pointer-events: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast i {
    color: #4ae8c8;
}

.toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

/* Footer styling */
.footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

.footer b {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-left: 4px;
    font-weight: 600;
}

/* Card Sorting animation helper classes */
.card-hidden {
    opacity: 0 !important;
    transform: scale(0.8) translateY(20px) !important;
    pointer-events: none !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden !important;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
    .widgets-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 40px 24px;
        border-radius: 24px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .platforms-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 480px) {
    .platforms-grid {
        grid-template-columns: 1fr;
    }
    
    .filters {
        width: 100%;
        justify-content: space-around;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        flex-grow: 1;
    }
}

/* Rank / Statistic Badges */
.platform-rank {
    font-size: 0.82rem;
    font-weight: 600;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px 12px;
    border-radius: 50px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.platform-card.osu .platform-rank { 
    background: rgba(255, 102, 170, 0.15); 
    border-color: rgba(255, 102, 170, 0.3); 
    color: #ff99cc; 
}
.platform-card.tracker .platform-rank { 
    background: rgba(255, 70, 85, 0.15); 
    border-color: rgba(255, 70, 85, 0.3); 
    color: #ff707b; 
}
.platform-card.genshin .platform-rank { 
    background: rgba(74, 232, 200, 0.15); 
    border-color: rgba(74, 232, 200, 0.3); 
    color: #7bf2d5; 
}
.platform-card.hsr .platform-rank { 
    background: rgba(0, 191, 255, 0.15); 
    border-color: rgba(0, 191, 255, 0.3); 
    color: #5cd6ff; 
}
.platform-card.zzz .platform-rank { 
    background: rgba(255, 215, 0, 0.12); 
    border-color: rgba(255, 215, 0, 0.25); 
    color: #ffe34d; 
}
.platform-card.endfield .platform-rank { 
    background: rgba(255, 136, 0, 0.15); 
    border-color: rgba(255, 136, 0, 0.3); 
    color: #ffaa4d; 
}

.platform-card:hover .platform-rank {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.18);
}

.platform-card:hover.osu .platform-rank { background: rgba(255, 102, 170, 0.25); border-color: rgba(255, 102, 170, 0.5); }
.platform-card:hover.tracker .platform-rank { background: rgba(255, 70, 85, 0.25); border-color: rgba(255, 70, 85, 0.5); }
.platform-card:hover.genshin .platform-rank { background: rgba(74, 232, 200, 0.25); border-color: rgba(74, 232, 200, 0.5); }
.platform-card:hover.hsr .platform-rank { background: rgba(0, 191, 255, 0.25); border-color: rgba(0, 191, 255, 0.5); }
.platform-card:hover.zzz .platform-rank { background: rgba(255, 215, 0, 0.2); border-color: rgba(255, 215, 0, 0.4); }
.platform-card:hover.endfield .platform-rank { background: rgba(255, 136, 0, 0.25); border-color: rgba(255, 136, 0, 0.5); }

