/* ========================================================
   davixy.space - ULTRA CLEAN, DISCORD REAL & BOSQUE RELAJANTE
   ======================================================== */

:root {
    --bg-dark: #060907;
    --card-bg: rgba(13, 17, 14, 0.78);
    --card-border: rgba(255, 255, 255, 0.1);
    --card-glow: rgba(52, 211, 153, 0.22);
    --accent-primary: #34d399;
    --accent-secondary: #38bdf8;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.78);
    --text-muted: rgba(255, 255, 255, 0.45);
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-brand: 'Syne', sans-serif;
    --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    user-select: none;
}

/* ========================================================
   PANTALLA DE ENTRADA (CLICK TO ENTER)
   ======================================================== */
.enter-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: radial-gradient(circle at center, rgba(10, 16, 12, 0.96) 0%, rgba(4, 7, 5, 0.98) 100%);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
}

.enter-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.enter-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.enter-orbit {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 1px dashed rgba(52, 211, 153, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: spinOrbit 14s linear infinite;
}

.enter-planet {
    font-size: 2.2rem;
    filter: drop-shadow(0 0 16px rgba(52, 211, 153, 0.6));
}

@keyframes spinOrbit {
    100% { transform: rotate(360deg); }
}

.enter-brand {
    font-family: var(--font-brand);
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 40%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 25px rgba(52, 211, 153, 0.5);
}

.enter-prompt {
    font-family: var(--font-mono);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 2.5px;
    color: var(--text-primary);
    text-transform: uppercase;
    animation: pulsePrompt 2.2s infinite ease-in-out;
}

@keyframes pulsePrompt {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.03); text-shadow: 0 0 18px var(--accent-primary); }
}

/* ========================================================
   FONDO REAL DE BOSQUE (VIDEO MP4 SIN IA)
   ======================================================== */
.background-container {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
}

.bg-media-container {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
}

.bg-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.38) saturate(1.15);
}

.bg-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 30%, rgba(4, 7, 5, 0.94) 100%);
    pointer-events: none;
}

.bg-forest-fog {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 25%, rgba(52, 211, 153, 0.1) 0%, transparent 65%);
    pointer-events: none;
}

#particles-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.crt-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.25) 50%
    );
    background-size: 100% 3px;
    opacity: 0.65;
}

.cursor-glow {
    position: fixed;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--card-glow), transparent 70%);
    pointer-events: none;
    z-index: -1;
    transform: translate(-50%, -50%);
}

