:root {
    color-scheme: dark;
    --bg-color: #050505;
    --text-color: #c4c4c4;
    --blur-text-color: #a3a3a3;
    --text-glow: #ffffff;
    --border-color: rgba(255, 255, 255, 0.16);
    --glass-bg: rgba(10, 10, 10, 0.4);
    --glass-border: rgba(255, 255, 255, 0.14);
    --accent: #a3a3a3;
    --font-main: 'Courier Prime', monospace;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Film Grain Overlay */
#grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
}

/* Rain / Stars background container */
#rain-container,
#stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* Glassmorphism utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
}

/* Typography */
.verified-badge {
    width: 1.2rem;
    height: 1.2rem;
    margin-left: 5px;
    vertical-align: middle;
    cursor: help;
    filter: drop-shadow(0 0 5px rgba(29, 161, 242, 0.5));
}

h1,
h2,
h3 {
    font-weight: normal;
    color: var(--text-glow);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
    letter-spacing: -0.5px;
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--text-glow);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.4);
}

/* Navigation */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 1.2rem;
    color: var(--text-glow);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.logo-signature {
    margin-top: -5px;
    color: var(--blur-text-color);
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    line-height: 1.2;
    transition: opacity .25s ease, transform .25s ease;
}
.logo-signature.is-changing { opacity:0; transform:translateY(3px); }
@media (prefers-reduced-motion: reduce) {
    .logo-signature { transition:none; }
}

.status-indicator {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--accent);
}

.dot {
    width: 6px;
    height: 6px;
    background-color: #4a4a4a;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 5px #4a4a4a;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
        box-shadow: 0 0 5px #4a4a4a;
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 10px #7a7a7a;
        background-color: #7a7a7a;
    }

    100% {
        opacity: 0.5;
        box-shadow: 0 0 5px #4a4a4a;
    }
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
}

/* Main Container */
.container {
    max-width: 620px;
    margin: 0 auto;
    padding: 1.2rem 1rem 3rem 1rem;
    width: 100%;
}

.page-header {
    margin-bottom: 3rem;
    text-align: center;
    opacity: 0;
    animation: fadeInUp 1.5s ease forwards;
}

.tagline {
    font-size: 0.9rem;
    color: var(--accent);
    margin-top: 0.5rem;
}

/* Composer Section */
.composer {
    margin-bottom: 4rem;
    opacity: 0;
    animation: fadeInUp 1.5s ease 0.3s forwards;
}

textarea {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-family: var(--font-main);
    padding: 1rem;
    font-size: 1rem;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
    border-radius: 2px;
}

textarea:focus {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.03) inset;
}

.composer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

select {
    background: transparent;
    border: none;
    color: var(--accent);
    font-family: var(--font-main);
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}

select:hover {
    color: var(--text-color);
}

select option {
    background: var(--bg-color);
    color: var(--text-color);
}

.btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-family: var(--font-main);
    padding: 0.4rem 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-glow);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Entrada al espacio privado */
.guest-moon {
    position: fixed;
    top: clamp(56px, 9vh, 80px);
    left: calc(50% + 24px);
    width: clamp(10px, 1.2vw, 14px);
    aspect-ratio: 1;
    z-index: 1;
    pointer-events: none;
    transform: translateX(-50%) scaleX(-1);
    filter: drop-shadow(0 0 2px rgba(221, 232, 240, 0.4));
    animation: guest-moon-shimmer 7s ease-in-out infinite alternate;
}

