/* Estilos generales */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    margin: 0;
    padding: 20px;
    display: flex;
    /* --- LÍNEA AÑADIDA --- */
    flex-direction: column; /* Apila los elementos verticalmente */
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
}

/* Estilos genéricos para los modales/overlays */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}
.modal-content {
    background-color: #1e1e1e;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #333;
    width: 90%;
    max-width: 400px;
}
.modal-content h2 {
    color: #00ff9d;
    margin-top: 0;
}
.modal-content p {
    margin-bottom: 20px;
}
#password-input {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 15px;
}
#password-error {
    color: #ff8c5a;
    font-size: 14px;
    margin-top: 10px;
}

/* Estilos para mostrar la contraseña */
#password-display-container {
    margin-top: 20px;
}
.password-box {
    background-color: #333;
    border: 1px dashed #555;
    padding: 15px;
    margin-top: 10px;
    border-radius: 8px;
}
#room-password {
    font-size: 20px;
    font-weight: bold;
    color: #00ff9d;
    letter-spacing: 2px;
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 0;
    text-align: center;
}

header h1 {
    color: #00ff9d;
}

.hidden {
    display: none !important;
}

button {
    background-color: #00ff9d;
    color: #121212;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #4affb9;
}

input[type="text"] {
    background-color: #333;
    border: 1px solid #555;
    color: #e0e0e0;
    padding: 10px;
    font-size: 16px;
    width: 70%;
}

.link-container {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

#chat-messages {
    background-color: #1e1e1e;
    border: 1px solid #333;
    height: 300px;
    overflow-y: scroll;
    padding: 10px;
    margin-bottom: 10px;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.message-input-container {
    display: flex;
}

#message-input {
    flex-grow: 1;
}

.status {
    font-size: 12px;
    color: #888;
    margin-top: 15px;
}

.message {
    padding: 8px 12px;
    border-radius: 18px;
    margin-bottom: 8px;
    max-width: 70%;
    word-wrap: break-word;
    overflow: hidden; 
    line-height: 1.4; 
}

.message.own {
    background-color: #00ff9d;
    color: #121212;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.message.other {
    background-color: #3a3a3a;
    color: #e0e0e0;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.system-message {
    text-align: center;
    color: #888;
    font-style: italic;
}

.warning-box {
    background-color: #442c21;
    border: 1px solid #ff8c5a;
    color: #ffd8c5;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: left;
}
.warning-box p {
    margin: 0;
}