html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background-color: #000; /* fontos a fehér villanás ellen */
}

body {
  background-image: url("../images/background.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  font-family: 'Segoe UI Emoji', 'Noto Color Emoji', 'Apple Color Emoji', Arial, sans-serif;
  display: flex;
  flex-direction: column;
  animation: fadeInBackground 0.6s ease-in-out;
}

@keyframes fadeInBackground {
  from { opacity: 0; }
  to { opacity: 1; }
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 40px;
}

.profile-info {
  display: flex;
  align-items: center;
}

.profile-info img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 10px;
}

.profile-info span {
  color: white;
  font-weight: bold;
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logout-btn {
  background-color: #2c1a1a; /* sötétvöröses-szürke */
  color: gold;
  border: none;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 0 8px gold;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background-color: #3d1f1f;
  box-shadow: 0 0 12px gold;
}


.panel-toggle-btn {
  background: transparent;
  color: gold;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.container {
  display: flex;
  flex-grow: 1;
  padding: 0 20px 10px 20px;
  gap: 15px;
  height: calc(100vh - 80px);
  box-sizing: border-box;
}

.left-sidebar, .right-menu {
  width: 15%;
  background: rgba(0, 0, 0, 0.5);
  padding: 15px;
  border-radius: 10px;
  color: white;
  position: relative;
  transition: transform 0.3s ease-in-out;
}

.left-sidebar.closed {
  transform: translateX(-120%);
}

.right-menu.closed {
  transform: translateX(120%);
}

#memory-list {
  margin-top: 15px;
  max-height: 80vh;
  overflow-y: auto;
  padding-right: 5px;
}

#memory-list .memory-entry {
  color: #aaa;
  font-size: 13px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

#memory-list .memory-entry:hover {
  color: white;
  text-shadow: 0 0 4px gold;
}

#memory-list .memory-entry.first-entry-highlight {
  background-color: rgba(0, 0, 0, 0);  /* bronzos sárga háttér */
  color: #666666;
  font-weight: bold;
  border-left: 2px solid #7b68ee;
  padding-left: 6px;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 10px;
  color: gold;
}

.chat-panel {
  width: 70%;
  display: flex;
  flex-direction: column;
  background: rgba(30,30,30,0.7);
  border-radius: 10px;
  padding: 15px;
  box-sizing: border-box;
  justify-content: space-between;
  height: 100%;
}

#chat-box {
  flex-grow: 1;
  overflow-y: auto;
  background-color: rgba(46,46,46,0.4);
  padding: 15px;
  border-radius: 10px;
  color: white;
  margin-bottom: 10px;
  min-height: 200px;
  max-height: calc(100vh - 200px);
}

.user-message {
  text-align: right;
  background: rgba(#d0d0d0);
  padding: 8px;
  margin: 6px 0;
  border-radius: 6px;
  color: white;
}

.bot-message {
  text-align: left;
  background: rgba(20, 20, 20, 0.6);
  padding: 8px;
  margin: 6px 0;
  border-radius: 6px;
  color: #d0d0d0;  /* Lágy világosszürke */
  font-size: 14px;
  line-height: 1.6;
  white-space: normal;
}

.bot-message p {
  margin: 0.6em 0;
}

.bot-message ul, .bot-message ol {
  margin: 0.5em 0 0.5em 1.5em;
}

.bot-message table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 1em;
  color: #fff;
}

.bot-message th, .bot-message td {
  border: 1px solid #999;
  padding: 8px;
  text-align: left;
}

.bot-highlight-jogsertes {
  background-color: rgba(255, 0, 0, 0.15);
  padding: 8px;
  border-left: 4px solid red;
}

.bot-highlight-vedekezes {
  background-color: rgba(0, 128, 0, 0.15);
  padding: 8px;
  border-left: 4px solid green;
}

.bot-highlight-lepesek {
  background-color: rgba(255, 255, 0, 0.15);
  padding: 8px;
  border-left: 4px solid gold;
}

.input-wrapper {
  display: flex;
  flex-direction: column;
  margin-left: -11px;
  gap: 8px;
}

