/* Ikarus AI News Planet CSS - Indigo/Purple theme (#a855f7 / #8b5cf6) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700;800&display=swap');

body {
  font-family: 'Inter', sans-serif;
  color: #fff;
}

/* Base Stage overrides for News Page */
.stage {
  display: flex;
  flex-direction: column;
  padding: 40px;
  box-sizing: border-box;
}

/* Header & Back Button */
.news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  width: 100%;
  margin-bottom: 20px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: #a855f7;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
  transform: translateY(-2px);
}

/* Logo link on News Page */
.news-logo {
  width: 180px;
  height: 95px;
  background-image: url("istoselida.jpg");
  background-position: -22px -23px;
  background-size: 1000px 667px;
  background-repeat: no-repeat;
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.news-logo:hover {
  opacity: 1;
}

/* Main Layout */
.news-container {
  display: flex;
  justify-content: center;
  height: calc(100% - 120px);
  z-index: 5;
}

/* Left side: Ikarus AI Control Panel */
.ai-panel-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ai-status-card {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(168, 85, 247, 0.1);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ai-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
  display: grid;
  place-items: center;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
  animation: pulse-glow 2.5s infinite alternate;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 10px rgba(168, 85, 247, 0.3); }
  100% { box-shadow: 0 0 20px rgba(168, 85, 247, 0.6); }
}

.ai-title-wrapper {
  display: flex;
  flex-direction: column;
}

.ai-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
}

.ai-tagline {
  font-size: 0.75rem;
  color: #a855f7;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ai-stats-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.ai-stat-row span:first-child {
  color: #a0a0a0;
}

.ai-stat-row span:last-child {
  color: #fff;
  font-weight: 500;
}

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

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

.status-dot.loading {
  background-color: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
  animation: blink 1s infinite alternate;
}

@keyframes blink {
  0% { opacity: 0.3; }
  100% { opacity: 1; }
}

.ai-action-btn {
  width: 100%;
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #a855f7 0%, #6366f1 100%);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ai-action-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.45);
  filter: brightness(1.1);
}

.ai-action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Right side: News Feed Column */
.news-feed-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  max-height: calc(100% - 10px);
  overflow-y: auto;
  padding-right: 8px;
  width: 100%;
  max-width: 1100px;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, 0.3) transparent;
}

.news-feed-col::-webkit-scrollbar {
  width: 6px;
}

.news-feed-col::-webkit-scrollbar-track {
  background: transparent;
}

.news-feed-col::-webkit-scrollbar-thumb {
  background-color: rgba(168, 85, 247, 0.3);
  border-radius: 20px;
}

/* News Cards */
.news-card {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
  border-color: rgba(168, 85, 247, 0.25);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.45),
    0 0 20px rgba(168, 85, 247, 0.08);
}

.news-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.news-badge {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #c084fc;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.news-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #a855f7;
  box-shadow: 0 0 8px #a855f7;
}

.news-date {
  font-size: 0.8rem;
  color: #a0a0a0;
}

.news-card h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
  line-height: 1.35;
}

.news-card p {
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 300;
  margin: 0;
}

.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
  padding: 8px 18px;
  border-radius: 999px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: flex-start;
  margin-top: 8px;
}

.read-more-btn:hover {
  background: rgba(168, 85, 247, 0.1);
  border-color: #a855f7;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}

.news-card-expanded-content {
  display: none;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 16px;
  animation: fadeIn 0.4s ease-out;
}

.news-card.expanded .news-card-expanded-content {
  display: flex;
}

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

/* Embedded player inside News card */
.news-media-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #000;
  margin-top: 4px;
}

.news-media-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Empty/Loading state */
.news-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  text-align: center;
  gap: 16px;
}

.spinner-glow {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(168, 85, 247, 0.1);
  border-top-color: #a855f7;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* News ambient glow */
.news-planet-glow {
  position: absolute;
  top: 15%;
  left: 20%;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: float-slow 14s ease-in-out infinite alternate;
}

@keyframes float-slow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-15px, 25px) scale(1.05); }
}

/* ==========================================================================
   Mobile Styles Override (@media max-width: 760px)
   ========================================================================== */
@media (max-width: 760px) {
  .mobile-page::before {
    background-image: none !important;
    background: radial-gradient(circle at 50% 15%, rgba(168, 85, 247, 0.18), transparent 55%), #050505 !important;
    opacity: 1 !important;
  }

  .mobile-page::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), #000 90%) !important;
  }

  /* Active navigation highlights */
  .mobile-nav a:first-child {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
  }

  .mobile-nav a:nth-child(3) {
    color: #c084fc !important; /* News purple color */
    border-color: rgba(192, 132, 252, 0.7) !important;
    box-shadow: 0 0 10px rgba(192, 132, 252, 0.2);
  }

  .mobile-news-content {
    position: relative;
    z-index: 10;
    margin-top: 24px;
    width: 100%;
    max-width: 480px;
    margin-right: auto;
    margin-left: auto;
    padding-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .mobile-back-wrapper {
    margin-bottom: 0;
  }

  .mobile-news-content .ai-status-card {
    width: 100%;
    border-radius: 16px;
    padding: 20px;
  }

  .mobile-news-content .news-feed-col {
    width: 100%;
    overflow-y: visible;
    max-height: none;
    padding-right: 0;
  }

  .mobile-news-content .news-card {
    padding: 20px;
    border-radius: 16px;
  }

  .mobile-news-content .news-card h2 {
    font-size: 1.3rem;
  }
}
