/* FekoYaha - Modern Dark Theme */

:root {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #111111;
  --bg-glass: rgba(0, 0, 0, 0.85);
  --bg-glass-light: rgba(20, 20, 20, 0.7);

  --text-primary: #ffffff;
  --text-secondary: #a0e0e0;
  --text-muted: #508080;

  --accent-primary: #00d4d4;
  --accent-secondary: #00ffff;
  --accent-glow: rgba(0, 212, 212, 0.4);

  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;

  --border-color: rgba(0, 212, 212, 0.15);
  --border-hover: rgba(0, 255, 255, 0.25);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 40px var(--accent-glow);

  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html,
body {
  height: 100%;
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ===== HOMEPAGE ===== */
.homepage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-color: #000;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(0, 212, 212, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(0, 100, 255, 0.1) 0%, transparent 40%);
  animation: bgPulse 8s ease-in-out infinite alternate;
}

@keyframes bgPulse {
  0% {
    background-position: 0% 0%;
  }

  100% {
    background-position: 50% 50%;
    opacity: 0.9;
  }
}

.stars-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background: transparent url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/1231630/stars.png') repeat;
  opacity: 0.3;
  z-index: 1;
  animation: starDrift 60s linear infinite;
}

@keyframes starDrift {
  from {
    transform: translate(0, 0);
  }

  to {
    transform: translate(-50%, -50%);
  }
}

.glass-card {
  position: relative;
  z-index: 10;
  width: 90%;
  max-width: 800px;
  background: rgba(10, 15, 15, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(0, 212, 212, 0.2);
  border-radius: 40px;
  padding: 4rem 2rem;
  box-shadow:
    0 0 80px rgba(0, 0, 0, 0.5),
    inset 0 0 20px rgba(0, 212, 212, 0.05);
  text-align: center;
}

.hero {
  max-width: 600px;
  margin: 0 auto;
}

.logo {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 0rem;
}

.logo-img {
  width: 150px;
  height: 150px;
  filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.6));
  animation: float 4s ease-in-out infinite;
}

.brand-title {
  position: relative;
  margin-top: 0.5rem;
  /* Small gap instead of overlap */
  z-index: 10;
  font-size: 3.5rem;
  font-weight: 700;
  color: #00e5e5;
  letter-spacing: -1px;
}

.main-headline {
  margin-top: -0.5rem;
  /* Squeeze more */
  font-size: 2.2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}

.tagline {
  font-size: 1.15rem;
  color: #a0a4a8;
  line-height: 1.6;
  margin-bottom: 3.5rem;
}

.room-form {
  margin-bottom: 3.5rem;
  position: relative;
}

.input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1.5px solid rgba(0, 212, 212, 0.4);
  border-radius: 50px;
  padding: 8px 8px 8px 24px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 20px rgba(0, 212, 212, 0.1);
}

.input-wrapper:focus-within {
  border-color: #00e5e5;
  box-shadow: 0 0 30px rgba(0, 229, 229, 0.3);
  transform: scale(1.02);
}

.input-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 1.1rem;
  padding: 12px 0;
  font-family: inherit;
}

.input-wrapper input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.pill-btn {
  width: 80px;
  height: 48px;
  background: linear-gradient(135deg, #00c9ff, #92fec7);
  border: none;
  border-radius: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(0, 201, 255, 0.4);
}

.pill-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(0, 201, 255, 0.6);
}