.click-spark {
    position: fixed;
    pointer-events: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
    z-index: 99999;
    animation: sparkFly 0.6s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes sparkFly {
    0% { transform: scale(1) translate(0, 0); opacity: 1; }
    100% { transform: scale(0) translate(var(--tx), var(--ty)); opacity: 0; }
}

/* ========================================================
   BARRA SUPERIOR (davixy.space & Selector de Efectos)
   ======================================================== */
.top-nav {
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 28px;
    z-index: 100;
}

.domain-pill {
    background: rgba(14, 18, 15, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 8px 16px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: var(--transition-smooth);
}

.domain-pill:hover {
    color: #fff;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--card-glow);
}

.domain-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.copy-icon {
    opacity: 0.6;
}

.theme-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(14, 18, 15, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    padding: 6px 10px;
    border-radius: 30px;
}

.nature-effect-btn {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}

.nature-effect-btn:hover {
    transform: scale(1.25);
}

.nature-effect-btn.active {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 8px var(--accent-primary);
}

/* ========================================================
   CONTROL DISCRETO DE AUDIO FLOTANTE
   ======================================================== */
.ambient-music-pill {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 500;
}

.btn-ambient-sound {
    background: rgba(14, 18, 15, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 8px 14px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-family: var(--font-mono);
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: var(--transition-smooth);
}

.btn-ambient-sound:hover {
    color: #fff;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.sound-wave-icon {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}

.sound-wave-icon .s-bar {
    width: 2px;
    height: 4px;
    background: var(--accent-primary);
    border-radius: 1px;
}

.music-playing .sound-wave-icon .s-1 { animation: eqMini 0.7s infinite alternate; }
.music-playing .sound-wave-icon .s-2 { animation: eqMini 0.5s infinite alternate 0.2s; }
.music-playing .sound-wave-icon .s-3 { animation: eqMini 0.8s infinite alternate 0.4s; }

@keyframes eqMini {
    0% { height: 3px; }
    100% { height: 12px; }
}

/* ========================================================
   TARJETA PRINCIPAL (ULTRA CLEAN & MINIMALIST)
   ======================================================== */
.main-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 85px 16px 40px;
    perspective: 1200px;
}

.profile-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-radius: 30px;
    padding: 34px 26px 26px;
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.8),
                0 0 50px var(--card-glow);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transform-style: preserve-3d;
    transition: transform 0.2s cubic-bezier(0.2, 0, 0.2, 1), box-shadow 0.3s ease;
    overflow: hidden;
}

.card-glare {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(circle at var(--glare-x, 50%) var(--glare-y, 50%), rgba(255, 255, 255, 0.12) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.profile-card:hover .card-glare {
    opacity: 1;
}

/* Avatar y Estado de Discord Real */
.avatar-wrapper {
    position: relative;
    margin-bottom: 16px;
    transform: translateZ(35px);
}

.avatar-ring {
    position: relative;
    width: 115px;
    height: 115px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, var(--accent-primary), #059669, #0284c7);
    box-shadow: 0 0 30px var(--card-glow);
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #0e120f;
    display: block;
}

.status-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3.5px solid #0f1410;
    transition: background-color 0.3s;
}

.status-indicator.online { background-color: #23a55a; }
.status-indicator.idle   { background-color: #f0b232; }
.status-indicator.dnd    { background-color: #f23f43; }
.status-indicator.offline{ background-color: #80848e; }

.status-indicator.online::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid #23a55a;
    animation: pulseDot 2s infinite ease-out;
}

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

/* Cabecera */
.profile-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transform: translateZ(30px);
}

.name-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.profile-name {
    font-family: var(--font-brand);
    font-size: 2.15rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(180deg, #ffffff 40%, rgba(255, 255, 255, 0.75) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge-verified {
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    filter: drop-shadow(0 0 10px var(--accent-primary));
}

.alias-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 95%;
}

.alias-pill span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bio-container {
    max-width: 90%;
    margin-top: 2px;
}

.profile-bio {
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-secondary);
    font-style: italic;
}

/* ========================================================
   DISCORD RICH PRESENCE EN VIVO
   ======================================================== */
.discord-presence-card {
    width: 100%;
    margin-top: 18px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(88, 101, 242, 0.35);
    border-radius: 18px;
    padding: 12px 14px;
    transform: translateZ(35px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);
    transition: var(--transition-smooth);
}

.discord-presence-card:hover {
    border-color: rgba(88, 101, 242, 0.65);
    box-shadow: 0 10px 30px rgba(88, 101, 242, 0.28);
}

.presence-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.presence-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-family: var(--font-mono);
    font-weight: 700;
    color: #5865F2;
    letter-spacing: 0.5px;
}

.live-pulse {
    font-size: 0.62rem;
    font-family: var(--font-mono);
    font-weight: 800;
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    padding: 2px 7px;
    border-radius: 10px;
    animation: livePulse 1.8s infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
}

.presence-body {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.presence-icon-wrapper {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.activity-icon {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
    background: #18191c;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.activity-small-icon {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #000;
    background-size: cover;
    background-position: center;
}

.presence-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.activity-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-details, .activity-state {
    font-size: 0.74rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-timer {
    font-size: 0.68rem;
    font-family: var(--font-mono);
    color: var(--accent-primary);
    margin-top: 2px;
}

/* ========================================================
   REDES SOCIALES
   ======================================================== */
.socials-section {
    width: 100%;
    margin-top: 18px;
    transform: translateZ(35px);
}

.socials-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.social-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.social-btn:hover {
    color: #fff;
    transform: translateY(-4px) scale(1.08);
}

.social-btn.discord:hover {
    background: rgba(88, 101, 242, 0.22);
    border-color: #5865F2;
    color: #5865F2;
    box-shadow: 0 0 18px rgba(88, 101, 242, 0.45);
}

.social-btn.spotify:hover {
    background: rgba(29, 185, 84, 0.22);
    border-color: #1DB954;
    color: #1DB954;
    box-shadow: 0 0 18px rgba(29, 185, 84, 0.45);
}

.social-btn.github:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: #fff;
    color: #fff;
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.45);
}

.social-btn.instagram:hover {
    background: rgba(225, 48, 108, 0.22);
    border-color: #E1306C;
    color: #E1306C;
    box-shadow: 0 0 18px rgba(225, 48, 108, 0.45);
}

/* Footer */
.card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    margin-top: 20px;
    transform: translateZ(25px);
}

.footer-tag {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-tag:hover {
    color: var(--accent-primary);
}

/* Botón Ajustes */
.btn-settings-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(16, 22, 17, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    transition: var(--transition-smooth);
    z-index: 500;
}

.btn-settings-toggle:hover {
    background: var(--accent-primary);
    color: #060907;
    transform: scale(1.1);
}

.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-30px);
    background: rgba(14, 20, 16, 0.96);
    border: 1px solid var(--accent-primary);
    color: #fff;
    padding: 12px 26px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 99999;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Modal */
.settings-modal {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.settings-modal.active {
    opacity: 1;
    visibility: visible;
}

.settings-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
}

.settings-content {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: rgba(14, 20, 16, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input, .form-group textarea {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 14px;
    color: #fff;
    outline: none;
    font-family: inherit;
    font-size: 0.85rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), #059669);
    border: none;
    color: #060907;
    padding: 10px 22px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 480px) {
    .top-nav { padding: 0 16px; }
    .profile-card { padding: 26px 18px 22px; border-radius: 24px; }
    .profile-name { font-size: 1.8rem; }
    .ambient-music-pill { bottom: 16px; left: 16px; }
    .btn-settings-toggle { bottom: 16px; right: 16px; }
}
