:root {
    --accent: #a55fff;
    --accent-glow: rgba(165, 95, 255, 0.3);
    --bg: #0a0a0a;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', system-ui, sans-serif; }

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

.bg-glow { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; transition: background 0.15s ease-out; }

.container { max-width: 750px; width: 100%; z-index: 1; }

/* Стили главного контейнера изменены для мгновенного отображения */
.container.active { opacity: 1; visibility: visible; transform: translateY(0); }

#page-content { transition: opacity 0.4s ease; }
.stagger-item { 
    opacity: 0; 
    transform: translateY(10px); 
    transition: opacity 0.3s ease-out, transform 0.3s ease-out; 
    will-change: transform, opacity;
}
.appear .stagger-item { opacity: 1; transform: translateY(0); }
.fade-out .stagger-item { opacity: 0; transform: translateY(-20px); }

header { text-align: center; margin-bottom: 30px; }
.avatar { width: 100px; height: 100px; border-radius: 50%; border: 2px solid var(--glass-border); margin-bottom: 15px; transition: 0.3s; }
.avatar:hover { transform: scale(1.1) rotate(3deg); border-color: var(--accent); }
.nickname { font-size: 2rem; font-weight: 700; margin-bottom: 5px; }
.bio { color: var(--text-dim); font-size: 1rem; line-height: 1.5; }

.section-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; color: var(--accent); margin: 40px 0 15px 10px; opacity: 0.8; }

.bento-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.bento-item { 
    background: var(--glass); border: 1px solid var(--glass-border); padding: 20px; border-radius: 24px; 
    text-decoration: none; color: white; backdrop-filter: blur(12px); 
    transition: all 0.3s ease !important; display: flex; flex-direction: column; gap: 10px; 
}
.bento-item:hover { border-color: var(--accent); background: rgba(255,255,255,0.06); transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 0 15px var(--accent-glow); }
.bento-item.wide { grid-column: span 2; }
.bento-item.featured { border-color: rgba(165, 95, 255, 0.4); background: linear-gradient(145deg, rgba(165, 95, 255, 0.05), transparent); }

.bento-item i { font-size: 1.4rem; color: var(--accent); }
.bento-item span { font-weight: 600; font-size: 1.05rem; }
.bento-item p { font-size: 0.85rem; color: var(--text-dim); }

.social-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 25px 0 40px; }
.social-link { width: 45px; height: 45px; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: white; text-decoration: none; transition: 0.3s; }
.social-link:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }

.mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.mini-item { background: var(--glass); border: 1px solid var(--glass-border); padding: 12px; border-radius: 15px; text-decoration: none; color: var(--text-dim); font-size: 0.85rem; text-align: center; transition: 0.3s; }
.mini-item:hover { border-color: var(--accent); color: white; }

.status-container { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 10px rgba(0,0,0,0.5); }
#status-text { font-size: 0.9rem; color: var(--text-dim); }

.storage-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; text-align: left; }
.storage-sub { font-size: 0.85rem; color: #ccc; display: flex; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 4px; }
.storage-sub span { color: var(--accent); font-weight: 500; }
.back-btn { text-decoration: none; color: var(--text-dim); display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px; transition: 0.3s; }
.back-btn:hover { color: var(--accent); }

footer { text-align: center; margin-top: 60px; color: var(--text-dim); font-size: 0.85rem; opacity: 0.6; }

#constellationCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2; 
    pointer-events: none; 
    opacity: 0.15; 
    filter: blur(0.5px); 
}

/* Новые стили для Discord RPC Карточки */
.status-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.discord-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 400px;
    width: 100%;
    text-align: left;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.discord-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 15px var(--accent-glow);
}

.card-avatar-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-image {
    width: 65px;
    height: 65px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid var(--glass-border);
    background-color: rgba(0,0,0,0.2);
}

.discord-card .status-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border: 2.5px solid #0b0b0b; /* В цвет темного бэкграунда */
    border-radius: 50%;
}

.card-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
    overflow: hidden;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.card-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
}

#status-text {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.card-details {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-state {
    font-size: 0.85rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

/* Прогресс бар */
.card-progress-wrap {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    width: 0%;
    transition: width 1s linear;
}

.progress-time {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.hidden {
    display: none !important;
}

@media (max-width: 550px) { .bento-grid { grid-template-columns: 1fr; } .bento-item.wide { grid-column: span 1; } }