/* ESTILOS BASE CORREGIDOS */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    position: fixed;
    touch-action: pan-x pan-y;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

.container {
    display: flex;
    gap: 20px;
    max-width: 1400px;
    width: 100%;
    height: 90vh;
    max-height: 850px;
    justify-content: center;
    align-items: stretch;
}

button {
    cursor: pointer;
}

.window {
    background-color: #E9F3F6;
    border: 1px solid #C4D5DF;
    border-radius: 8px;
    box-shadow: 2px 2px 10px rgba(0,0,0,.5);
    height: 100%;
    width: 850px;
    transform-origin: center center;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.msn-container {
    display: grid;
    grid-gap: 10px;
    grid-template-columns: 1fr 280px;
    grid-template-rows: 1fr 140px;
    height: calc(100% - 120px);
    padding: 10px;
    flex: 1;
}

.item {
    border: 2px solid #D2DDE0;
    border-radius: 2px;
}

.bar {
    border: 0;
    grid-column: 1 / -1;
}
.bar__top {
    display: flex;
    padding: 10px;
    align-items: center;
    background: linear-gradient(90deg, #1E90FF, #00BFFF);
    color: white;
    position: relative;
}
.logo {
    height: 30px;
    margin-right: 10px;
    width: 30px;
    flex-shrink: 0;
}
.messenger-title {
    font-weight: bold;
    font-size: 18px;
    margin-right: 10px;
}
.username {
    font-weight: bold;
    margin-bottom: 3px;
    font-size: 16px;
    cursor: default;
    user-select: none;
}
.mood {
    font-size: .9rem;
    letter-spacing: .5px;
    opacity: 0.9;
}
.bar__bottom {
    background: rgb(247,253,255);
    background: linear-gradient(180deg, rgba(247,253,255,1) 0%, rgba(214,227,234,1) 50%, rgba(238,249,250,1) 100%);  
    border-bottom: 1px solid #D2DDE0;
    border-top: 1px solid #D2DDE0;
    display: flex;
    height: 50px;
    align-items: center;
    padding: 0 10px;
    overflow-x: auto;
    position: relative;
}
.action__button {
    background: transparent;
    border: 0;
    font-size: 1.5rem;
    margin-right: 10px;
    padding: 5px;
    border-radius: 3px;
    transition: all 0.2s;
    flex-shrink: 0;
    position: relative;
}
.action__button:hover {
    background: rgba(0,0,0,0.05);
    transform: scale(1.1);
}
.action__button:active {
    background: #E9F3F6;
    outline: 1px solid #D2DDE0;
}

.img {
    display: none;
}

.conversation {
    background-color: #FAFBFD;
    overflow-y: auto;
    padding: 5px;
    height: 100%;
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}
p {
    margin: 7px;
    word-break: break-word;
}
.message {
    margin-left: 20px;
    background-color: #E9F3F6;
    padding: 5px 10px;
    border-radius: 10px;
    display: inline-block;
    max-width: 80%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.message.self {
    background-color: #E9F3F6;
    margin-left: 0;
    margin-right: 20px;
    float: right;
}
.message-author {
    font-weight: bold;
    margin-right: 5px;
}
.system-message {
    color: #666;
    font-style: italic;
    text-align: center;
    margin: 10px 0;
}

.send-message {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    grid-template-rows: 35px 1fr 45px;
    width: 100%;
    grid-column: 1 / 2;
    grid-row: 3 / 4;
    gap: 5px;
}

.send-message__buttons {
    grid-column: 1 / -1;
    grid-row: 1 / 2;
    background: rgb(247,253,255);
    background: linear-gradient(180deg, rgba(247,253,255,1) 0%, rgba(214,227,234,1) 50%, rgba(238,249,250,1) 100%);  
    border-bottom: 1px solid #D2DDE0;
    display: flex;
    align-items: center;
    padding: 0 5px;
    overflow: hidden;
    height: 35px;
    flex-wrap: wrap;
}
.send-message__button {
    background: transparent;
    border: 0;
    font-size: 1.3rem;
    margin-right: 5px;
    padding: 3px;
    border-radius: 3px;
    transition: all 0.2s;
    flex-shrink: 0;
}
.send-message__button:hover {
    background: rgba(0,0,0,0.05);
    transform: scale(1.1);
}
.send-message__button:active {
    background: #E9F3F6;
    outline: 1px solid #D2DDE0;
}
.buttons {
    display: flex;
    flex-direction: column;
}
.buttons button {
    font-size: 1.05rem;
    margin: 5px;
    padding: 8px;
    background: #E9F3F6;
    border: 1px solid #C4D5DF;
    border-radius: 3px;
    transition: all 0.2s;
    white-space: nowrap;
}
.buttons button:hover {
    background: #D1E7F5;
    transform: scale(1.05);
}
textarea {
    background-color: #FAFBFD;
    border: 0;
    padding-left: 8px;
    padding-top: 8px;
    resize: none;
    width: 100%;
    height: 70px;
    font-family: sans-serif;
}
.send-message__textfield {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    background-color: #FAFBFD;
    display: flex;
    justify-content: space-between;
    height: 100%;
}
.send-message__infos {
    grid-column: 1 / -1;
    grid-row: 3 / 4;
    align-items: center;
    background-color: #FBFBFF;
    border-top: 1px solid #D2DDE0;
    color: #8D8E88;
    display: flex;
    font-size: .85em;
    padding-left: 5px;
    white-space: nowrap;
    overflow: hidden;
    height: 45px;
}

.send-message-avatar {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px;
}

.send-message-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 5px;
    border: 1px solid #C4D5DF;
}

.nudge-text {
    display: none;
}
.nudge {
    margin: 10px 0 20px 5px;
    position: relative;
    text-align: center;
    font-style: italic;
    color: #666;
}
.nudge:after {
    border-top: 1px solid #999;
    content: "";
    left: 0;
    position: absolute;
    top: 25px;
    width: 100%;
}

.user-list {
    background-color: #FAFBFD;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    grid-column: 2 / 3;
    grid-row: 1 / 4;
    height: 100%;
}

.user-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 5px;
    background-color: #E9F3F6;
    min-height: 50px;
    transition: background-color 0.2s;
}

.user-item:hover {
    background-color: #D1E7F5;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
    background-color: #1E90FF;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
}

.user-list-header {
    background: linear-gradient(90deg, #1E90FF, #00BFFF);
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    margin-bottom: 12px;
    font-weight: bold;
    text-align: center;
    font-size: 14px;
}

.winamp-container {
    width: 350px;
    height: 100%;
    background: linear-gradient(135deg, #11101A, #373857);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,.7);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid #555265;
    transition: all 0.3s ease;
}

.winamp-top {
    position: relative;
    width: 100%;
    background: linear-gradient(90deg, #11101A, #373857 35%, #373857 50%, #373857 65%, #11101A);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0 0;
    flex-shrink: 0;
}

.winamp-title {
    width: 100%;
    padding: .3rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.winamp-title h1 {
    font-size: 1.5rem;
    letter-spacing: .2rem;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    color: #8A8BA0;
    padding: 0 .5rem;
    text-shadow: 0 0 5px rgba(138, 139, 160, 0.5);
}

.winamp-controls {
    width: 90%;
    padding: 0.8rem;
    margin: 0 .5rem .5rem .5rem;  
    position: relative;
    flex-shrink: 0;
}

.winamp-controls:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 6px;
    background: linear-gradient(145deg, #1a1a24, #2d2d42);
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.5);
    z-index: -1;
}

.winamp-time {
    display: flex;
    margin-bottom: 10px;
    height: 60px;
}

.time-left {
    width: 35%;
    display: flex;
    align-items: start;
    justify-content: center;
}

.time-right {
    width: 65%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-left: .5rem;
}

.winamp-time-display {
    font-family: 'Segoe UI', Tahoma, sans-serif;
    color: #00ff00;
    background: rgba(0, 0, 0, 0.7);
    width: 100%;
    font-size: 0.7rem;
    border: none;
    border-radius: 4px;
    text-align: center;
    padding: 8px 0;
    text-shadow: 0 0 3px #00ff00;
    box-shadow: inset 0 0 5px rgba(0, 255, 0, 0.2);
}

.winamp-track-info {
    width: 100%;
    height: 1.8rem;
    background: rgba(0, 0, 0, 0.7);
    font-size: 0.85rem;
    color: #00ff00;
    border: none;
    border-radius: 4px;
    padding: 0 .4rem;
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
    text-shadow: 0 0 3px #00ff00;
    box-shadow: inset 0 0 5px rgba(0, 255, 0, 0.2);
    margin-bottom: 6px;
}

.track-scrolling {
    animation: scroll-text 15s linear infinite;
    padding-left: 100%;
}

@keyframes scroll-text {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-100%); }
}

.winamp-volume-container {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
}

.winamp-volume {
    color: #00ff00;
    font-size: 0.8rem;
    text-shadow: 0 0 3px #00ff00;
    width: 30px;
}

.winamp-volume-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    border: none;
    -webkit-appearance: none;
    background: linear-gradient(to right, #00ff00, #00ff00 var(--volume-percent, 80%), #333 var(--volume-percent, 80%), #333 100%);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
}

.winamp-volume-slider::-webkit-slider-thumb {
    width: 14px;
    height: 14px;
    background: #ADBAC7;
    border-radius: 50%;
    border: 1px solid #555265;
    -webkit-appearance: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    cursor: pointer;
}

.winamp-progress-container {
    margin: 0.8rem 0;
    width: 100%;
}

.winamp-progress {
    width: 100%;
    height: 10px;
    background: transparent;
    border: none;
    border-radius: 5px;
    overflow: hidden;
    -webkit-appearance: none;
    background: linear-gradient(to right, #F9EBBC 0%, #F9EBBC var(--progress-percent, 0%), #333 var(--progress-percent, 0%), #333 100%);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
}

.winamp-progress::-webkit-slider-thumb {
    width: 16px;
    height: 16px;
    background: #B39D66;
    border-radius: 50%;
    border: 2px solid #DDCBA2;
    -webkit-appearance: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
    cursor: pointer;
}

.winamp-buttons {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
}

.winamp-button {
    position: relative;
    cursor: pointer;
    width: 2.4rem;
    height: 1.8rem;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
    font-weight: bold;
    background: linear-gradient(145deg, #ADBAC7, #8a96a1);
    border: none;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    transition: all 0.2s;
    color: #333;
}

.winamp-button:hover {
    transform: translateY(-1px);
    box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.winamp-button:active {
    transform: translateY(1px);
    box-shadow: inset 1px 1px 3px rgba(0,0,0,0.3);
}

.buttons-left, .buttons-right {
    display: flex;
    gap: 6px;
}

.winamp-shuffle {
    width: 2.4rem;
    font-size: 1rem;
}

.winamp-repeat {
    width: 2.4rem;
    font-size: 1rem;
}

.winamp-logo {
    color: #ff9900;
    transform: rotate(20deg);
    transform-origin: center;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    text-shadow: 0 0 5px rgba(255, 153, 0, 0.7);
}

.winamp-highlighted {
    background: linear-gradient(145deg, #00ff00, #00cc00);
    color: #000;
    text-shadow: 0 0 3px rgba(255,255,255,0.5);
}

.winamp-playlist {
    flex: 1;
    min-height: 150px;
    position: relative;
    padding: 8px 0;
    overflow: hidden;
}

.winamp-playlist-content {
    width: 90%;
    margin: 0 auto;
    padding: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #00ff00;
    height: calc(100% - 20px);
    overflow-y: auto;
    font-size: 0.8rem;
    border-radius: 4px;
    box-shadow: inset 0 0 5px rgba(0, 255, 0, 0.1);
}

.winamp-title h2 {
    width: 100%;
    font-size: 0.9rem;
    letter-spacing: .15rem;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    color: #8A8BA0;
    padding: 0 .5rem;
    text-align: center;
    text-shadow: 0 0 5px rgba(138, 139, 160, 0.5);
}

.winamp-track-highlighted {
    color: #000;
    background-color: #00ff00;
    border-radius: 3px;
    padding: 2px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.winamp-track {
    width: 100%;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    line-height: 1.3;
    padding: 4px 6px;
    word-break: break-word;
    border-radius: 3px;
    transition: all 0.2s;
    margin-bottom: 2px;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.winamp-track:hover {
    background-color: rgba(0, 255, 0, 0.2);
}

.track-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.track-duration {
    white-space: nowrap;
    margin-left: 8px;
    flex-shrink: 0;
}

.winamp-visualisation {
    height: 140px;
    position: relative;
    padding: 8px 0;
    flex-shrink: 0;
}

.winamp-visual-content {
    width: 90%;
    height: 110px;
    margin: 0 auto;
    padding: 8px;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    box-shadow: inset 0 0 5px rgba(0, 255, 0, 0.1);
}

.winamp-visual {
    height: auto;
    max-height: 94px;
    width: auto;
    max-width: 100%;
    display: none;
    object-fit: cover;
    border-radius: 3px;
}

.visualization-active {
    display: block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.file-input-container {
    margin: 10px 0 5px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-input-label {
    color: #00ff00;
    font-size: 0.8rem;
    text-shadow: 0 0 3px #00ff00;
}

.file-input {
    width: 100%;
    padding: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: #00ff00;
    border: 1px solid #555;
    border-radius: 4px;
    font-size: 0.8rem;
}

.file-input:focus {
    outline: none;
    border-color: #00ff00;
    box-shadow: 0 0 3px #00ff00;
}

.music-buttons-container {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    width: 100%;
}

.clear-music-button {
    background: linear-gradient(145deg, #ff3333, #cc0000);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.clear-music-button:hover {
    background: linear-gradient(145deg, #ff5555, #dd2222);
    transform: translateY(-1px);
}

.load-music-button {
    background: linear-gradient(145deg, #33cc33, #229922);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.load-music-button:hover {
    background: linear-gradient(145deg, #55dd55, #33aa33);
    transform: translateY(-1px);
}

.is-nudged {
    animation-name: nudge;
    animation-duration: 100ms;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
}

@keyframes nudge {
    0%, 100% { transform: translate(0, 0) rotate(0); }
    25% { transform: translate(-2px, -2px) rotate(-1deg); }
    50% { transform: translate(2px, 2px) rotate(1deg); }
    75% { transform: translate(-2px, 2px) rotate(-1deg); }
}

.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.login-form {
    background: linear-gradient(135deg, #1E90FF, #00BFFF);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    width: 90%;
    max-width: 500px;
    text-align: center;
    color: white;
}

.login-form h2 {
    margin-bottom: 20px;
    font-size: 24px;
}

.login-form input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: none;
    border-radius: 5px;
    font-size: 16px;
}

.login-form button {
    background: #FF4500;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    width: 100%;
    transition: background 0.3s;
}

.login-form button:hover {
    background: #FF6347;
}

.login-form button:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.avatar-selector {
    margin: 15px 0;
    text-align: center;
    display: none;
}

.avatar-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 10px 0;
    max-height: 200px;
    overflow-y: auto;
}

.avatar-option {
    width: 80px;
    height: 80px;
    border: 3px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.avatar-option:hover {
    transform: scale(1.1);
    border-color: #FF4500;
}

.avatar-option.selected {
    border-color: #FF4500;
    transform: scale(1.1);
}

.avatar-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
    background-color: #f0f0f0;
}

.avatar-preview {
    margin: 15px 0;
    padding: 15px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    text-align: center;
}

.avatar-preview img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    border: 3px solid white;
    margin-top: 10px;
}

.emoji-picker {
    position: absolute;
    bottom: 120px;
    left: 10px;
    background: white;
    border: 1px solid #C4D5DF;
    border-radius: 8px;
    padding: 10px;
    display: none;
    flex-wrap: wrap;
    width: 300px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    z-index: 100;
}

.emoji {
    font-size: 1.5rem;
    padding: 5px;
    cursor: pointer;
    transition: transform 0.2s;
}

.emoji:hover {
    transform: scale(1.2);
}

.winamp-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 0px;
    height: 0px;
    background: linear-gradient(135deg, #11101A, #373857);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #00ff00;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    z-index: 101;
    cursor: pointer;
    border: 2px solid #555265;
    transition: all 0.3s ease;
}

.winamp-toggle:hover {
    transform: scale(1.1);
}

.winamp-toggle.active {
    background: linear-gradient(135deg, #373857, #11101A);
    color: #ff9900;
}

/* TOGGLE PARA USUARIOS EN MÓVIL - POSICIÓN SUPERIOR DERECHA */
.users-toggle {
    position: fixed;
    top: 15px;
    right: 90px;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, #1E90FF, #00BFFF);
    border-radius: 50%;
    display: none;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    z-index: 101;
    cursor: pointer;
    border: 2px solid #C4D5DF;
    transition: all 0.3s ease;
}

.users-toggle:hover {
    transform: scale(1.1);
}

.users-toggle.active {
    background: linear-gradient(135deg, #00BFFF, #1E90FF);
    color: white;
}

/* POPUP DE USUARIOS PARA MÓVIL - POSICIÓN AJUSTADA */
.users-popup {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 300px;
    height: 400px;
    background: #FAFBFD;
    border: 2px solid #C4D5DF;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    z-index: 100;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

.users-popup.active {
    display: flex;
}

.users-popup-header {
    background: linear-gradient(90deg, #1E90FF, #00BFFF);
    color: white;
    padding: 12px;
    font-weight: bold;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.users-popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
}

.users-popup-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-online {
    background-color: #4CAF50;
}

.status-offline {
    background-color: #f44336;
}

.connection-status {
    font-size: 12px;
    margin-left: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    background: rgba(255,255,255,0.2);
}

.connected {
    background: #4CAF50;
}

.disconnected {
    background: #f44336;
}

.chat-tabs {
    display: flex;
    background: #D1E7F5;
    border-bottom: 1px solid #C4D5DF;
    overflow-x: auto;
    height: 30px;
    min-height: 30px;
    flex-shrink: 0;
}

.chat-tab {
    padding: 5px 12px;
    background: #E9F3F6;
    border-right: 1px solid #C4D5DF;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 100px;
    font-size: 12px;
}

.chat-tab.active {
    background: #FAFBFD;
    border-bottom: 2px solid #1E90FF;
}

.chat-tab-close {
    margin-left: 5px;
    font-size: 12px;
    cursor: pointer;
    padding: 1px;
    border-radius: 2px;
}

.chat-tab-close:hover {
    background: rgba(0,0,0,0.1);
}

.user-actions {
    margin-left: auto;
    display: flex;
    gap: 3px;
}

.user-action-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.user-action-btn:hover {
    background-color: rgba(0,0,0,0.1);
}

.user-item {
    cursor: pointer;
    transition: background-color 0.2s;
}

.user-item:hover {
    background-color: #D1E7F5;
}

.private-message {
    background-color: #FFF9C4;
    border-left: 3px solid #FFD600;
}

.private-chat-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.private-chat-form {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.private-chat-form h3 {
    margin-bottom: 15px;
    color: #1E90FF;
}

.private-chat-form p {
    margin-bottom: 15px;
    color: #333;
}

.private-chat-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.private-chat-buttons button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.accept-chat {
    background: #4CAF50;
    color: white;
}

.decline-chat {
    background: #f44336;
    color: white;
}

.error-message {
    color: #ff4444;
    background-color: #ffe6e6;
    padding: 8px;
    border-radius: 4px;
    margin: 10px 0;
    font-size: 14px;
    display: none;
}

.user-color-1 { color: #FF5733; }
.user-color-2 { color: #33FF57; }
.user-color-3 { color: #3357FF; }
.user-color-4 { color: #F033FF; }
.user-color-5 { color: #FF33A1; }
.user-color-6 { color: #33FFF6; }
.user-color-7 { color: #FF8C33; }
.user-color-8 { color: #8C33FF; }
.user-color-9 { color: #33FF8C; }
.user-color-10 { color: #FF3333; }
.user-color-11 { color: #5733FF; }
.user-color-12 { color: #33A1FF; }
.user-color-13 { color: #A1FF33; }
.user-color-14 { color: #FF33F0; }
.user-color-15 { color: #F0FF33; }

/* NUEVO: Color especial para administrador */
.user-color-admin {
    color: #000000 !important;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(255,255,255,0.5);
}

.user-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
    border: 1px solid #C4D5DF;
    flex-shrink: 0;
}

.password-field {
    display: none;
    margin: 10px 0;
}

/* CONTROL DE SONIDO MEJORADO - EN BARRA SUPERIOR */
.sound-control {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 102;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.5);
    transition: all 0.3s ease;
}

.sound-control:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.1);
}

.sound-control i {
    font-size: 18px;
    color: white;
}

.sound-control.muted {
    background: rgba(255,0,0,0.5);
}

/* CONFIGURACIÓN DE PRIVACIDAD */
.privacy-settings {
    position: absolute;
    top: 10px;
    right: 55px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 102;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.5);
    transition: all 0.3s ease;
}

.privacy-settings:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.1);
}

.privacy-settings i {
    font-size: 16px;
    color: white;
}

.privacy-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1002;
}

.privacy-form {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    width: 90%;
    max-width: 400px;
    text-align: left;
}

.privacy-form h3 {
    margin-bottom: 15px;
    color: #1E90FF;
    text-align: center;
}

.privacy-option {
    margin: 15px 0;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 5px;
    border-left: 4px solid #1E90FF;
}

.privacy-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

.privacy-option input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.privacy-description {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    margin-left: 26px;
}

.privacy-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.privacy-buttons button {
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.save-privacy {
    background: #4CAF50;
    color: white;
}

.cancel-privacy {
    background: #f44336;
    color: white;
}

/* POPUPS FLOTANTES PARA BOTONES DE LA BARRA */
.winamp-popup {
    position: absolute;
    bottom: 60px;
    right: 10px;
    width: 300px;
    height: 500px;
    background: linear-gradient(135deg, #11101A, #373857);
    border: 2px solid #555265;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.7);
    z-index: 100;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.winamp-popup.active {
    display: flex;
}

.users-popup-mobile {
    position: absolute;
    bottom: 60px;
    right: 60px;
    width: 280px;
    height: 350px;
    background: #FAFBFD;
    border: 2px solid #C4D5DF;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    z-index: 100;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.users-popup-mobile.active {
    display: flex;
}

.users-popup-mobile-header {
    background: linear-gradient(90deg, #1E90FF, #00BFFF);
    color: white;
    padding: 12px;
    font-weight: bold;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.users-popup-mobile-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
}

.users-popup-mobile-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

/* NUEVO: PANEL DE ADMINISTRACIÓN */
.admin-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    z-index: 1003;
    display: none;
    flex-direction: column;
    max-height: 80vh;
    overflow: hidden;
}

.admin-panel.active {
    display: flex;
}

.admin-header {
    background: linear-gradient(90deg, #000000, #333333);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h3 {
    margin: 0;
    font-size: 18px;
}

.admin-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.admin-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.admin-section {
    margin-bottom: 25px;
}

.admin-section h4 {
    margin-bottom: 10px;
    color: #333;
    border-bottom: 2px solid #1E90FF;
    padding-bottom: 5px;
}

.report-item {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-info {
    flex: 1;
}

.report-reason {
    font-weight: bold;
    color: #d32f2f;
}

.report-meta {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.admin-actions {
    display: flex;
    gap: 8px;
}

.admin-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.2s;
}

.btn-warn {
    background: #ff9800;
    color: white;
}

.btn-kick {
    background: #f44336;
    color: white;
}

.btn-ban {
    background: #d32f2f;
    color: white;
}

.btn-dismiss {
    background: #757575;
    color: white;
}

.admin-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.report-user-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background-color 0.2s;
    color: #f44336;
    margin-left: 5px;
}

.report-user-btn:hover {
    background-color: rgba(244, 67, 54, 0.1);
}

.admin-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.stat-card {
    background: linear-gradient(135deg, #1E90FF, #00BFFF);
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    opacity: 0.9;
}

/* NUEVO: MODAL DE REPORTE */
.report-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1004;
}

.report-form {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    width: 90%;
    max-width: 400px;
}

.report-form h3 {
    margin-bottom: 15px;
    color: #f44336;
    text-align: center;
}

.report-options {
    margin: 15px 0;
}

.report-option {
    margin: 10px 0;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.report-option:hover {
    background: #e0e0e0;
}

.report-option input[type="radio"] {
    margin-right: 10px;
}

.report-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.report-buttons button {
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.submit-report {
    background: #f44336;
    color: white;
}

.cancel-report {
    background: #757575;
    color: white;
}

/* ESTILOS ESPECÍFICOS PARA MÓVIL - CORREGIDOS Y MEJORADOS */
@media (max-width: 768px) {
    html, body {
        position: fixed;
        width: 100%;
        height: 100%;
        overflow: hidden;
        touch-action: pan-x pan-y;
    }
    
    body {
        padding: 0;
        margin: 0;
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
    
    .container {
        flex-direction: column;
        height: 100vh;
        max-height: 100vh;
        gap: 0;
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
        overflow: hidden;
    }
    
    .window {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        border: none;
        overflow: hidden;
    }
    
    .msn-container {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 140px;
        padding: 5px;
        grid-gap: 5px;
        height: calc(100vh - 180px);
        max-height: calc(100vh - 180px);
        overflow: hidden;
    }
    
    /* OCULTAR LISTA DE USUARIOS EN MÓVIL Y MOSTRAR TOGGLE */
    .user-list {
        display: none !important;
    }
    
    .users-toggle {
        display: flex;
        top: 10px;
        right: 60px;
        width: 40px;
        height: 40px;
    }
    
    /* Ajustes para el control de sonido en móvil */
    .sound-control {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        background: rgba(255,255,255,0.3);
    }
    
    .sound-control i {
        font-size: 20px;
    }

    /* Ajustes para configuración de privacidad en móvil */
    .privacy-settings {
        top: 10px;
        right: 60px;
        width: 40px;
        height: 40px;
    }
    
    .privacy-settings i {
        font-size: 18px;
    }
    
    /* Ajuste para el popup de usuarios */
    .users-popup {
        top: 60px;
        right: 10px;
        width: calc(100% - 20px);
        height: 50vh;
        max-height: 50vh;
    }
    
    /* Asegurar que no haya desbordamiento horizontal */
    .conversation, .send-message, .user-list {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .conversation {
        padding: 3px;
        overflow-y: auto;
        height: 100%;
    }
    
    .message {
        max-width: 95%;
        word-break: break-word;
    }
    
    /* Ajustar el textarea para que no cause scroll */
    textarea {
        max-width: 100%;
        padding: 5px;
        font-size: 14px;
    }
    
    /* Ajustes para el reproductor Winamp en móvil */
    .winamp-container {
        position: fixed;
        bottom: 0;
        right: 0;
        width: 100%;
        height: 630px;
        z-index: 100;
        display: none;
        border-radius: 0;
        border: none;
    }
    
    .winamp-container.mobile-expanded {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        bottom: 0;
        right: 0;
        display: flex !important;
    }
    
    .winamp-toggle {
        display: flex !important;
        bottom: 10px;
        right: 10px;
        width: 50px;
        height: 50px;
    }
    
    /* Eliminar cualquier padding/margin que cause scroll */
    .bar__top, .bar__bottom, .chat-tabs {
        padding-left: 5px;
        padding-right: 5px;
    }
    
    .bar__top {
        padding: 8px 5px;
    }
    
    .bar__bottom {
        padding: 0 5px;
        height: 40px;
    }
    
    .action__button {
        font-size: 1.2rem;
        margin-right: 8px;
    }
    
    .messenger-title {
        font-size: 16px;
    }
    
    .username {
        font-size: 14px;
    }
    
    .mood {
        font-size: 0.8rem;
    }
    
    .user-item {
        padding: 8px;
        margin-bottom: 8px;
        font-size: 0.8rem;
    }
    
    /* Ajustar botones de envío */
    .send-message__button {
        font-size: 1.1rem;
        margin-right: 3px;
    }
    
    .buttons button {
        font-size: 0.9rem;
        padding: 6px;
    }
    
    /* Asegurar que los textos no desborden */
    .send-message__infos {
        font-size: 0.7em;
        white-space: normal;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* OCULTAR BURBUJAS EN MÓVIL Y TRANSFERIR FUNCIONES A LA BARRA */
    .sound-control,
    .privacy-settings,
    .users-toggle,
    .winamp-toggle {
        display: none !important;
    }
    
    /* Asegurar que los botones de la barra sean visibles */
    .bar__bottom {
        display: flex !important;
        overflow-x: auto;
        padding: 0 10px;
        height: 50px;
        align-items: center;
        position: relative;
    }
    
    .action__button {
        display: flex !important;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        height: 44px;
        font-size: 1.4rem;
        margin-right: 8px;
        flex-shrink: 0;
        position: relative;
    }
    
    /* Ajustar el contenedor principal para móvil */
    .msn-container {
        height: calc(100vh - 180px) !important;
        overflow: hidden;
    }
    
    /* Popups para móvil - posicionamiento relativo a los botones */
    .winamp-popup {
        bottom: 60px;
        right: 10px;
        width: 90%;
        max-width: 320px;
        height: 500px;
        max-height: 70vh;
    }
    
    .users-popup-mobile {
        bottom: 60px;
        right: 60px;
        width: 85%;
        max-width: 280px;
        height: 350px;
        max-height: 50vh;
    }

    /* Prevenir scroll cuando los popups están abiertos */
    body.popup-open {
        overflow: hidden;
    }

    /* MOSTRAR BOTONES DE MÚSICA EN MÓVIL */
    .music-buttons-container {
        display: flex !important;
        gap: 10px;
        margin-top: 10px;
        width: 100%;
    }
    
    .load-music-button, .clear-music-button {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 5px;
        font-size: 0.8rem;
        padding: 8px 12px;
        border-radius: 4px;
        cursor: pointer;
        flex: 1;
    }
    
    .file-input-container {
        display: flex !important;
        flex-direction: column;
        gap: 4px;
        margin: 10px 0 5px;
    }

    /* Ajustes para panel de admin en móvil */
    .admin-panel {
        width: 95%;
        max-height: 85vh;
    }

    .admin-stats {
        grid-template-columns: 1fr;
    }

    .report-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-actions {
        margin-top: 10px;
        width: 100%;
        justify-content: space-between;
    }
}

/* ESTILOS PARA TABLET */
@media (min-width: 769px) and (max-width: 1024px) {
    body {
        padding: 10px;
    }
    
    .container {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .window {
        width: 70%;
    }
    
    .winamp-container {
        width: 30%;
    }
    
    .winamp-toggle {
        display: flex !important;
    }
    
    .winamp-container {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 300px;
        height: 630px;
        z-index: 100;
        display: none;
    }
    
    .winamp-container.mobile-expanded {
        width: 70%;
        height: 90vh;
        bottom: 10px;
        right: 15%;
    }
}

@media (min-width: 1025px) {
    .winamp-toggle {
        display: none !important;
    }
    
    .winamp-container {
        display: flex !important;
    }
    
    .users-toggle {
        display: none !important;
    }
    
    .users-popup {
        display: none !important;
    }
    
    .winamp-popup,
    .users-popup-mobile {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .msn-container {
        grid-template-columns: 1fr;
    }
    
    .users-popup {
        width: 90%;
        right: 5%;
        left: 5%;
    }
    
    .users-toggle {
        right: 100px;
    }
    
    .sound-control {
        right: 10px;
    }
    
    .privacy-settings {
        right: 60px;
    }
    
    .user-list {
        font-size: 0.7rem;
    }
    
    .user-item {
        flex-wrap: wrap;
    }
    
    .user-actions {
        margin-left: 0;
        margin-top: 3px;
        width: 100%;
        justify-content: flex-end;
    }
    
    .winamp-popup {
        width: 95%;
        right: 2.5%;
        height: 450px;
    }
    
    .users-popup-mobile {
        width: 90%;
        right: 5%;
        height: 300px;
    }
}

/* Ajustes específicos para pantallas muy pequeñas */
@media (max-width: 380px) {
    .winamp-popup {
        height: 450px;
    }
    
    .users-popup-mobile {
        height: 280px;
    }
    
    .action__button {
        min-width: 40px;
        height: 40px;
        font-size: 1.2rem;
        margin-right: 5px;
    }
}

/* ESTILOS CORREGIDOS PARA LOS POPUPS - EVITAR QUE SE CIERREN AL INTERACTUAR */
.winamp-popup * {
    pointer-events: auto;
}

.winamp-popup input[type="range"],
.winamp-popup button,
.winamp-popup .winamp-track,
.winamp-popup .file-input,
.winamp-popup .load-music-button,
.winamp-popup .clear-music-button {
    pointer-events: auto !important;
}

/* Prevenir que los clics en los controles del Winamp cierren el popup */
.winamp-popup .winamp-button,
.winamp-popup .winamp-volume-slider,
.winamp-popup .winamp-progress,
.winamp-popup .winamp-track,
.winamp-popup .music-buttons-container button,
.winamp-popup .file-input-container {
    pointer-events: auto;
    z-index: 10;
    position: relative;
}

.users-popup-mobile *,
.users-popup * {
    pointer-events: auto;
}

.users-popup-mobile .user-item,
.users-popup-mobile .user-action-btn,
.users-popup .user-item,
.users-popup .user-action-btn {
    pointer-events: auto;
}
.code-validation-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.code-validation-container input {
    flex: 1;
}

.validate-code-button {
    background: #0078d7;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.validate-code-button:hover {
    background: #106ebe;
}

.validate-code-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.validation-message {
    padding: 8px;
    margin: 5px 0;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
}

.validation-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.validation-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.validation-message.info {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}