.guest-moon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(140deg, #e5dfcf, #a49c86);
    -webkit-mask-image: radial-gradient(circle at 68% 32%, transparent 46%, #000 48%);
    mask-image: radial-gradient(circle at 68% 32%, transparent 46%, #000 48%);
}

@keyframes guest-moon-shimmer {
    from { opacity: 0.65; }
    to { opacity: 0.95; }
}

.guest-page {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: none;
}

.guest-container {
    max-width: none;
    height: 100%;
    min-height: 0;
    flex-shrink: 0;
    overflow: hidden;
}

.guest-gate {
    position: relative;
    isolation: isolate;
    max-width: 588px;
    margin: 0 auto;
    min-height: 70vh;
    min-height: 70svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    text-align: center;
}

.guest-gate::before {
    content: '';
    position: absolute;
    inset: 15% 0 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(ellipse closest-side at 50% 50%, rgba(190, 166, 118, 0.09), transparent 100%);
    animation: guest-aura 8s ease-in-out infinite alternate;
}

.guest-atmosphere {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.guest-atmosphere span {
    position: absolute;
    bottom: 8%;
    left: var(--particle-x);
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: #d9c8a5;
    box-shadow: 0 0 7px rgba(217, 200, 165, 0.5);
    opacity: 0;
    animation: guest-drift var(--particle-time, 12s) linear infinite;
    animation-delay: var(--particle-delay);
}

.guest-atmosphere span:nth-child(1) { --particle-x: 15%; --particle-delay: -3s; }
.guest-atmosphere span:nth-child(2) { --particle-x: 25%; --particle-delay: -9s; --particle-time: 15s; }
.guest-atmosphere span:nth-child(3) { --particle-x: 35%; --particle-delay: -5s; --particle-time: 10s; }
.guest-atmosphere span:nth-child(4) { --particle-x: 43%; --particle-delay: -12s; --particle-time: 17s; }
.guest-atmosphere span:nth-child(5) { --particle-x: 50%; --particle-delay: -7s; }
.guest-atmosphere span:nth-child(6) { --particle-x: 57%; --particle-delay: -2s; --particle-time: 14s; }
.guest-atmosphere span:nth-child(7) { --particle-x: 65%; --particle-delay: -10s; --particle-time: 16s; }
.guest-atmosphere span:nth-child(8) { --particle-x: 75%; --particle-delay: -6s; --particle-time: 11s; }
.guest-atmosphere span:nth-child(9) { --particle-x: 85%; --particle-delay: -4s; --particle-time: 18s; }
.guest-atmosphere span:nth-child(10) { --particle-x: 48%; --particle-delay: -13s; --particle-time: 19s; }

.guest-brand {
    color: var(--text-color);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
    animation: guest-arrive 1s ease both;
}

.guest-title {
    max-width: 28ch;
    font-size: clamp(1rem, 3.4vw, 1.2rem);
    line-height: 1.5;
    text-wrap: balance;
    animation: guest-arrive 1.2s 0.15s ease both;
}

.guest-description {
    max-width: 34ch;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.78rem;
    text-wrap: pretty;
    animation: guest-arrive 1.2s 0.3s ease both;
}

.guest-door-link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 2.5rem;
    outline-offset: 6px;
    animation: guest-arrive 1.5s 0.45s ease both;
}

.guest-door-link:focus-visible {
    outline: none;
}

.guest-door-link:focus-visible .guest-door-label {
    color: var(--text-glow);
    text-decoration: underline;
    text-underline-offset: 0.5em;
}

.guest-door-scene {
    position: relative;
    display: block;
    width: 112px;
    height: 205px;
    perspective: 600px;
    animation: guest-float 6s ease-in-out infinite;
}

.guest-door-frame {
    position: absolute;
    inset: 0 0 15px;
    border: 1px solid rgba(255, 244, 220, 0.25);
    background: #b6aa8e;
    perspective: 600px;
    box-shadow: 0 0 24px rgba(255, 235, 190, 0.06);
    animation: guest-frame-glow 5s ease-in-out infinite alternate;
}

.guest-door-panel {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, #101010, #070707);
    border: 1px solid #242321;
    transform-origin: left center;
    transform: rotateY(-7deg);
    transition: transform 0.8s ease, border-color 0.8s ease;
    animation: guest-door-sway 7s ease-in-out infinite;
}

.guest-door-handle {
    position: absolute;
    right: 12px;
    top: 54%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #9d9481;
    box-shadow: 0 0 6px rgba(255, 235, 190, 0.2);
}

.guest-gate .guest-door-handle {
    top: 50%;
    transform: translateY(-50%);
    background: #eee7d8;
}

.guest-door-light {
    position: absolute;
    top: 190px;
    left: 50%;
    margin-left: -50vw;
    width: 100vw;
    height: 100vh;
    height: 100svh;
    background: linear-gradient(rgba(226, 204, 156, 0.12), rgba(226, 204, 156, 0.06) 55%, rgba(226, 204, 156, 0.025));
    clip-path: polygon(
        calc(50% - 56px) 0, calc(50% + 56px) 0,
        100% min(120px, 20svh), 100% 100%,
        0 100%, 0 min(120px, 20svh)
    );
    pointer-events: none;
    transition: opacity 0.8s ease;
    opacity: 0.4;
    animation: guest-light-breathe 5s ease-in-out infinite;
}

.guest-door-label {
    position: absolute;
    top: 50%;
    left: 10px;
    right: 26px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    transform: translateY(-50%);
    color: #eee7d8;
    font-size: 0.65rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.guest-door-label::after {
    content: '→';
    display: inline-block;
    animation: guest-arrow 2s ease-in-out infinite;
}

.guest-door-link:is(:hover, :focus-visible, :active) .guest-door-panel {
    transform: rotateY(-58deg);
    border-color: #5b5549;
}

.guest-door-link:is(:hover, :focus-visible, :active) .guest-door-light {
    animation: none;
    opacity: 1;
}

@media (max-width: 600px) {
    .guest-gate .guest-door-light {
        animation: none;
    }
}

@keyframes guest-arrive {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes guest-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

@keyframes guest-door-sway {
    0%, 100% { rotate: y 0deg; }
    50% { rotate: y -12deg; }
}

@keyframes guest-frame-glow {
    from { box-shadow: 0 0 24px rgba(255, 235, 190, 0.06); }
    to { box-shadow: 0 0 45px rgba(255, 235, 190, 0.18); }
}

@keyframes guest-light-breathe {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.85; }
}

@keyframes guest-aura {
    from { opacity: 0.45; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1.06); }
}

@keyframes guest-drift {
    0% { opacity: 0; transform: translate3d(0, 0, 0); }
    20%, 70% { opacity: 0.5; }
    100% { opacity: 0; transform: translate3d(24px, -340px, 0); }
}

@keyframes guest-arrow {
    0%, 100% { opacity: 0.45; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(5px); }
}

@media (prefers-reduced-motion: reduce) {
    .guest-moon,
    .guest-gate::before,
    .guest-gate *,
    .guest-gate *::after {
        animation: none;
        transition: none;
    }

    .guest-atmosphere {
        display: none;
    }
}

/* Feed & Fragments */
.feed {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.fragment {
    padding: 1rem 1.25rem;
    border-left: 1px solid var(--border-color);
    position: relative;
    opacity: 0;
    animation: fadeIn 2s ease forwards;
    transition: all 0.5s ease;
}

.fragment:hover {
    border-left-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}

.frag-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.frag-author {
    color: var(--text-glow);
    font-size: 1rem;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: 10px;
}

.frag-author > .avatar-small {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    margin-right: 0;
    opacity: 1;
}

.frag-author-name {
    min-width: 0;
    overflow-wrap: anywhere;
}

.frag-header .verified-badge {
    width: 0.9rem;
    /* Check azul más pequeño en los posts */
    height: 0.9rem;
    margin-left: 4px;
}

.frag-time {
    color: var(--accent);
    font-size: 0.65rem;
}

.frag-content {
    font-size: 0.9rem;
    white-space: pre-wrap;
    line-height: 1.6;
}

.loading-skeleton {
    color: var(--accent);
    animation: pulse-skeleton 2s infinite ease-in-out;
}

@keyframes pulse-skeleton {
    0% {
        opacity: 0.4;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 0.4;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    color: var(--text-glow);
    font-size: 0.9rem;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.blur-text {
    transition: filter 0.5s ease;
    opacity: 1;
}

.blur-text:hover {
    opacity: 1;
}

.avatar-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    border: 1px solid var(--glass-border);
    opacity: 0.8;
}

.avatar-small:hover {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.4);
}

.avatar-upload-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px dashed var(--border-color);
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.avatar-upload-btn:hover {
    color: var(--text-glow);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.02);
}

.frag-image {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-top: 1rem;
    border: 1px solid var(--border-color);
}

.reactions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    margin-top: 0.8rem;
    border-top: 1px dashed var(--border-color);
    padding-top: 0.8rem;
    justify-content: flex-start;
}

.reaction-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-color);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 35px;
}