#chat-input {
  width: 99%;
  min-height: 60px;
  max-height: 150px;
  resize: none;
  overflow-y: auto;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background-color: rgba(16, 16, 16, 0.6);
  color: #d0d0d0;  /* Szintén halványszürke szöveg */
  font-size: 16px;
  line-height: 1.4;
}

#chat-input:focus {
  outline: 2px solid #555;
}

#char-count {
  color: #ccc;
  font-size: 13px;
  margin-left: 4px;
}

.chat-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.file-button {
  font-size: 16px;
  cursor: pointer;
  background: transparent;
  color: #ffd700;
}

.send-button {
  padding: 8px 16px;
  background-color: #3a6ea5;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
}

.justifi-logo {
  position: fixed;
  bottom: 20px;
  left: 40px;
  font-size: 30px;
  font-weight: bold;
  font-style: italic;
  color: white;
}

#thinking-indicator {
  font-style: italic;
  color: #ffd700;
  margin-top: 10px;
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}

a {
  color: #ffd700;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.menu-category h3 {
  background-color: #000;
  color: #ccc;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.2);
  font-size: 12px;
  margin: 10px 0;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.6);
  font-weight: normal; 
}

.menu-category h3:hover {
  background-color: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.5);
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
  max-height: 80vh;
  overflow-y: auto;
  margin: 5vh auto 0 auto;
  font-size: 12px;
  line-height: 1.6;
  background-color: #222;
  color: white;
  padding: 20px;
  width: 60%;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255,255,255,0.1);
}

.scrollable-content {
  max-height: 100%;
  overflow-y: auto;
  padding-right: 10px;
}

.scrollable-content p {
  margin-bottom: 12px;
}

.close-btn {
  color: #aaa;
  float: right;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

.close-btn:hover {
  color: white;
}

#profile-modal .modal-content input {
  width: 100%;
  padding: 6px;
  margin: 6px 0 12px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #333;
  color: #fff;
}

#profile-modal .modal-content label {
  display: block;
  font-weight: bold;
  margin-top: 8px;
}

#profile-modal .modal-content button {
  background-color: #ffd700;
  color: #000;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

#profile-modal .modal-content button:hover {
  background-color: #e6c200;
}

.input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-top: 5px;
  color: #ccc;
}

.chat-warning-inline {
  flex-grow: 1;
  text-align: center;
  color: gold;
  font-style: italic;
  font-size: 13px;
}

#new-chat-btn {
  display: inline-block;
  margin-right: 6px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 5px;
  background-color: #0000;
  color: gold;
  font-weight: bold;
  box-shadow: 0 0 5px gold;
  transition: all 0.3s ease;
 vertical-align: middle;
}

#new-chat-btn:hover {
  background-color: #222;
  box-shadow: 0 0 10px gold;
  transform: scale(1.05);
}

#new-chat-btn:active {
  background-color: #222;
  box-shadow: 0 0 4px gold;
  transform: scale(0.98);
}
.panel-toggle-btn,
.send-button {
  background-color: #1f1f1f; /* sötétszürke */
  color: gold;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  margin: 2px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 0 8px gold;
  transition: all 0.3s ease;
}

.panel-toggle-btn:hover,
.send-button:hover {
  background-color: #2c2c2c;
  box-shadow: 0 0 12px gold;
}
.panel-toggle-btn.styled-toggle-btn {
  margin-left: 15px; /* vagy 16px ha nagyobb térköz kell */
}
#profile-form button {
  background-color: #1f1f1f !important;  /* sötétszürke háttér */
  color: gold !important;               /* arany szöveg */
  border: none !important;
  border-radius: 6px !important;
  padding: 6px 16px !important;
  font-size: 14px !important;
  font-weight: bold !important;
  cursor: pointer;
  box-shadow: 0 0 10px gold !important;  /* arany árnyék */
  transition: all 0.3s ease !important;
}

#profile-form button:hover {
  background-color: #2c2c2c !important;
  box-shadow: 0 0 16px gold !important;
}
#memory-list .memory-entry.active-memory {
  color: #ff4d4d !important;  /* piros */
  font-weight: bold;
  text-shadow: 0 0 4px #ff4d4d;
}
.info-panel-container {
  max-height: 80vh;
  overflow-y: auto;
  padding: 0 20px;
}

