/* ===== Base Styles ===== */
:root {
    --primary-bg: #1a1a1a;
    --secondary-bg: #262626;
    --accent-color: #e91e63;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --online-status: #4caf50;
    --typing-status: #ff9800;
    --message-sent: #e91e63;
    --message-received: #333333;
    --input-bg: #333333;
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
  }
  
  html, body {
    height: 100%;
    background: var(--primary-bg);
    color: var(--text-primary);
    -webkit-tap-highlight-color: transparent;
  }
  
  /* ===== Login Overlay ===== */
  .login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
  }
  
  .login-container {
    background: var(--secondary-bg);
    padding: 2rem;
    border-radius: 1rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  
  .login-form .form-group {
    margin-bottom: 1.5rem;
  }
  
  .login-form input {
    width: 100%;
    padding: 0.8rem;
    background: var(--input-bg);
    border: none;
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
  }
  
  .login-button {
    width: 100%;
    padding: 0.8rem;
    background: var(--accent-color);
    border: none;
    border-radius: 0.5rem;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
  }
  
  .login-button:active {
    opacity: 0.8;
  }
  
  .login-error {
    color: #ff4444;
    font-size: 0.9rem;
    margin-top: 1rem;
    text-align: center;
  }
  
  /* ===== Chat Container ===== */
  .chat-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--primary-bg);
  }
  
  .chat-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px ;
    background: var(--secondary-bg);
    border-bottom: 1px solid #333;
height: 36px;
  }
  

  .chat-title {
    font-size: 1.2rem;
    font-weight: 600;
  }
  
  .partner-status {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
  }
  
  .partner-status.online {
    color: var(--online-status);
  }
  
  .partner-status.typing {
    color: var(--typing-status);
  }
  
  .logout-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    padding: 0.5rem;
    cursor: pointer;
  }
  
  /* ===== Messages Container ===== */
  .messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    scroll-behavior: smooth;
    margin-bottom:3rem ;
  }
  
  .messages {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;

    padding-bottom: 1rem;
  }
  
  .message-container {
    max-width: 80%;
    align-self: flex-start;
  }
  
  .message-container.sent {
    
    align-self: flex-end;
  }
  .message-container.sent .message {
    background: linear-gradient(135deg, #ea3036, #9500ff);
    color: white;
  }
  
  .message {
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    background: var(--message-received);
    position: relative;
    word-break: break-word;
  }
  
  .message.sent {
    background: var(--message-sent);
    color: white;
  }
  
  .message-time {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.25rem;
    text-align: right;
  }
  
  /* ===== Input Area ===== */
  .input-area {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0 .5rem;
    background: var(--secondary-bg);
    border-top: 1px solid #333;
  }
  
  .input-group {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
  }
  
  .file-upload-label {
    display: flex;
    padding: 0.5rem;
    cursor: pointer;
  }
  
  .attachment-icon {
    font-size: 1.2rem;
  }
  
  textarea#messageInput {
    flex: 1;
    background: var(--input-bg);
    border: none;
    border-radius: .5rem;
    padding: 0.8rem;
    color: var(--text-primary);
    resize: none;
    max-height: 120px;
    font-size: 1rem;
  }
  
  .send-button {
    background: var(--accent-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s;
  }
  
  .send-button:active {
    opacity: 0.8;
  }
  
  /* ===== Media Elements ===== */
  .media-preview-container {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
    overflow-x: auto;
  }
  
  .media-preview-item {
    position: relative;
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 0.5rem;
    overflow: hidden;
  }
  
  .preview-image,
  .preview-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .remove-preview {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.7rem;
    cursor: pointer;
  }
  
  .upload-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px;
  }
  
  .progress-bar {
    height: 3px;
    background: var(--accent-color);
    transition: width 0.3s ease;
  }
  
  /* ===== Animations & States ===== */
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  .message-container {
    animation: fadeIn 0.3s ease;
  }
  
  .new-messages-indicator {
    position: sticky;
    bottom: 1rem;
    background: var(--accent-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    text-align: center;
    margin: 0 auto;
    display: none;
  }
  
  /* ===== Media Queries ===== */
  @media (min-width: 768px) {
    .chat-container {
      max-width: 600px;
      margin: 0 auto;
      border-left: 1px solid #333;
      border-right: 1px solid #333;
    }
  
    .messages-container {
      padding: 1.5rem;
    }
  
    .message-container {
      max-width: 70%;                                                                                                                                                       
    }
  }
  
  @media (min-width: 1024px) {
    .chat-container {
      max-width: 800px;
    }
  }

  /* Hide scrollbar but keep scrolling functionality */
.messages-container {
    flex-grow: 1;
    padding: 10px;
    background-color: #181818;
    overflow-y: scroll; /* Ensure scrolling works */
    -ms-overflow-style: none; /* Hide scrollbar for IE and Edge */
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}

/* Hide scrollbar for WebKit browsers (Chrome, Safari) */
.messages-container::-webkit-scrollbar {
    display: none;
}
.login-title{
    text-align: center;
    margin-bottom: 2rem;
}