.reaction-count {
    font-size: 0.65rem;
    margin-top: -2px;
    line-height: 1;
}

.reaction-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.reaction-btn.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.reaction-count {
    font-size: 0.8rem;
    color: var(--accent);
    font-family: var(--font-main);
}

.echoes-container {
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.echo {
    margin-bottom: 1rem;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.echo-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.echo-content {
    font-size: 0.85rem;
    color: var(--text-color);
}

.echo-composer {
    display: flex;
    margin-top: 1rem;
    align-items: center;
    gap: 0.5rem;
}

.echo-input {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 1px dashed var(--border-color);
    color: var(--text-color);
    font-family: var(--font-main);
    padding: 0.5rem;
    font-size: 0.85rem;
    outline: none;
    transition: all 0.3s ease;
}

.echo-input:focus {
    border-bottom-color: var(--text-glow);
    color: var(--text-glow);
}

.echo-btn {
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

/* iTunes Profile Player */
.song-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.song-result-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.song-result-item img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
}

.song-result-info {
    display: flex;
    flex-direction: column;
}

.song-result-title {
    color: var(--text-glow);
    font-size: 0.85rem;
}

.song-result-artist {
    color: var(--accent);
    font-size: 0.75rem;
}

.profile-player {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
    margin-top: 1rem;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    cursor: pointer;
    transition: background 0.3s ease;
}

.profile-player:hover { background:transparent; }

.cover-container {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.cover-container img {
    width: 100%;
    height: 100%;
    border-radius: 3px;
    object-fit: cover;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.profile-player:hover .cover-container img { opacity:1; }

.profile-player-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    flex: 1;
}

/* Global Search & Discovery */
.global-search-container {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 0;
}

.search-icon {
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.search-icon:hover {
    color: var(--text-glow);
}

#global-search-input {
    width: 0;
    opacity: 0;
    padding: 0;
    border: none;
    border-bottom: 1px solid var(--text-glow);
    background: transparent;
    color: var(--text-glow);
    font-family: var(--font-main);
    transition: all 0.3s ease;
    margin-right: 0;
}

.global-search-container.active #global-search-input {
    width: 150px;
    opacity: 1;
    padding: 0.2rem 0.5rem;
    margin-right: 0.5rem;
}

#global-search-input:focus {
    outline: none;
}

#global-search-results {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    max-height: 250px;
    overflow-y: auto;
    border-radius: 4px;
    margin-top: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-result-item img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

/* Discovery Section */
.discovery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition: transform 0.2s ease;
    min-width: 70px;
}