.info-header-sticky {
  position: sticky;
  top: 0;
  background-color: #1e1e1e;
  z-index: 10;
  padding-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #444;
}
.info-header-sticky {
  position: static !important;
}
.info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.model-info p {
  margin: 4px 0;
}
.delete-icon {
  margin-left: 10px;
  color: #ff4d4d;
  cursor: pointer;
  font-size: 14px;
  transition: transform 0.2s;
}

.delete-icon:hover {
  transform: scale(1.2);
  text-shadow: 0 0 6px red;
}

.close-panel-btn {
  display: inline-block;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 5px;
  background-color: #0000;
  color: gold;
  font-weight: bold;
  box-shadow: 0 0 5px gold;
  transition: all 0.3s ease;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  vertical-align: middle;
}

.close-panel-btn:hover {
  background-color: #222;
  box-shadow: 0 0 10px gold;
  transform: scale(1.05);
}

.file-preview {
  display: inline-block;
  vertical-align: middle;
  margin-top: 10px;
}

#avatar-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.avatar-modal-content {
  background-color: #111;
  padding: 30px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 0 40px red;
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  color: white;
  animation: fadeIn 0.3s ease-in-out;
}

/* ✨ Opcionális finom animáció a megjelenésre */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.carousel-container {
  display: flex;
  overflow-x: auto;
  gap: 20px;
  padding: 20px 0;
  scroll-snap-type: x mandatory;
  justify-content: center;
  flex-wrap: nowrap;
  -ms-overflow-style: none;  /* IE & Edge */
  scrollbar-width: none;     /* Firefox */
}

.carousel-container::-webkit-scrollbar {
  display: none;             /* Chrome, Safari */
}

.avatar-item {
  flex: 0 0 auto;
  scroll-snap-align: center;
  border-radius: 50%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 4px solid transparent;
  cursor: pointer;
}

.avatar-item img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
}

.avatar-item.selected {
  transform: scale(1.15);
  border-color: #FF7F7F; /* halványabb piros */
  box-shadow: 0 0 10px #FF4D6D, 0 0 2px rgba(255, 77, 77, 0.5);
}

.avatar-modal-content button {
  margin-top: 20px;
  background-color: #222; /* sötétszürke */
  color: gold; /* arany szöveg */
  padding: 12px 26px;
  border-radius: 14px;
  border: none;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(255, 77, 77, 0.8); /* piros aura */
  transition: all 0.3s ease-in-out;
}

.avatar-modal-content button:hover {
  background-color: #2e2e2e;
  box-shadow: 0 0 20px 5px #3F0071;
  transform: scale(1.04);
}

/* 🔥 Profilkép piros fény hover */
.profile-info img:hover {
  box-shadow: 0 0 15px red;
  transform: scale(1.05);
  transition: all 0.3s ease;
}

.fire-glow {
  animation: fireEffect 3s ease-in-out infinite;
  box-shadow: 0 0 30px rgba(255, 50, 0, 0.5), 0 0 60px rgba(255, 200, 0, 0.3);
  transition: all 0.5s ease-in-out;
}

@keyframes fireEffect {
  0% {
    box-shadow: 0 0 20px rgba(255, 40, 0, 0.4), 0 0 50px rgba(255, 180, 0, 0.2);
    filter: hue-rotate(0deg) brightness(1);
  }
  50% {
    box-shadow: 0 0 35px rgba(255, 60, 0, 0.6), 0 0 70px rgba(255, 220, 0, 0.4);
    filter: hue-rotate(10deg) brightness(1.1);
  }
  100% {
    box-shadow: 0 0 20px rgba(255, 40, 0, 0.4), 0 0 50px rgba(255, 180, 0, 0.2);
    filter: hue-rotate(0deg) brightness(1);
  }
}

.pulse-image-button {
  max-width: 85%;
  height: auto;
  border-radius: 12px;
  margin: 20px 0;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(255, 0, 0, 0.4);
  animation: pulseRed 2.8s infinite;
  transition: transform 0.3s ease;
}

.pulse-image-button:hover {
  transform: scale(1.03);
}

