/* ============================================
   reopenai.net — Domain Ad Page Styles
   ============================================ */

:root {
  --bg-start: #0f0c29;
  --bg-mid: #302b63;
  --bg-end: #24243e;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --text-primary: #f0f0f5;
  --text-secondary: rgba(255, 255, 255, 0.55);
  --accent-blue: #007aff;
  --accent-green: #30d158;
  --bubble-sent: #007aff;
  --bubble-received: rgba(255, 255, 255, 0.12);
  --sidebar-bg: rgba(0, 0, 0, 0.45);
  --chat-bg: rgba(0, 0, 0, 0.25);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: linear-gradient(135deg, var(--bg-start), var(--bg-mid), var(--bg-end));
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* ---------- Top Bar ---------- */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: rgba(15, 12, 41, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

.domain-badge {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.3px;
}

.cta-btn {
  display: inline-block;
  padding: 10px 24px;
  background: linear-gradient(135deg, #007aff, #5856d6);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border-radius: 100px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 122, 255, 0.35);
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 140px 24px 40px;
  max-width: 700px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, #00c6ff, #0072ff, #7b2ff7, #ff6ec4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto;
}

/* Email Copy Badge */
.email-copy-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  user-select: none;
}

.email-copy-badge:hover {
  background: rgba(0, 122, 255, 0.15);
  border-color: rgba(0, 122, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 122, 255, 0.2);
}

.email-copy-badge:active {
  transform: translateY(0);
}

.email-icon {
  font-size: 20px;
}

.email-text {
  font-size: 16px;
  color: var(--text-primary);
}

.email-text strong {
  color: #fff;
}

.copy-hint {
  font-size: 12px;
  color: var(--accent-blue);
  background: rgba(0, 122, 255, 0.15);
  padding: 3px 10px;
  border-radius: 100px;
  font-weight: 600;
  transition: all 0.25s ease;
}

.email-copy-badge.copied .copy-hint {
  background: rgba(48, 209, 88, 0.2);
  color: var(--accent-green);
}

/* ---------- Phone Frame ---------- */
.phone-frame {
  position: relative;
  max-width: 920px;
  margin: 40px auto 60px;
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 4px 60px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(0, 114, 255, 0.08);
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Status bar */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  font-size: 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--glass-border);
}

.status-icons {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ---------- Messages App ---------- */
.messages-app {
  display: flex;
  height: 560px;
}

/* Sidebar */
.sidebar {
  width: 320px;
  min-width: 320px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 8px;
}

.sidebar-header h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.edit-btn {
  font-size: 14px;
  color: var(--accent-blue);
  cursor: pointer;
}

.compose-btn {
  font-size: 18px;
  cursor: pointer;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 16px 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.search-bar input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
}

.contact-list {
  flex: 1;
  overflow-y: auto;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.contact-item.active {
  background: rgba(0, 122, 255, 0.18);
}

.contact-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent-blue);
  border-radius: 0 3px 3px 0;
}

/* Avatars */
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
  position: relative;
}

.avatar .unread-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  background: var(--accent-blue);
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.5);
}

.contact-info {
  flex: 1;
  min-width: 0;
}

.contact-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 2px;
}

.contact-preview {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-time {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.contact-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.chevron {
  color: rgba(255, 255, 255, 0.15);
  font-size: 12px;
}

/* ---------- Chat Area ---------- */
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--chat-bg);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--glass-border);
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

.chat-header-name {
  font-weight: 700;
  font-size: 16px;
}

.chat-header-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Bubbles */
.msg {
  max-width: 72%;
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 15px;
  line-height: 1.45;
  animation: fadeSlideIn 0.35s ease both;
  position: relative;
}

.msg.sent {
  align-self: flex-end;
  background: var(--bubble-sent);
  color: #fff;
  border-bottom-right-radius: 6px;
}

.msg.received {
  align-self: flex-start;
  background: var(--bubble-received);
  color: var(--text-primary);
  border-bottom-left-radius: 6px;
}

.msg-time {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 4px;
  text-align: right;
}

.msg.received .msg-time {
  text-align: left;
}

.msg .emoji-big {
  font-size: 36px;
  line-height: 1;
}

/* Date Separator */
.date-sep {
  text-align: center;
  font-size: 11px;
  color: var(--text-secondary);
  padding: 10px 0 4px;
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  align-self: flex-start;
  padding: 12px 18px;
  background: var(--bubble-received);
  border-radius: 20px;
  border-bottom-left-radius: 6px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingBounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }

  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Chat input bar */
.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--glass-border);
}

.input-accessories {
  display: flex;
  gap: 8px;
  font-size: 18px;
  opacity: 0.5;
}

.fake-input {
  flex: 1;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.send-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

/* ---------- Bottom CTA ---------- */
.bottom-cta {
  text-align: center;
  padding: 60px 24px 40px;
}

.bottom-cta h2 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.bottom-cta p {
  font-size: 18px;
  color: var(--text-secondary);
}

.bottom-cta a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
}

.bottom-cta a:hover {
  text-decoration: underline;
}

.fine-print {
  margin-top: 8px;
  font-size: 14px !important;
  opacity: 0.5;
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: var(--text-secondary);
  border-top: 1px solid var(--glass-border);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .phone-frame {
    margin: 30px 12px 50px;
    border-radius: var(--radius-md);
  }

  .messages-app {
    flex-direction: column;
    height: auto;
  }

  .sidebar {
    width: 100%;
    min-width: 100%;
    max-height: 260px;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
  }

  .chat-area {
    height: 400px;
  }

  .top-bar {
    padding: 12px 16px;
  }

  .cta-btn {
    padding: 8px 18px;
    font-size: 13px;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Reactions */
.msg-reaction {
  position: absolute;
  bottom: -10px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 12px;
  padding: 2px 6px;
  font-size: 14px;
  border: 1px solid var(--glass-border);
}

.msg.received .msg-reaction {
  right: auto;
  left: 8px;
}