/* CSS Variables for A/B Testing */
:root {
  --accent-color: #00ff88;
  --accent-hover: #00cc66;
}

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

/* Body Styling */
body {
  font-family: 'Inter', sans-serif;
  background-color: #1a1a1a;
  color: #ffffff;
  height: 100vh;
  overflow: hidden;
}

/* Chat Container */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 800px;
  margin: 0 auto;
  background-color: #1a1a1a;
}

/* Chat Header */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-bottom: 1px solid #333;
  background-color: #1a1a1a;
  position: relative;
  text-align: center;
}

.header-logo {
  width: 40px;
  height: 40px;
  margin-right: 16px;
  flex-shrink: 0;
}

.header-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-header h1 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.platform-list {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.platform {
  font-size: 0.85rem;
  color: #999;
  font-weight: 500;
}

.platform-link {
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.platform-link:hover {
  color: var(--accent-color);
}

/* Conversation Selector */
.conversation-selector {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 24px 16px;
  background-color: #1a1a1a;
  border-bottom: 1px solid #333;
}

.conversation-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.6;
}

.conversation-bubble:hover {
  opacity: 0.9;
}

.conversation-bubble.active {
  opacity: 1;
}

.group-avatar {
  position: relative;
  width: 60px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-circle {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  border: 2px solid #1a1a1a;
  transition: all 0.2s ease;
}

.conversation-bubble.active .avatar-circle {
  background-color: var(--accent-color);
  color: #1a1a1a;
}

.conversation-name {
  font-size: 0.85rem;
  color: #888;
  font-weight: 500;
  text-align: center;
  transition: color 0.2s ease;
}

.conversation-bubble.active .conversation-name {
  color: #ffffff;
}

/* Chat Messages Area */
.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Conversation transitions */
.conversation {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Message Styling */
.message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 70%;
  margin-bottom: 12px;
}

.message.received {
  align-self: flex-start;
}

.message.sent {
  align-self: flex-end;
  flex-direction: row-reverse;
}

/* Message Avatar */
.message-avatar {
  flex-shrink: 0;
  margin-top: 2px;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: #2a2a2a;
  padding: 2px;
}

.user-avatar {
  background-color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: #ffffff;
  padding: 0;
}

/* Message Content */
.message-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.message-text {
  padding: 8px 12px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.4;
  word-wrap: break-word;
  max-width: 100%;
}

.message.received .message-text {
  background-color: #2a2a2a;
  color: #ffffff;
  border-bottom-left-radius: 4px;
}

.message.sent .message-text {
  background-color: #007AFF;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.message-sender {
  font-size: 0.7rem;
  color: #888;
  margin: 0 12px;
  font-weight: 500;
}

.message.received .message-sender {
  text-align: left;
}

.message.sent .message-sender {
  text-align: right;
}

/* Links in chat messages */
.message-text a {
  color: var(--accent-color);
  text-decoration: underline;
  cursor: pointer;
}

.message-text a:hover {
  color: var(--accent-hover);
}

/* Image messages */
.message-image {
  max-width: 70px;
  border-radius: 4px;
  margin: 2px 0;
  display: block;
}

/* @mentions in chat messages */
.message-text .mention {
  color: #007AFF;
  font-weight: 600;
  background-color: rgba(0, 122, 255, 0.1);
  padding: 1px 4px;
  border-radius: 3px;
}

/* Chat Input Bar */
.chat-input-bar {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-top: 1px solid #333;
  background-color: #1a1a1a;
  gap: 12px;
}

.chat-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #333;
  border-radius: 24px;
  background-color: #2a2a2a;
  color: #ffffff;
  font-size: 1rem;
  outline: none;
  font-family: 'Inter', sans-serif;
}

.chat-input::placeholder {
  color: #999;
}

.chat-input:focus {
  border-color: var(--accent-color);
}

.send-button {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background-color: var(--accent-color);
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 1rem;
}

.send-button:hover {
  background-color: var(--accent-hover);
}

.send-button:active {
  transform: scale(0.95);
}

/* CTA Modal Styling */
.cta-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.cta-modal {
  background-color: #1a1a1a;
  border-radius: 20px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  border: 1px solid #333;
  position: relative;
}

.cta-content {
  padding: 40px;
  text-align: center;
}

.cta-logo {
  width: 60px;
  height: 60px;
  margin-bottom: 20px;
}

.cta-content h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 12px;
}

.cta-content p {
  font-size: 1rem;
  color: #ccc;
  margin-bottom: 30px;
  line-height: 1.5;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cta-button {
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.cta-button.signal {
  background-color: #3A76F0;
  color: #ffffff;
}

.cta-button.signal:hover {
  background-color: #2868E6;
}

.cta-button.imessage {
  background-color: #007AFF;
  color: #ffffff;
}

.cta-button.imessage:hover {
  background-color: #0056CC;
}

.cta-button.telegram {
  background-color: #0088CC;
  color: #ffffff;
}

.cta-button.telegram:hover {
  background-color: #006699;
}

.close-button {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-button:hover {
  color: #ffffff;
}

/* Waitlist Form Styling */
.waitlist-form {
  padding: 40px;
  text-align: center;
}

.waitlist-form h2 {
  margin-bottom: 8px;
}

.waitlist-form p {
  margin-bottom: 24px;
}

.back-button {
  position: absolute;
  top: 20px;
  left: 20px;
  background: none;
  border: none;
  color: #999;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.back-button:hover {
  color: #ffffff;
  background-color: #333;
}

.waitlist-form form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 300px;
  margin: 0 auto;
}

.waitlist-form input[type="email"] {
  padding: 14px 16px;
  border: 1px solid #333;
  border-radius: 12px;
  background-color: #2a2a2a;
  color: #ffffff;
  font-size: 1rem;
  outline: none;
  font-family: 'Inter', sans-serif;
}

.waitlist-form input[type="email"]:focus {
  border-color: var(--accent-color);
}

.waitlist-form input[type="email"]::placeholder {
  color: #999;
}

.submit-button {
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  background-color: var(--accent-color);
  color: #1a1a1a;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.submit-button:hover {
  background-color: var(--accent-hover);
}

.submit-button:active {
  transform: scale(0.98);
}

/* Success Message Styling */
.success-message {
  padding: 40px;
  text-align: center;
}

.success-message h2 {
  color: var(--accent-color);
  margin-bottom: 8px;
}

.success-message p {
  color: #ccc;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .chat-messages {
    padding: 16px;
  }
  
  .message {
    max-width: 90%;
  }
  
  .chat-header {
    padding: 16px;
  }
  
  .chat-header h1 {
    font-size: 1.5rem;
  }
  
  .header-logo {
    width: 36px;
    height: 36px;
  }
  
  .cta-content {
    padding: 30px 20px;
  }
  
  .cta-content h2 {
    font-size: 1.5rem;
  }
  
  .conversation-selector {
    gap: 16px;
    padding: 16px 8px;
  }
  
  .group-avatar {
    width: 50px;
    height: 35px;
  }
  
  .avatar-circle {
    width: 35px;
    height: 35px;
    font-size: 0.7rem;
  }
  
  .avatar-circle:nth-child(2) {
    left: 15px;
  }
  
  .conversation-name {
    font-size: 0.75rem;
  }
}