.discovery-item:hover {
    transform: scale(1.05);
}

.discovery-item img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.discovery-item span {
    font-size: 0.7rem;
    color: var(--text-glow);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70px;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .container {
        padding: 1rem 0.8rem 2.5rem 0.8rem;
        max-width: 100%;
        width: 100%;
    }

    /* Perfil y publicaciones de borde a borde en celular. */
    .container > .feed,
    .container > .profile-header {
        width: calc(100% + 1.6rem);
        margin-inline: -0.8rem;
    }

    .container > .feed-publish-actions {
        width: 100%;
        margin-inline: 0;
    }

    .container > .feed {
        gap: 1mm;
    }

    .fragment {
        padding: 0.9rem 1rem;
        margin: 0;
    }

    .top-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        width: 100%;
        justify-content: flex-start;
    }

    .global-search-container {
        position: absolute;
        top: 1rem;
        right: 1rem;
        margin-right: 0;
    }
}

/* Notifications Container */
#notif-dropdown {
    background: rgba(10, 10, 10, 0.4) !important;
    backdrop-filter: blur(25px) saturate(120%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(120%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Custom Modal Dialogs */
.custom-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.custom-modal-overlay.show { opacity: 1; }

.custom-modal {
    background: rgba(15, 15, 15, 0.8);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.custom-modal-overlay.show .custom-modal { transform: translateY(0); }

.custom-modal p {
    color: var(--text-glow);
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.custom-modal textarea {
    width: 100%;
    min-height: 80px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-color);
    padding: 10px;
    font-family: var(--font-main);
    border-radius: 4px;
    resize: vertical;
}
.custom-modal textarea:focus {
    border-color: var(--text-glow);
    color: var(--text-glow);
}

.custom-modal .btn-group {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 5px;
}
.custom-modal .btn-cancel {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-color);
}
.custom-modal .btn-cancel:hover { color: #ff4d4d; }
.custom-modal .btn-confirm {
    background: rgba(255,255,255,0.1);
    color: var(--text-glow);
}
.custom-modal .btn-confirm:hover { background: rgba(255,255,255,0.2); }

/* ========================================================
   CARRUSEL DE HISTORIAS EN EL MURO (PASO 3)
   ======================================================== */
.stories-tray-section {
    width: 100%;
    margin-bottom: 2rem;
    position: relative;
}

.stories-tray {
    display: flex;
    align-items: center;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 4px 14px 4px;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.stories-tray::-webkit-scrollbar {
    display: none;
}

.story-tray-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    flex-shrink: 0;
    width: 74px;
    user-select: none;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.story-tray-item:hover {
    transform: translateY(-3px) scale(1.04);
}
.story-tray-item:active {
    transform: scale(0.95);
}

.story-avatar-ring {
    position: relative;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* Historia NO VISTA (Borde verde neón con pulso/resplandor) */
.story-avatar-ring.unseen {
    background: linear-gradient(135deg, #00ff66 0%, #00cc52 50%, #00ffaa 100%);
    box-shadow: 0 0 14px rgba(0, 255, 102, 0.45);
    animation: pulseStoryRing 2.8s infinite ease-in-out;
}

/* Historia CÍRCULO ÍNTIMO NO VISTA (Borde fucsia / magenta neón con pulso) */
.story-avatar-ring.close-friends {
    background: linear-gradient(135deg, #ff007f 0%, #ff3399 50%, #9900ff 100%) !important;
    box-shadow: 0 0 16px rgba(255, 0, 127, 0.55) !important;
    animation: pulseStoryRingFuchsia 2.6s infinite ease-in-out !important;
}

/* Historia YA VISTA (Borde gris aesthetic) */
.story-avatar-ring.seen {
    background: rgba(255, 255, 255, 0.22);
    box-shadow: none;
    filter: grayscale(40%);
}

/* Tu historia sin publicar aún */
.story-avatar-ring.no-story {
    background: rgba(255, 255, 255, 0.08);
    border: 1px dashed rgba(255, 255, 255, 0.25);
    padding: 2px;
}

@keyframes pulseStoryRing {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 255, 102, 0.35);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 255, 102, 0.65);
    }
}

@keyframes pulseStoryRingFuchsia {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 0, 127, 0.4);
    }
    50% {
        box-shadow: 0 0 22px rgba(255, 0, 127, 0.75);
    }
}

/* Avatar de perfil con historia de Círculo Íntimo */
.profile-avatar.has-story.close-friends-story,
#main-profile-avatar.has-story.close-friends-story {
    border-color: #ff007f !important;
    box-shadow: 0 0 20px rgba(255, 0, 127, 0.6) !important;
    animation: pulseStoryRingFuchsia 2.6s infinite ease-in-out !important;
}

.story-badge-hint.close-friends-hint {
    border-color: rgba(255, 0, 127, 0.6) !important;
    color: #ff3399 !important;
}
.story-badge-hint.close-friends-hint span {
    color: #ff007f !important;
}

.story-tray-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #000;
    border: 2px solid #000;
    display: block;
}

