/* ========================================
   UNIFIED TABLET REGISTRATION INTERFACE
   ======================================== */

/* Tablet Logo in Header */
.tablet-logo {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -0.5px;
  color: #fff;
}

.tablet-logo .accent {
  color: var(--accent-lime);
}

/* AI Status moved to right */
.tablet-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

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

.register-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 40px 20px;
  position: relative;
  z-index: 10;
}

/* ========================================
   UNIFIED TABLET - STATIC FRAME
   ======================================== */

.unified-tablet {
  width: 100%;
  max-width: 1400px;
  background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
  border: 8px solid #0f0f0f;
  border-radius: 32px;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.05),
    0 40px 100px rgba(0, 0, 0, 0.8),
    inset 0 0 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  position: relative;
}

/* Tablet Header */
.tablet-header {
  background: rgba(10, 10, 10, 0.95);
  padding: 35px 30px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.tablet-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 25px;
  background: #000;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
  z-index: 100;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
}

.tablet-notch::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  background: #1a1a1a;
  border-radius: 50%;
}

.status-indicator {
  width: 10px;
  height: 10px;
  background: var(--accent-lime);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--accent-lime);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

.status-text {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}

.tablet-icons {
  display: flex;
  gap: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.tablet-icons .material-icons {
  font-size: 18px;
}

/* ========================================
   TABLET CONTENT - CHAT + FORM
   ======================================== */

.tablet-content {
  display: grid;
  grid-template-columns: 1fr 2px 1fr;
  min-height: 700px;
  background: #000;
}

/* ========================================
   LEFT SECTION - LIVE CHAT
   ======================================== */

.chat-section {
  padding: 30px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-header h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.live-badge {
  background: rgba(204, 255, 0, 0.15);
  color: var(--accent-lime);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1px;
  border: 1px solid rgba(204, 255, 0, 0.3);
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

/* Chat Messages */
.chat-messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  padding-right: 10px;
  max-height: 600px;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(204, 255, 0, 0.3);
  border-radius: 3px;
}

/* Message Bubble */
.message {
  display: flex;
  gap: 12px;
  opacity: 0;
  transform: translateY(20px);
  animation: messageSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

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

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

/* Avatar - Telegram Style */
.message-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
}

.message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-letter {
  font-family: var(--font-display);
  font-weight: 700;
}

/* Message Content */
.message-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-width: 75%;
}

.message-name {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
}

.message-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.message-lead .message-bubble {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-top-left-radius: 2px;
}

.message-ai .message-bubble {
  background: #2b5278;
  color: #fff;
  border-top-right-radius: 2px;
}

.message-time {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.3);
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 0;
  opacity: 0;
  transition: opacity 0.3s;
}

.typing-indicator.active {
  opacity: 1;
}

.typing-dots {
  display: flex;
  gap: 5px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 14px;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  background: rgba(204, 255, 0, 0.6);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite;
}

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

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

@keyframes typingBounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
  }

  30% {
    transform: translateY(-8px);
  }
}

.typing-text {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
}

/* ========================================
   VERTICAL DIVIDER
   ======================================== */

.vertical-divider {
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(204, 255, 0, 0.2) 50%,
    transparent 100%
  );
  position: relative;
}

.vertical-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: var(--accent-lime);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--accent-lime);
}

/* ========================================
   RIGHT SECTION - REGISTRATION FORM
   ======================================== */

.form-section {
  padding: 30px 35px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(204, 255, 0, 0.3) transparent;
}

.form-section::-webkit-scrollbar {
  width: 6px;
}

.form-section::-webkit-scrollbar-track {
  background: transparent;
}

.form-section::-webkit-scrollbar-thumb {
  background: rgba(204, 255, 0, 0.3);
  border-radius: 3px;
}

.form-header {
  text-align: center;
  margin-bottom: 30px;
}

.form-header h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.form-header p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  margin: 0;
}

/* Avatar Upload */
.avatar-upload-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 25px;
}

.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px dashed rgba(204, 255, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  overflow: hidden;
}

.avatar-preview:hover {
  border-color: var(--accent-lime);
  background: rgba(204, 255, 0, 0.1);
  transform: scale(1.05);
}

.avatar-preview .material-icons {
  font-size: 40px;
  color: rgba(255, 255, 255, 0.3);
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-upload-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--accent-lime);
  cursor: pointer;
  transition: all 0.3s;
}

.avatar-upload-label:hover {
  opacity: 0.8;
}

.avatar-upload-label .material-icons {
  font-size: 16px;
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

.form-label .material-icons {
  font-size: 16px;
  color: var(--accent-lime);
}

.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 14px;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  transition: all 0.3s;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-lime);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 15px rgba(204, 255, 0, 0.15);
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* Password Wrapper */
.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: color 0.3s;
  padding: 5px;
}

.password-toggle:hover {
  color: var(--accent-lime);
}

.password-toggle .material-icons {
  font-size: 18px;
}

/* Captcha */
.captcha-section {
  margin-bottom: 20px;
}

.captcha-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s;
}

.captcha-box:hover {
  border-color: rgba(204, 255, 0, 0.3);
}

#captchaCheck {
  display: none;
}

#captchaCheck + label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  flex: 1;
}

.captcha-checkmark {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

#captchaCheck:checked + label .captcha-checkmark {
  background: var(--accent-lime);
  border-color: var(--accent-lime);
}

#captchaCheck:checked + label .captcha-checkmark::after {
  content: "✓";
  color: #000;
  font-weight: bold;
  font-size: 16px;
}

.captcha-text {
  color: #fff;
  font-size: 0.85rem;
}

.captcha-logo {
  color: rgba(255, 255, 255, 0.3);
}

.captcha-logo .material-icons {
  font-size: 28px;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  background: var(--accent-lime);
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 16px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  margin-bottom: 15px;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(204, 255, 0, 0.4);
}

.btn-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
}

.submit-btn:hover .btn-glow {
  width: 300px;
  height: 300px;
}

.btn-text {
  position: relative;
  z-index: 1;
}

/* Cancel Button */
.cancel-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 14px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s;
  margin-bottom: 15px;
}

.cancel-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  transform: translateY(-1px);
}

.cancel-btn .material-icons {
  font-size: 18px;
}

/* Form Footer */
.form-footer {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.8rem;
}

.form-footer a {
  color: var(--accent-lime);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.form-footer a:hover {
  color: #fff;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1200px) {
  .tablet-content {
    grid-template-columns: 1fr;
    grid-template-rows: auto 2px auto;
  }

  .vertical-divider {
    height: 2px;
    background: linear-gradient(
      to right,
      transparent 0%,
      rgba(204, 255, 0, 0.2) 50%,
      transparent 100%
    );
  }

  .vertical-divider::before {
    top: 50%;
    left: 50%;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .register-container {
    padding: 20px 10px;
  }

  .unified-tablet {
    border-width: 4px;
    border-radius: 20px;
  }

  .tablet-header {
    padding: 25px 20px 10px;
  }

  /* Keep chat visible on mobile */
  .chat-section {
    padding: 20px;
    min-height: 300px;
  }

  .form-section {
    padding: 20px;
  }

  .form-header h2 {
    font-size: 1.5rem;
  }

  /* Stack vertically on mobile */
  .tablet-content {
    grid-template-columns: 1fr;
    grid-template-rows: auto 2px auto;
  }
}
