@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;800&display=swap');

/* === VARIÁVEIS DE TEMA === */
:root {
    --bg-color: #050505;
    --card-bg: #0f0f0f;
    --card-secondary: #111111;
    --border-color: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --accent-color: #ffffff;
    --nav-bg: rgba(15, 15, 15, 0.85);
    --glow-color: rgba(255, 255, 255, 0.3);
}

.theme-light {
    --bg-color: #f0f0f0;
    --card-bg: #ffffff;
    --card-secondary: #f9f9f9;
    --border-color: rgba(0, 0, 0, 0.1);
    --text-primary: #111111;
    --text-secondary: #666666;
    --accent-color: #000000;
    --nav-bg: rgba(255, 255, 255, 0.9);
    --glow-color: rgba(0, 0, 0, 0.2);
}

.theme-red { 
    --accent-color: #ff3333; 
    --glow-color: rgba(255, 51, 51, 0.5);
}

/* === NOVO TEMA RGB === */
@keyframes rgb-text-anim {
    0%   { color: #ff0000; text-shadow: 0 0 15px rgba(255,0,0,0.6); }
    33%  { color: #00ff00; text-shadow: 0 0 15px rgba(0,255,0,0.6); }
    66%  { color: #0000ff; text-shadow: 0 0 15px rgba(0,0,255,0.6); }
    100% { color: #ff0000; text-shadow: 0 0 15px rgba(255,0,0,0.6); }
}
@keyframes rgb-bg-anim {
    0%   { background: #ff0000; box-shadow: 0 0 10px rgba(255,0,0,0.5); }
    33%  { background: #00ff00; box-shadow: 0 0 10px rgba(0,255,0,0.5); }
    66%  { background: #0000ff; box-shadow: 0 0 10px rgba(0,0,255,0.5); }
    100% { background: #ff0000; box-shadow: 0 0 10px rgba(255,0,0,0.5); }
}

.theme-rgb {
    --bg-color: #050505;
    --card-bg: #0f0f0f;
    --card-secondary: #111111;
    --text-primary: #ffffff;
}
.theme-rgb .glowing-name { animation: rgb-text-anim 4s infinite linear; }
.theme-rgb .sw-btn { animation: rgb-bg-anim 4s infinite linear; color: #fff; border:none; }
.theme-rgb .nav-btn.active { animation: rgb-bg-anim 4s infinite linear; color: #fff; }

/* === GLOBAL === */
body {
    margin: 0; padding: 0; min-height: 100vh;
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    background-size: cover; background-position: center; background-attachment: fixed;
    color: var(--text-primary);
    display: flex; justify-content: center;
    padding-bottom: 100px;
    box-sizing: border-box;
    cursor: url('src/cursor.cur'), auto !important;
}

a, button, input[type="range"] { cursor: url('src/cursor.cur'), pointer !important; }

#particles-js { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }

#click-to-enter { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(10px); z-index: 9999; display: flex; justify-content: center; align-items: center; font-size: 20px; font-weight: 600; color: white; transition: 0.8s; }

/* === ESTRUTURA GERAL === */
.app-container {
    width: 100%; max-width: 900px;
    padding: 40px 20px; box-sizing: border-box;
}

.page { display: none; animation: fadeIn 0.4s ease forwards; }
.page.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title { font-size: 24px; font-weight: 800; text-align: center; margin-bottom: 30px; color: var(--text-primary); }

/* === CARD PRINCIPAL === */
.profile-card-advanced { position: relative; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 20px; width: 100%; max-width: 500px; margin: 0 auto 30px auto; }
.profile-banner { width: 100%; height: 120px; background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, var(--card-bg) 100%); border-radius: 20px 20px 0 0; }
.profile-content { padding: 0 30px 30px 30px; display: flex; flex-direction: column; align-items: center; margin-top: -50px; }
.avatar-wrapper-tilt { width: 100px; height: 100px; border-radius: 25px; transform: rotate(5deg); overflow: hidden; box-shadow: 0 10px 20px rgba(0,0,0,0.5); border: 3px solid rgba(255,255,255,0.1); margin-bottom: 15px; }
.avatar-wrapper-tilt img { width: 100%; height: 100%; object-fit: cover; }
.name-badge-row { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }

.glowing-name { font-family: 'Poppins', sans-serif; font-size: 28px; font-weight: 800; margin: 0; color: var(--text-primary); text-shadow: 0 0 15px var(--glow-color); }
.tag-username { color: var(--text-secondary); font-size: 13px; margin: 0 0 15px 0; }
.social-links-mini { display: flex; gap: 15px; margin-bottom: 20px; }
.social-links-mini a { color: var(--text-primary); font-size: 20px; text-decoration: none; transition: 0.2s; }
.social-links-mini a:hover { color: var(--accent-color); transform: translateY(-2px); }
.badges { display: flex; gap: 8px; }
.badges img { width: 22px; height: 22px; }

.decoration { position: absolute !important; width: 50px !important; height: auto !important; z-index: 20; pointer-events: none; }
.dec-top-left { top: -20px; left: -20px; transform: rotate(-15deg); }
.dec-top-right { top: -20px; right: -20px; transform: rotate(15deg); }

.mini-discord-card { display: flex; align-items: center; gap: 12px; background: var(--card-secondary); border: 1px solid var(--border-color); border-radius: 15px; padding: 12px 20px; width: 100%; box-sizing: border-box; text-decoration: none; color: var(--text-primary); transition: 0.2s; position: relative; }
.mini-discord-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.2); }
.mini-avatar-container { position: relative; width: 40px; height: 40px; }
.mini-avatar-container img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.status-dot-small { position: absolute; bottom: 0px; right: 0px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--card-secondary); }
.mini-info h4 { margin: 0 0 2px 0; font-size: 14px; font-weight: 600; }
.mini-info p { margin: 0; font-size: 12px; color: var(--text-secondary); }
.discord-logo-right { position: absolute; right: 20px; top: 15px; color: var(--text-secondary); font-size: 16px; }

/* === GRID INFERIOR === */
.home-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; width: 100%; max-width: 800px; margin: 0 auto; }
.servers-column { display: flex; flex-direction: column; gap: 15px; }
.server-widget-small { background: var(--card-secondary); border: 1px solid var(--border-color); border-radius: 15px; padding: 15px; display: flex; align-items: center; gap: 15px; position: relative; }
.sw-icon { width: 45px; height: 45px; border-radius: 12px; object-fit: cover; background: transparent; }
.sw-info h4 { margin: 0 0 5px 0; font-size: 14px; color: var(--text-primary); }
.sw-stats { font-size: 11px; display: flex; gap: 10px; margin: 0 0 8px 0; }
.sw-online { color: var(--text-primary); font-weight: 600; }
.sw-online::before { content:''; display:inline-block; width:6px; height:6px; background:#23a559; border-radius:50%; margin-right:4px;}
.sw-total { color: var(--text-secondary); }
.sw-total::before { content:''; display:inline-block; width:6px; height:6px; background:#555; border-radius:50%; margin-right:4px;}
.sw-btn { background: #23a559; color: white; text-decoration: none; padding: 4px 12px; border-radius: 8px; font-size: 11px; font-weight: bold; transition: 0.3s;}
.sw-discord-icon { position: absolute; right: 15px; top: 15px; color: var(--text-secondary); font-size: 14px; }

.spotify-player { background: var(--card-secondary); border: 1px solid var(--border-color); border-radius: 15px; padding: 20px; height: 100%; box-sizing: border-box; }
.sp-header { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.sp-cover { width: 55px; height: 55px; border-radius: 8px; }
.sp-info { flex: 1; }
.sp-info h4 { margin: 0 0 2px 0; font-size: 14px; }
.sp-info p { margin: 0; font-size: 12px; color: var(--text-secondary); }
.sp-progress-container { margin-top: 5px; }
.sp-times { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-secondary); margin-bottom: 3px; }
.sp-range { width: 100%; height: 4px; accent-color: var(--accent-color); background: #333; outline: none; }
.sp-controls { display: flex; align-items: center; gap: 10px; }
.sp-controls button { background: none; border: none; color: var(--text-secondary); font-size: 14px; transition: 0.2s; }
.sp-controls button:hover { color: var(--text-primary); }
.sp-controls .sp-play { background: var(--text-primary); color: var(--bg-color); width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.sp-lyrics { padding-left: 5px; border-left: 3px solid var(--border-color); }
.lyric-line { font-size: 18px; font-weight: 800; margin: 5px 0; transition: 0.3s; }
.lyric-line.active { color: var(--text-primary); }
.lyric-line.blur { color: var(--text-secondary); filter: blur(1px); opacity: 0.5; }

/* --- DEVICE DASHBOARD STYLES --- */
.device-header-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 30px; }
.device-title { font-size: 32px; font-weight: 800; margin: 0; }
.device-subtitle { color: var(--text-secondary); font-size: 14px; }
.live-clock-badge { background: rgba(255,255,255,0.05); padding: 8px 15px; border-radius: 20px; display: flex; align-items: center; gap: 10px; font-family: monospace; border: 1px solid var(--border-color); }

.device-main-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 30px; align-items: center; }

.device-mockup-container { background: rgba(255,255,255,0.05); border-radius: 30px; padding: 40px; display: flex; justify-content: center; }
.mockup-screen img { width: 100%; max-width: 220px; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5)); }

.device-stats-grid { display: flex; flex-direction: column; gap: 15px; }
.stats-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.stat-card { background: #0f0f0f; border: 1px solid var(--border-color); border-radius: 16px; padding: 15px; display: flex; flex-direction: column; justify-content: space-between; transition: 0.3s; }
.stat-card:hover { border-color: rgba(255,255,255,0.1); transform: translateY(-2px); }
.stat-card.full-width { grid-column: span 2; }

.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.card-value { font-size: 18px; font-weight: 800; }
.card-label { font-size: 12px; color: var(--text-secondary); }

/* Barras de Progresso */
.card-bar-bg { width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 10px; margin-bottom: 8px; overflow: hidden; }
.card-bar-fill { height: 100%; border-radius: 10px; transition: 0.5s ease; }

/* Cores do Dashboard */
.color-green { color: #2ecc71; } .bg-green { background: #2ecc71; }
.color-orange { color: #e67e22; } .bg-orange { background: #e67e22; }
.color-yellow { color: #f1c40f; } .bg-yellow { background: #f1c40f; }
.color-blue { color: #3498db; } .bg-blue { background: #3498db; }
.color-purple { color: #9b59b6; } .bg-purple { background: #9b59b6; }

/* Accordion Specs */
.specs-accordion { margin-top: 30px; background: #0f0f0f; border: 1px solid var(--border-color); border-radius: 16px; overflow: hidden; }
.accordion-header { width: 100%; padding: 15px 20px; background: none; border: none; color: white; display: flex; justify-content: space-between; cursor: pointer; font-weight: 600; font-family: inherit; }
.accordion-content { max-height: 0; overflow: hidden; transition: 0.4s ease-out; padding: 0 20px; }
.accordion-content.show { max-height: 500px; padding: 20px; border-top: 1px solid var(--border-color); }
.specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; font-size: 13px; color: var(--text-secondary); }
.spec-item h5 { color: white; margin: 0 0 8px 0; display: flex; align-items: center; gap: 8px; }

/* === PÁGINA DE AMIGOS (CONEXÕES) === */
.friends-grid {
    display: flex;
    flex-direction: column; /* Transforma a grade em uma lista de cards maiores */
    gap: 15px;
    padding-top: 10px;
}

.friend-card {
    background: var(--card-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: 0.3s;
    position: relative;
}

.friend-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.friend-avatar-wrapper {
    position: relative;
    width: 55px; /* Avatar maior */
    height: 55px;
    flex-shrink: 0;
}

.friend-avatar-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.friend-status {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid var(--card-secondary);
}

.friend-info {
    display: flex;
    flex-direction: column;
    flex: 1; /* Empurra o ícone do Discord para o final */
    overflow: hidden;
}

.friend-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.friend-name-row h4 {
    color: var(--text-primary);
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
}

.friend-name-row span {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 400;
}

.friend-status-text {
    color: var(--text-secondary);
    font-size: 13px;
    margin: 0 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-badges {
    display: flex;
    gap: 5px;
}

.friend-badges img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.friend-discord-icon {
    color: var(--text-secondary);
    font-size: 24px;
    opacity: 0.4;
    transition: 0.3s;
}

.friend-card:hover .friend-discord-icon {
    opacity: 1;
    color: var(--text-primary);
}
/* === BARRA INFERIOR EXATA DA PRINT === */
.bottom-nav {
    position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%);
    background: #111111; 
    border: 1px solid rgba(255,255,255,0.05); border-radius: 35px;
    display: flex; align-items: center; padding: 6px 10px; gap: 5px; z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}
.nav-divider { width: 1px; height: 24px; background: rgba(255,255,255,0.1); margin: 0 5px; }
.nav-btn {
    background: transparent; border: none; color: #888888;
    font-size: 18px; width: 44px; height: 44px; border-radius: 16px; 
    transition: 0.3s; position: relative; display: flex; justify-content: center; align-items: center;
}
.nav-btn:hover { color: #ffffff; background: rgba(255,255,255,0.05); }

/* Item Ativo com a "bolinha" embaixo */
.nav-btn.active { color: #ffffff; background: #222222; }
.nav-btn.active::after {
    content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
    width: 4px; height: 4px; background-color: #ffffff; border-radius: 50%;
}

.theme-menu-container { position: relative; }
.theme-dropdown {
    position: absolute; bottom: 65px; right: 0;
    background: #111111; border: 1px solid rgba(255,255,255,0.1); border-radius: 16px;
    display: none; flex-direction: column; padding: 8px; min-width: 140px; box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}
.theme-dropdown.show { display: flex; }
.theme-dropdown button { background: transparent; border: none; color: #ffffff; padding: 10px; cursor: pointer; text-align: left; border-radius: 8px; font-family: inherit; font-size: 14px; }
.theme-dropdown button:hover { background: rgba(255,255,255,0.1); }

/* === NOVO IRAME 3D WRAPPER === */
.iframe-3d-wrapper {
    width: 100%;
    height: 400px; 
    border-radius: 20px;
    overflow: hidden;
    background: transparent;
}

.iframe-3d-wrapper iframe {
    width: 100%;
    height: 100%;
}

@media (max-width: 800px) { .home-grid { grid-template-columns: 1fr; } .device-dashboard { flex-direction: column; } .device-visual { width: 100%; box-sizing: border-box; } }