/* Botón '+' en 'Tu historia' */
.story-plus-badge {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 22px;
    height: 22px;
    background: #00ff66;
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 900;
    border: 2px solid #000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
    transition: transform 0.2s ease, background 0.2s ease;
}
.story-tray-item:hover .story-plus-badge {
    transform: scale(1.15) rotate(90deg);
    background: #fff;
}

/* Nombre de usuario debajo */
.story-tray-name {
    font-size: 11px;
    color: #aaa;
    text-align: center;
    max-width: 72px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
    font-family: inherit;
    transition: color 0.2s ease;
}
.story-tray-item:hover .story-tray-name {
    color: #fff;
}

/* =========================================================
 * PASO 7: STICKERS INTERACTIVOS (ENCUESTAS Y PREGUNTAS)
 * ========================================================= */
.story-interactive-sticker {
    position: absolute;
    max-width: 85%;
    width: 290px;
    z-index: 26;
    user-select: none;
    pointer-events: auto;
    border-radius: 18px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Card Encuesta */
.story-poll-card {
    background: rgba(16, 16, 18, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 16px;
    text-align: center;
}
.story-poll-card.cf-theme {
    border-color: rgba(255, 0, 127, 0.45);
    box-shadow: 0 0 25px rgba(255, 0, 127, 0.25);
}
.story-poll-question {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    word-break: break-word;
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
    line-height: 1.35;
}
.story-poll-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.story-poll-option-btn {
    position: relative;
    width: 100%;
    min-height: 42px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    transition: all 0.2s ease;
}
.story-poll-option-btn:hover:not(.voted):not(.disabled) {
    background: rgba(255, 255, 255, 0.16);
    border-color: #00ffaa;
    transform: scale(1.02);
}
.story-poll-option-fill {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 0%;
    background: linear-gradient(90deg, rgba(0, 255, 170, 0.35) 0%, rgba(0, 255, 102, 0.25) 100%);
    border-radius: 12px;
    transition: width 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 1;
}
.cf-theme .story-poll-option-fill {
    background: linear-gradient(90deg, rgba(255, 0, 127, 0.45) 0%, rgba(255, 51, 153, 0.3) 100%);
}
.story-poll-option-text {
    position: relative;
    z-index: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80%;
}
.story-poll-option-pct {
    position: relative;
    z-index: 2;
    font-weight: 800;
    font-size: 13.5px;
    color: #00ffaa;
}
.cf-theme .story-poll-option-pct {
    color: #ff3399;
}
.story-poll-option-btn.my-pick {
    border-color: #00ffaa;
    box-shadow: 0 0 12px rgba(0, 255, 170, 0.35);
}
.cf-theme .story-poll-option-btn.my-pick {
    border-color: #ff007f;
    box-shadow: 0 0 14px rgba(255, 0, 127, 0.4);
}

/* Card Preguntas */
.story-question-card {
    background: rgba(14, 14, 16, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    overflow: hidden;
    text-align: center;
}
.story-question-card.cf-theme {
    border-color: rgba(255, 0, 127, 0.45);
}
.story-question-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    padding: 14px 16px 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.story-question-prompt {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin: 4px 0 0 0;
    line-height: 1.35;
    word-break: break-word;
}
.story-question-body {
    padding: 12px 14px 14px 14px;
}
.story-question-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 4px 6px 4px 12px;
    transition: border-color 0.2s;
}
.story-question-input-wrapper:focus-within {
    border-color: #00ffaa;
    box-shadow: 0 0 12px rgba(0, 255, 170, 0.25);
}
.story-question-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 12px;
    font-family: inherit;
    min-width: 0;
}
.story-question-input::placeholder {
    color: #777;
    font-style: italic;
}
.story-question-send-btn {
    width: 28px;
    height: 28px;
    background: #00ffaa;
    border: none;
    border-radius: 50%;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    flex-shrink: 0;
    transition: transform 0.15s;
}
.story-question-send-btn:hover {
    transform: scale(1.1);
}

/* =========================================================
 * PASO 8: HISTORIAS DESTACADAS (HIGHLIGHTS EN PERFIL)
 * ========================================================= */
.profile-highlights-section {
    width: 100%;
    max-width: 650px;
    margin: 1.2rem auto 0.8rem auto;
    padding: 0.2rem 0;
}
.highlights-scroll-container {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    overflow-x: auto;
    padding: 6px 8px 12px 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    justify-content: center;
}
.highlights-scroll-container::-webkit-scrollbar {
    display: none;
}
.highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    flex-shrink: 0;
    user-select: none;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.highlight-item:hover {
    transform: scale(1.06);
}
.highlight-ring {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    transition: all 0.25s ease;
}
.highlight-item:hover .highlight-ring {
    border-color: #00ffaa;
    box-shadow: 0 0 16px rgba(0, 255, 170, 0.45);
}
.highlight-ring.add-new {
    border: 1.5px dashed rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.04);
}
.highlight-item:hover .highlight-ring.add-new {
    border-color: #00ffaa;
    background: rgba(0, 255, 170, 0.08);
}
.highlight-cover-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: #000;
}
.highlight-title {
    font-size: 11.5px;
    font-family: inherit;
    color: #bbb;
    text-align: center;
    max-width: 74px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
    transition: color 0.2s;
}
.highlight-item:hover .highlight-title {
    color: #fff;
    text-shadow: 0 0 6px rgba(255,255,255,0.4);
}