.features-grid {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.feature-item:hover {
  color: #00e5e5;
}

.feature-item svg {
  color: #00e5e5;
  opacity: 0.8;
}

.footer-note {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
}

.footer-note p {
  margin-bottom: 1.5rem;
}

.credits {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.credits strong {
  color: #00e5e5;
  font-weight: 600;
}

@keyframes float {

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

  50% {
    transform: translateY(-10px);
  }
}

.logo-svg {
  animation: float 4s ease-in-out infinite;
}

@media (max-width: 600px) {
  .glass-card {
    padding: 2.5rem 1.25rem;
    border-radius: 30px;
    width: 95%;
  }

  .brand-title {
    font-size: 2.5rem;
  }

  .main-headline {
    font-size: 1.6rem;
  }

  .tagline {
    font-size: 1rem;
    margin-bottom: 2.5rem;
  }

  .input-wrapper {
    padding: 6px 6px 6px 16px;
  }

  .input-wrapper input {
    font-size: 0.95rem;
  }

  .pill-btn {
    width: 60px;
    height: 44px;
  }

  .features-grid {
    gap: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    text-align: left;
    margin-bottom: 3rem;
  }

  .feature-item {
    font-size: 0.85rem;
    gap: 0.5rem;
  }

  .footer-note p {
    font-size: 0.8rem;
  }
}

/* ===== ROOM PAGE ===== */
.room-page {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at center, #0a0a0a 0%, #000000 100%);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.room-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

/* Room Header */
.room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  z-index: 100;
}

.room-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.back-btn:hover {
  background: var(--bg-glass-light);
  color: var(--text-primary);
}

.room-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.room-icon {
  font-size: 1.25rem;
}

.room-title h1 {
  font-size: 1.25rem;
  font-weight: 600;
}

.room-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.action-btn:hover {
  background: var(--bg-glass-light);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.users-count {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.users-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }

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

.modal-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.modal h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.modal p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.modal input {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.875rem 1rem;
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 1rem;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.modal input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn {
  padding: 0.875rem 2rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* Messages Area */
.messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  scrollbar-gutter: stable;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: min-content;
}

.message {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  animation: messageIn 0.3s ease;
}

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

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

.message:hover {
  background: var(--bg-tertiary);
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.message-content {
  flex: 1;
  min-width: 0;
}

.message-header {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.message-sender {
  font-weight: 600;
  font-size: 0.9rem;
}

.message-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.message-text {
  color: var(--text-secondary);
  word-wrap: break-word;
  white-space: pre-wrap;
}

.message-image {
  max-width: 100%;
  max-height: 400px;
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
  cursor: pointer;
  transition: transform 0.2s ease;
  object-fit: contain;
  display: block;
}

.message-image:hover {
  transform: scale(1.01);
}

.message-video {
  max-width: 100%;
  max-height: 400px;
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
  display: block;
  background: var(--bg-tertiary);
}

.message-file {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.message-file:hover {
  background: var(--bg-glass-light);
  border-color: var(--accent-primary);
}

.message-file .file-icon {
  font-size: 1.5rem;
}

.message-file .file-details {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.message-file .file-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}

.message-file .file-action {
  font-size: 0.7rem;
  color: var(--accent-primary);
}

.message.system {
  justify-content: center;
  padding: 0.5rem;
}

.message.system .message-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.new-messages-btn {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 1rem;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  z-index: 10;
  font-family: inherit;
}

@keyframes bounce {

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

  50% {
    transform: translateY(-5px);
  }
}

/* Composer */
.composer {
  padding: 1rem 1.5rem;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.composer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.user-color {
  width: 12px;
  height: 12px;
  border-radius: 4px;
}

.user-nickname {
  font-weight: 500;
  color: var(--text-secondary);
}

.message-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.input-area {
  display: flex;
  gap: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  transition: all 0.2s ease;
}

.input-area:focus-within {
  border-color: var(--accent-primary);
}

.input-area textarea {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1rem;
  padding: 0.75rem;
  resize: none;
  max-height: 150px;
  font-family: inherit;
}

.input-area textarea::placeholder {
  color: var(--text-muted);
}

.send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--accent-primary);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.send-btn:hover:not(:disabled) {
  background: var(--accent-secondary);
  transform: scale(1.05);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.send-btn.loading svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Attachment Button */
.attach-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.attach-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* Upload Preview Enhanced */
.upload-preview {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.preview-content {
  flex-shrink: 0;
}

.preview-content img,
.preview-content video {
  max-width: 120px;
  max-height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.preview-content .file-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  color: var(--accent-primary);
  font-size: 1.5rem;
}

.upload-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.file-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.upload-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.progress-bar::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  min-width: 35px;
  text-align: right;
}

.upload-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  z-index: 5;
}

.loader-dot {
  width: 12px;
  height: 12px;
  background: var(--accent-primary);
  border-radius: 50%;
  animation: pulse-dot 1s ease-in-out infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }

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

.upload-preview {
  position: relative;
  display: inline-block;
}

.upload-preview img {
  max-width: 200px;
  max-height: 150px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.remove-preview {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: var(--error);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 2rem;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.lightbox-close:hover {
  background: var(--bg-glass-light);
}

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

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .room-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
  }

  .room-actions {
    width: 100%;
    justify-content: flex-start;
    gap: 0.75rem;
  }

  .action-btn span {
    display: none;
  }

  .users-count {
    padding: 0.5rem 0.75rem;
  }

  .message-content {
    max-width: 100%;
  }

  .message-image {
    max-width: 100%;
  }

  .composer-inner {
    padding: 0.75rem;
  }

  .user-badge {
    display: none;
  }
}