@keyframes pulseRed {
  0% {
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.4);
  }
  50% {
    box-shadow: 0 0 65px rgba(255, 0, 0, 1);
  }
  100% {
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.4);
  }
}

/* 📱 Reszponzív avatár méretezés */
@media (max-width: 600px) {
  .avatar-item img {
    width: 70px;
    height: 70px;
  }

  .avatar-modal-content {
    padding: 20px 15px;
  }
}

@media (max-width: 768px) {
  .info-header {
    flex-direction: column;
    text-align: center;
  }

  .model-image {
    margin-top: 10px;
  }
}
.sponsor-section {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.sponsor-btn {
  width: 130px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 0 12px gold;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sponsor-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px gold;
}
.chat-buttons-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
}

.button-group {
  display: flex;
  gap: 20px; /* Ez határozza meg a két gomb közti távolságot */
  margin-top: 10px;
}

.download-button {
  background-color: #0f1a2d; /* Sötétkék háttér */
  color: #00bfffaa; /* Arany szöveg */
  padding: 4px 8px; /* 🔽 Kisebb magasság */
  font-size: 10px; /* 🔽 Kisebb betűméret */
  border-radius: 6px;
  font-weight: bold;
  box-shadow: 0 0 8px #00bfffaa; /* 🌊 Kék neon fény */
  margin-left: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.download-button:hover {
  background-color: #1c2b4a;
  box-shadow: 0 0 14px #00bfff; /* 🌌 Erősebb kék fény hover-re */
}
.chat-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.left-button {
  flex: 1;
  text-align: left;
}

.right-button-group {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
}
/* 🌐 Globális scrollbar testreszabás */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(20, 20, 20, 0.2);  /* halvány sötét háttér */
}

::-webkit-scrollbar-thumb {
  background: rgba(100, 100, 100, 0.5);  /* szürke csúszka */
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(160, 160, 160, 0.6);  /* világosabb hover */
}
@media (max-width: 768px) {
  /* --- HEADER JAVÍTÁS --- */
  header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 10px;
    gap: 10px;
  }

  .profile-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
  }

  .profile-info span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-buttons {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }

  /* Nyilak sorrendje */
  #left-panel-toggle {
    order: 1;
  }

  #right-panel-toggle {
    order: 0;
  }

  .panel-toggle-btn {
  font-size: 12px;
  padding: 4px;
  background-color: #222;
  color: gold;
  border: none;
  border-radius: 6px;
  box-shadow: 0 0 4px gold;
  cursor: pointer;
  width: 32px;   /* négyzetes forma: 4px padding + 24px betű + 4px padding = kb. 32px */
  height: 32px;
  text-align: center;
}

  .panel-toggle-btn:hover {
    background-color: #333;
  }

  .logout-btn {
    font-size: 13px;
    padding: 6px 12px;
    background-color: #330000; /* Bordó */
    color: gold;
    border: none;
    border-radius: 6px;
    box-shadow: 0 0 6px gold;
    white-space: nowrap;
    width: 100px;
    order: 2;
  }

  .logout-btn:hover {
    background-color: #4d0000;
  }

  /* --- CHAT PANEL MÉRETEZÉSE --- */
  .container {
    flex-direction: column;
    padding: 0;
  }

  .chat-panel {
    flex: 1;
    width: 100% !important;
    margin: 0;
    padding: 10px;
    min-height: 400px;
    box-sizing: border-box;
  }

  /* --- PANEL BEHÚZÁS MOBILON --- */
  .left-sidebar.closed,
  .right-menu.closed {
    display: none !important;
  }

  .left-sidebar,
  .right-menu {
    display: block;
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.95);
    box-shadow: 0 0 14px gold;
    padding: 20px;
    z-index: 999;
  }

  .justifi-logo {
    display: none; /* Mobilon rejtve */
  }

  .input-wrapper {
    margin-top: 20px;
  }
}

@media (max-width: 360px) {
  .profile-info span {
    display: none;
  }

  .panel-toggle-btn,
  .logout-btn {
    font-size: 10px;
    padding: 4px 6px;
    width: 70px;
  }

  .logout-btn {
    width: 70px;
    font-size: 10px;
  }
}
