/* ===== RESET ===== */
html, body{
    width: 100%;
    height: 100%;
}

*{
    box-sizing:border-box;
    margin:0;
    padding:0;
  }
  
  body{
    font-family: Arial, Helvetica, sans-serif;
    background:#f5f5f5;
    color:#111;
    -webkit-font-smoothing: antialiased;
  }
  
  a{
    text-decoration:none;
    color:inherit;
  }
  
  /* ===== GENERAL CONTAINERS ===== */
  
  .center-screen{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding-bottom:40px;          /* baja un poco */
    padding-left:20px;
    padding-right:20px;
  }
  
  /* ===== LOGIN PAGE ===== */
  
  .login-box{
    width:100%;
    max-width:360px;        /* más estrecho en desktop */
    background:white;
    padding:28px 26px;
    border-radius:22px;
    box-shadow:0 15px 40px rgba(0,0,0,.12);
    text-align:center;
  }
  
  .login-box h2{
    margin-bottom:6px;
  }
  
  .login-box p{
    color:#777;
    margin-bottom:18px;
  }
  
  .login-box a{
    color:#444;
    margin-top:12px;
    display:block;
  }
  
  /* ===== INPUTS & BUTTONS ===== */
  
  input, textarea{
    width:100%;
    padding:12px;
    margin:10px 0;
    border-radius:12px;
    border:1px solid #ddd;
    font-size:15px;
  }
  
  textarea{
    min-height:90px;
    resize:none;
  }
  
  button{
    width:100%;
    padding:12px;
    border:none;
    border-radius:20px;
    background:black;
    color:white;
    font-size:16px;
    cursor:pointer;
    transition:.2s;
  }
  
  .button:hover{
    opacity:.85;
  }

  .button{
    width:100%;
    padding:12px;
    border:none;
    border-radius:20px;
    background:black;
    color:white;
    font-size:16px;
    cursor:pointer;
    transition:.2s;
  }
  
  button:hover{
    opacity:.85;
  }
  
  /* ===== NAV ===== */
  nav{
    position:fixed;
    top:12px;
    right:12px;
    font-size:14px;
  }
  
  nav a{
    padding:8px 12px;
    background:black;
    color:white;
    border-radius:14px;
  }
  
  /* ===== HOME PAGE ===== */
  
  .wrapper{
    max-width:420px;
    margin:auto;
    text-align:center;
    padding:20px;
    min-height:100vh;
    display:flex;
    flex-direction:column;
    justify-content:center;
  }
  
  .wrapper h3{
    color:#777;
    font-weight:500;
  }
  
  .wrapper h1{
    font-size:14px;
    margin:18px 0;
    line-height:1;
    font-weight: normal;
  }

  .chat{
    text-align: start;
  }
  

  .chat h1{
    font-size:14px;
    margin:18px 0;
    line-height:1;
    font-weight: normal;
  }

  .chat h3{
    font-size: 14px;
  }

  .chat-footer{
    background: #fff;
    padding: 20px;
    border-radius: 28px; 
    text-align: center;
  }

  .events-button{
    background: #fff;
    padding: 20px;
    border-radius: 28px;
    text-align: center;
  }

  .events-button a{
    color: #227dc7;
  }

  #uploadSection {
    text-align: center;
  }
  
  button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

  .upload-box {
    position: relative;
    width: 130px;
    height: 130px;
    border-radius: 28px;
    background: #f2f2f2;
    margin: 25px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 12px 25px rgba(0,0,0,.12);
    font-size: 34px;
    overflow: hidden;
    transition: background 0.3s;
}

.upload-box input {
    display: none;
}

.upload-box::before {
    content: '';
    position: absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 0;
}

.upload-box.has-bg::before {
    opacity: 1;
    background-image: var(--bg-url);
}

.upload-box span {
    position: relative;
    z-index: 1;
}
  
  .primary-btn{
    margin-top:5px;
  }
  
  footer{
    color:#999;
    margin-top:10px;
  }
  
  /* ===== RECURSOS PAGE ===== */
  
  header{
    background:black;
    color:white;
    text-align:center;
    padding:20px;
  }
  
  .container{
    max-width:720px;
    margin:20px auto;
    padding:10px 15px;
  }
  
  .resource{
    background:white;
    padding:15px;
    border-radius:16px;
    margin-top:12px;
    box-shadow:0 5px 12px rgba(0,0,0,.06);
  }
  
  .resource h4{
    margin-bottom:5px;
  }

  #joinWaitlist{
    padding: 50px;
  }
  
  /* ===== MOBILE OPTIMIZATION ===== */
  
  @media(max-width:480px){

    .center-screen{
      min-height:100vh;
      align-items:stretch;   /* ocupa toda la altura */
      padding:0;             /* sin márgenes */
    }
  
    .login-box{
      max-width:none;
      width:100%;
      height:100vh;          /* pantalla completa */
      border-radius:0;       /* sin esquinas */
      box-shadow:none;       /* sin sombra */
      padding:28px 20px;     /* márgenes internos */
      display:flex;
      flex-direction:column;
      justify-content:center;  /* contenido centrado vertical */
    }
  }

  #chatContainer {
    width: 100%;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px;
}

#eventsContainer {
  width: 100%;
  margin: 20px auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 10px;
}

.waiting-box {
  padding: 20px;
  text-align: center;
  max-width: 420px;
  font-size: 1.1em;
  color: #555;
}

.event-card {
  position: relative;
  border-radius: 16px;
  background: #00000015;
  cursor: pointer;
  transition: all 0.3s;
  align-items: center;
  justify-content: start;
  padding: 15px;
}

.letter-card {
    position: relative;
    height: 75px;
    border-radius: 16px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.letter-card .overlay {
    position: absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background: rgba(0,0,0,0.65);
    color: white;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, border 0.3s;
}

.letter-card:hover .overlay {
    border: 2px solid #fff;
    background: rgba(0,0,0,0.8);
}

.main-text {
    font-size: 18px;
    font-weight: bold;
}

.small-text {
    font-size: 12px;
    margin-top: 5px;
}

.small-text-date {
  font-size: 11px;
  margin-top: 5px;
  color: #777;
}

.small-text-people {
  font-size: 11px;
  margin-top: 5px;
  padding: 4px;
  background: #04984e;
  border-radius: 6px;
  color: #fff;
}

/* Modal completo oculto por defecto */
.modal {
    display: none; /* oculto por defecto */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
    
    /* para cuando se muestre */
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  
  
  .modal-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    animation: zoom 0.3s;
  }
  
  /* Animación de zoom */
  @keyframes zoom {
    from {transform: scale(0.7);}
    to {transform: scale(1);}
  }
  
  /* Botón cerrar */
  .close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
  }
  .close:hover {
    color: #bbb;
  }