/* Selector de historias para álbumes destacados */
.highlight-picker-card {
    position: relative;
    aspect-ratio: 9/16;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.12);
    background: #000;
    transition: all 0.2s ease;
    user-select: none;
}
.highlight-picker-card:hover {
    border-color: rgba(0, 255, 170, 0.5);
    transform: translateY(-2px);
}
.highlight-picker-card.selected {
    border-color: #00ffaa !important;
    box-shadow: 0 0 14px rgba(0, 255, 170, 0.55);
}
.highlight-picker-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.highlight-picker-check {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: transparent;
    transition: all 0.15s ease;
}
.highlight-picker-card.selected .highlight-picker-check {
    background: #00ffaa;
    border-color: #00ffaa;
    color: #000;
    font-weight: bold;
}
.highlight-picker-date {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 4px 4px 4px;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.85) 100%);
    font-size: 9.5px;
    color: #ccc;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.highlight-picker-card.selected .highlight-picker-date {
    color: #00ffaa;
}

/* Fila para drawer rápido de destacados */
.quick-hl-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}
.quick-hl-row:hover {
    background: rgba(0, 255, 170, 0.12);
    border-color: rgba(0, 255, 170, 0.45);
    transform: translateX(4px);
}
.quick-hl-row-cover {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.2);
}

/* =========================================================
 * PASO 10: ARCHIVO DE HISTORIAS Y ESTADÍSTICAS DETALLADAS
 * ========================================================= */
.archive-kpi-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 10px 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.archive-kpi-card:hover {
    border-color: rgba(0, 255, 170, 0.4);
    transform: translateY(-2px);
}
.archive-kpi-icon {
    font-size: 17px;
    margin-bottom: 2px;
}
.archive-kpi-value {
    font-size: 1.25rem;
    font-weight: bold;
    color: #00ffaa;
    line-height: 1.2;
}
.archive-kpi-label {
    font-size: 9.5px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.archive-filter-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    color: #aaa;
    padding: 5px 12px;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.archive-filter-pill:hover,
.archive-filter-pill.active {
    background: rgba(0, 255, 170, 0.15);
    border-color: #00ffaa;
    color: #00ffaa;
    font-weight: bold;
}
.archive-story-card {
    position: relative;
    aspect-ratio: 9/14;
    border-radius: 10px;
    overflow: hidden;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease, border-color 0.2s ease;
}
.archive-story-card:hover {
    transform: translateY(-3px) scale(1.02);
    border-color: #00ffaa;
    box-shadow: 0 0 16px rgba(0, 255, 170, 0.35);
}
.archive-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.archive-card-status-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: bold;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.archive-card-status-badge.active {
    background: rgba(0, 255, 102, 0.3);
    border: 1px solid #00ff66;
    color: #00ff66;
}
.archive-card-status-badge.expired {
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #aaa;
}
.archive-card-media-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.archive-card-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 6px 6px 6px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.9) 100%);
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.archive-card-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10.5px;
    color: #eee;
}
.archive-card-date {
    font-size: 9.5px;
    color: #888;
}
.insights-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #888;
    font-size: 11.5px;
    font-weight: bold;
    padding: 8px 4px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}
.insights-tab-btn.active {
    color: #00ffaa;
    border-bottom-color: #00ffaa;
}

/* =========================================================
 * STICKER DE MÚSICA ESTILO INSTAGRAM (ITUNES & COVER)
 * ========================================================= */
