*,
*::before,
*::after {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

/* Tmavý neonový background */

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, #4f46e5 0%, transparent 40%),
    radial-gradient(circle at top right, #ec4899 0%, transparent 45%),
    radial-gradient(circle at bottom, #22c55e 0%, transparent 50%),
    #020617;
  color: #e5e7eb;
  min-height: 100vh;
  height: 100vh;            /* FIX SCROLL: telo vždy výška viewportu */
  display: flex;
  align-items: stretch;
  justify-content: center;
}

/* DISCLAIMER POPUP */

.disclaimer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.disclaimer-card {
  max-width: 420px;
  width: 90%;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 24px;
  padding: 20px 22px 22px 22px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  box-shadow: 0 32px 90px rgba(15, 23, 42, 0.95);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.disclaimer-orbit {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 10px auto;
  border-radius: 999px;
  background: conic-gradient(from 180deg, #4f46e5, #ec4899, #22c55e, #4f46e5);
  padding: 2px;
}

.disclaimer-icon {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: radial-gradient(circle, #0f172a 0%, #020617 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
}

.disclaimer-card h2 {
  margin: 4px 0 0 0;
  font-size: 20px;
  font-weight: 700;
}

.disclaimer-text {
  margin: 8px 0 0 0;
  font-size: 13px;
  color: #9ca3af;
}

.disclaimer-label {
  display: block;
  margin-top: 14px;
  font-size: 13px;
  color: #cbd5e1;
  text-align: left;
}

.disclaimer-card input {
  width: 100%;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid #4b5563;
  background: #020617;
  color: #e5e7eb;
  font-size: 14px;
}

.disclaimer-card input::placeholder {
  color: #6b7280;
}

.disclaimer-button {
  margin-top: 14px;
  padding: 9px 18px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #4f46e5, #ec4899);
  color: #f9fafb;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.9);
  transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.disclaimer-button:hover {
  background: linear-gradient(135deg, #4338ca, #db2777);
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.95);
}

.disclaimer-button:active {
  transform: translateY(1px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.8);
}

/* HLAVNÁ APPKA – MOBILE FIRST */

.app {
  width: 100%;
  max-width: 1120px;
  height: 100vh;           /* FIX SCROLL: app = výška viewportu */
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 12px;
}

/* Header */

.header {
  padding: 10px 12px 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-circle {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, #4f46e5 0%, #020617 60%);
  color: #f9fafb;
  font-weight: 700;
}

.logo-text {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.header-subtitle {
  font-size: 12px;
  color: #9ca3af;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.header-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: #e5e7eb;
}

/* Layout – mobile: stĺpce */

.layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;           /* FIX SCROLL: umožni vnútorný scroll */
}

/* Left panel – info card */

.left-panel {
  flex: 0 0 auto;
}

.info-card {
  position: relative;
  border-radius: 24px;
  padding: 16px 16px 14px 16px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.85);
  overflow: hidden;
}

.info-glow {
  position: absolute;
  inset: -60%;
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.4), transparent 50%),
    radial-gradient(circle at bottom right, rgba(236, 72, 153, 0.4), transparent 50%);
  opacity: 0.4;
  pointer-events: none;
}

.info-robot {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 999px;
  background: radial-gradient(circle, #4f46e5 0%, #0f172a 60%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 16px 40px rgba(79, 70, 229, 0.85);
  margin-bottom: 8px;
}

.info-card h2 {
  position: relative;
  margin: 4px 0 0 0;
  font-size: 18px;
  font-weight: 700;
}

.info-text {
  position: relative;
  margin: 8px 0 0 0;
  font-size: 13px;
  color: #cbd5e1;
}

.info-section-title {
  position: relative;
  margin-top: 14px;
  font-size: 12px;
  color: #a5b4fc;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.info-faq-list {
  position: relative;
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-faq-button {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 11px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.1s ease;
}

.hero-faq-button:hover {
  border-color: #4f46e5;
  background: rgba(15, 23, 42, 1);
}

.hero-faq-button:active {
  transform: translateY(1px);
}

.info-note {
  position: relative;
  margin-top: 10px;
  font-size: 11px;
  color: #9ca3af;
}

/* Right panel – chat */

.right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;           /* FIX SCROLL: umožni chat-card scroll */
}

/* Status bar */

.status-bar {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

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

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

.status-right {
  font-size: 12px;
  color: #cbd5e1;
}

/* Chat card */

.chat-card {
  flex: 1;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.9);
  display: flex;
  flex-direction: column;
  min-height: 0;           /* FIX SCROLL: deti môžu scrollovať */
}

/* Messages scrollujú vo vnútri chat-card */

.messages {
  flex: 1;
  min-height: 0;           /* FIX SCROLL: funguje overflow v flex kontejnery */
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 10px 14px;
  overflow-y: auto;        /* FIX SCROLL: scroll len v chate */
}

/* Messages */

.message {
  max-width: 80%;
  padding: 9px 13px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.message.user {
  margin-left: auto;
  background: rgba(15, 23, 42, 0.95);
  color: #e5e7eb;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.7);
}

.message.bot {
  margin-right: auto;
  background: linear-gradient(135deg, #4f46e5, #ec4899);
  color: #f9fafb;
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.9);
}

/* Loader message */

.message.bot.loading {
  background: rgba(15, 23, 42, 0.95);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.message.bot.loading .dots span {
  display: inline-block;
  margin-left: 2px;
  font-weight: 700;
  animation: bounceDots 1s infinite;
}

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

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

@keyframes bounceDots {
  0%, 20% { transform: translateY(0); opacity: 0.3; }
  50%     { transform: translateY(-3px); opacity: 1; }
  80%,100%{ transform: translateY(0); opacity: 0.3; }
}

/* Input area */

.input-area {
  padding: 8px 12px 12px 12px;
  border-top: 1px solid rgba(31, 41, 55, 0.8);
}

#chat-form {
  display: flex;
  gap: 10px;
}

#message-input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #4b5563;
  font-size: 14px;
  background: #020617;
  color: #e5e7eb;
}

#message-input::placeholder {
  color: #6b7280;
}

#send-button {
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #4f46e5, #ec4899);
  color: #f9fafb;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.8);
  transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

#send-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

#send-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #4338ca, #db2777);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.9);
}

#send-button:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.8);
}

/* DESKTOP LAYOUT – dvojpanel */

@media (min-width: 840px) {
  .app {
    padding: 20px;
  }

  .layout {
    flex-direction: row;
    gap: 16px;
  }

  .left-panel {
    flex: 0 0 34%;
  }

  .right-panel {
    flex: 1;
  }

  .info-card {
    height: 100%;
  }

  .messages {
    padding: 16px 16px 12px 16px;
  }

  .message {
    max-width: 70%;
  }
}