.stage-music-sticker {
    position: absolute;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 46;
    display: none;
    user-select: none;
    touch-action: none;
}
.music-sticker-inner, .viewer-music-sticker {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(14, 14, 14, 0.85);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 16px;
    padding: 8px 14px 8px 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 16px rgba(0, 255, 170, 0.25);
    cursor: pointer;
    min-width: 190px;
    max-width: 280px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s ease, border-color 0.2s ease;
}
.music-sticker-inner:hover, .viewer-music-sticker:hover {
    transform: scale(1.04);
    border-color: #00ffaa;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.9), 0 0 22px rgba(0, 255, 170, 0.4);
}
.music-sticker-cover, .viewer-music-cover {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    object-fit: cover;
    background: #111;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.7);
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.music-sticker-info, .viewer-music-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.music-sticker-title, .viewer-music-title {
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.music-sticker-artist, .viewer-music-artist {
    font-size: 11px;
    color: #00ffaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.music-sticker-bars, .viewer-music-equalizer {
    display: inline-flex;
    align-items: flex-end;
    gap: 2.5px;
    height: 11px;
    margin-top: 3px;
}
.music-sticker-bars .m-bar, .viewer-music-equalizer .v-eq-bar {
    width: 2.5px;
    background: #00ffaa;
    border-radius: 1px;
    animation: mBarPulse 0.75s ease-in-out infinite;
}
.m-bar.mb-1, .v-eq-bar.eq1 { animation-delay: 0s; height: 4px; }
.m-bar.mb-2, .v-eq-bar.eq2 { animation-delay: 0.2s; height: 11px; }
.m-bar.mb-3, .v-eq-bar.eq3 { animation-delay: 0.4s; height: 7px; }
.m-bar.mb-4, .v-eq-bar.eq4 { animation-delay: 0.15s; height: 5px; }

.viewer-music-equalizer.paused .v-eq-bar,
.music-sticker-bars.paused .m-bar {
    animation-play-state: paused !important;
    height: 3px !important;
    opacity: 0.5;
}

@keyframes mBarPulse {
    0%, 100% { height: 3px; }
    50% { height: 11px; }
}

.music-sticker-del {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 22px;
    height: 22px;
    background: #ff3366;
    border: 2px solid #0c0c0c;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    transition: transform 0.15s ease, background 0.15s ease;
    z-index: 5;
}
.music-sticker-del:hover {
    transform: scale(1.15);
    background: #ff1744;
}

/* Filas de resultados en búsqueda de iTunes */
.itunes-result-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    margin-bottom: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.itunes-result-row:hover {
    background: rgba(0, 255, 170, 0.1);
    border-color: rgba(0, 255, 170, 0.35);
    transform: translateX(3px);
}
.itunes-result-cover {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #111;
}
.itunes-result-title {
    font-size: 12.5px;
    font-weight: bold;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.itunes-result-artist {
    font-size: 11px;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Chat Navigation Link & Badge */
.chat-nav-link {
    display: inline-flex;
    align-items: center;
    position: relative;
    color: var(--text-color, #e0e0e0);
    transition: all 0.25s ease;
}

.chat-nav-link svg {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-nav-link:hover svg {
    stroke: #ffffff;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.75));
    transform: scale(1.08);
}

#nav-chat-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #ffffff;
    color: #050508;
    font-size: 0.65rem;
    font-weight: 800;
    font-family: var(--font-main, monospace);
    padding: 1px 5px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.65);
    line-height: 1.2;
    pointer-events: none;
    z-index: 10;
}

/* ==========================================================================
   Compact publication action; stories stay on the avatar
   ========================================================================== */
.feed-publish-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

.feed-action-box {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    border-radius: 0;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    background: var(--glass-bg, rgba(10, 10, 10, 0.4));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

.feed-action-box:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 255, 255, 0.03);
}

.feed-action-box:focus-within {
    border-color: rgba(255, 255, 255, 0.4);
}

.feed-action-box:active {
    transform: translateY(0);
}

.feed-action-btn {
    all: unset;
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0.75rem 1rem;
    color: var(--text-color, #a0a0a0);
    font-family: var(--font-main, 'Courier Prime', monospace);
    font-size: 0.82rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
    line-height: 1.3;
}

.feed-action-box:hover .feed-action-btn {
    color: var(--text-glow, #ffffff);
}

.feed-action-icon {
    color: var(--text-color, #a0a0a0);
    transition: transform 0.25s ease, color 0.2s ease;
    flex-shrink: 0;
}

.feed-action-box:hover .feed-action-icon {
    color: #ffffff;
    transform: scale(1.1);
}

.feed-action-text {
    font-weight: 400;
    letter-spacing: -0.2px;
}

/* Fallback & legacy classes */
.feed-box-action-btn {
    all: unset;
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

@media (max-width: 600px) {
    .feed-publish-actions {
        gap: 8px;
    }
    .feed-action-btn {
        padding: 0.7rem 0.75rem;
        font-size: 0.76rem;
        gap: 6px;
    }
    .feed-action-icon {
        width: 18px;
        height: 18px;
    }
}

/* Publication Modal Backdrop & Dialog */
.composer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.composer-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1;
}

.composer-modal-dialog {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 530px;
    background: #0d0d0f;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    max-height: 90dvh;
    overflow: hidden;
    animation: composerModalIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes composerModalIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.composer-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.015);
}

.composer-modal-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--accent, #e0e0e0);
    letter-spacing: 0.02em;
}

.composer-modal-close-btn {
    background: transparent;
    border: none;
    color: var(--blur-text-color, #888);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.composer-modal-close-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.composer-modal-body {
    padding: 1.25rem 1.4rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.composer-textarea {
    width: 100%;
    min-height: 110px;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-color, #e0e0e0);
    font-size: 0.95rem;
    font-family: var(--font-main, inherit);
    line-height: 1.55;
    resize: none;
    box-sizing: border-box;
    padding: 0.2rem 0;
}

.composer-textarea::placeholder {
    color: rgba(255, 255, 255, 0.22);
}

/* Image preview card */
.composer-image-preview-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.composer-preview-img-wrap {
    max-height: 220px;
    overflow: hidden;
    border-radius: 6px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.composer-preview-img-wrap img {
    max-width: 100%;
    max-height: 220px;
    object-fit: contain;
}

.composer-preview-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--blur-text-color, #888);
}

.composer-preview-filename {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 250px;
}

.composer-remove-img-btn {
    background: rgba(255, 77, 77, 0.1);
    border: 1px solid rgba(255, 77, 77, 0.25);
    color: #ff6b6b;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.composer-remove-img-btn:hover {
    background: rgba(255, 77, 77, 0.2);
    border-color: #ff6b6b;
    color: #ff9999;
}

/* Controls bar: attach and privacy */
.composer-modal-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
}

.composer-attach-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-color, #ccc);
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: var(--font-main, inherit);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.composer-attach-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.composer-privacy-dropdown-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.composer-privacy-select {
    background: #141417;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-color, #e0e0e0);
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: var(--font-main, inherit);
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s ease;
}

.composer-privacy-select:hover,
.composer-privacy-select:focus {
    border-color: rgba(255, 255, 255, 0.3);
}

.composer-privacy-select option {
    background: #111;
    color: #eee;
    padding: 8px;
}

/* Custom Audience Selection Panel */
.composer-custom-audience {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    animation: fadeIn 0.18s ease;
}

.custom-audience-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
}

.custom-audience-title {
    color: var(--accent, #e0e0e0);
    font-weight: 500;
}

.custom-audience-count {
    color: var(--blur-text-color, #888);
    font-size: 0.75rem;
}

.composer-selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 24px;
}

.composer-user-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 2px 8px 2px 4px;
    font-size: 0.75rem;
    color: #eee;
}

.composer-user-tag img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.composer-tag-remove {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0 2px;
}

.composer-tag-remove:hover {
    color: #ff6b6b;
}

.custom-search-input {
    width: 100%;
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color, #e0e0e0);
    padding: 0.45rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: var(--font-main, inherit);
    box-sizing: border-box;
    outline: none;
}

.custom-search-input:focus {
    border-color: rgba(255, 255, 255, 0.25);
}

.composer-user-search-results {
    max-height: 150px;
    overflow-y: auto;
    border-radius: 6px;
    background: #0d0d0f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
}

.composer-user-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.15s ease;
}

.composer-user-result-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.composer-user-result-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.composer-user-result-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.composer-user-result-name {
    font-size: 0.8rem;
    color: #e0e0e0;
}

/* Modal Footer */
.composer-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.25);
}

.composer-draft-indicator {
    font-size: 0.75rem;
    color: var(--blur-text-color, #666);
    opacity: 0;
    transition: opacity 0.3s ease;
    user-select: none;
}

.composer-draft-indicator.visible {
    opacity: 1;
}

.composer-submit-btn {
    padding: 0.55rem 1.6rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.composer-submit-btn:disabled {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* Privacy Tag in Feed Post */
.frag-privacy-tag {
    color: var(--blur-text-color, #777);
    font-size: 0.72rem;
    display: inline-flex;
    align-items: center;
}

/* Mobile responsive styles */
@media (max-width: 600px) {
    .composer-modal {
        padding: 0.5rem;
        align-items: center;
    }
    .composer-modal-dialog {
        max-height: 92dvh;
        width: 100%;
        border-radius: 12px;
    }
    .composer-modal-header,
    .composer-modal-body,
    .composer-modal-footer {
        padding: 0.85rem 1rem;
    }
    .composer-textarea {
        min-height: 85px;
        font-size: 0.9rem;
    }
    .feed-action-btn {
        padding: 0.55rem 1.15rem;
        font-size: 0.8rem;
    }
}

/* Readable field labels and placeholders on the dark background. */
.profile-field-label { color:var(--text-color); font-size:.78rem; }
.profile-field-help { color:var(--blur-text-color); font-size:.72rem; line-height:1.5; margin:-.3rem 0 .3rem; }
input::placeholder, textarea::placeholder { color:var(--blur-text-color); opacity:1; }
