/* ========== GLOBAL LCARS STYLES ========== */
body {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  background-color: #000;
  color: #f0f0f0;
  overflow-x: hidden;
}

:root {
  --lcars-orange: #ff9966;
  --lcars-blue: #6699ff;
  --lcars-pink: #ff66cc;
  --lcars-yellow: #ffcc33;
  --lcars-purple: #9966ff;
  --lcars-bg: #111;
}

/* ========== NAVBAR ========== */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--lcars-bg);
  padding: 1rem 2rem;
  border-bottom: 4px solid var(--lcars-orange);
}
.logo {
  font-size: 1.8rem;
  color: var(--lcars-orange);
  letter-spacing: 2px;
}
nav {
  display: flex;
  gap: 1.5rem;
}
nav a {
  color: var(--lcars-blue);
  text-decoration: none;
  font-size: 1.1rem;
  position: relative;
  transition: 0.3s;
}
nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0%;
  height: 2px;
  background-color: var(--lcars-pink);
  transition: width 0.3s;
}
nav a:hover::after { width: 100%; }
nav a.active {
  color: var(--lcars-orange);
  font-weight: bold;
}

/* ========== SIDEBARS ========== */
.side-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 15px;
  background: linear-gradient(var(--lcars-orange), var(--lcars-purple));
  border-radius: 0 10px 10px 0;
}
.side-bar.right {
  left: auto;
  right: 0;
  border-radius: 10px 0 0 10px;
  background: linear-gradient(var(--lcars-blue), var(--lcars-pink));
}

/* ========== BUTTONS ========== */
.lcars-btn, .lcars-button {
  background: var(--lcars-blue);
  border: none;
  padding: 10px 20px;
  margin-top: 2px;
  border-radius: 50px;
  color: #000;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.3s;
  cursor: pointer;
}
.lcars-btn:hover, .lcars-button:hover {
  background: var(--lcars-orange);
  transform: scale(1.05);
}

/* ========== LAYOUT ELEMENTE ========== */
.nav-path {
  padding: 10px 20px;
  color: var(--lcars-yellow);
  font-size: 0.9rem;
}
.content {
  text-align: center;
  padding: 20px 20px;
}
.lcars-panel {
  margin: 2rem auto;
  padding: 2rem;
  max-width: 800px;
  background-color: var(--lcars-bg);
  border-left: 10px solid var(--lcars-pink);
  border-right: 10px solid var(--lcars-yellow);
  border-radius: 25px 0 25px 0;
  box-shadow: 0 0 15px rgba(255,255,255,0.2);
}

/* ========== GALLERY & CLOUD ========== */
.folder-grid, .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  padding: 20px;
}

.folder {
  background: #111;
  border: 2px solid var(--lcars-orange);
  border-radius: 10px;
  padding: 30px 10px;
  text-align: center;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 0 10px rgba(230,126,34,0.3);
}
.folder:hover { background: var(--lcars-orange); color: #000; transform: scale(1.05); }
.folder i { font-size: 40px; display: block; margin-bottom: 10px; }

/* Einheitliches Layout für Bilder und Videos */
.gallery-item,
.file-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 9 / 12;
  border-radius: 10px;
  background: #111;
  box-shadow: 0 0 10px rgba(255,255,255,0.05);
}

/* Bilder & Video-Previews */
.gallery-item img,
.file-card img.video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
  background: #000;
  transition: transform .6s ease, opacity .6s ease;
  opacity: 0;
  transform: scale(1.05);
}
.gallery-item img.loaded,
.file-card img.video-thumb.loaded {
  opacity: 1;
  transform: scale(1);
}

/* File Cards (Audio / Docs etc.) */
.file-card {
  background: #151515;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: transform .15s ease, background .15s ease;
}
.file-card:hover { transform: translateY(-2px); background: #1e1e1e; }
.file-card .file-card-inner { display: flex; gap: 12px; align-items: center; width: 100%; }
.file-icon { font-size: 1.6rem; }
.file-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-ext { opacity: .7; font-family: monospace; }

/* Delete Button */
.delete-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #c00;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity .2s, transform .1s;
  z-index: 5;
}
.delete-btn:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* ========== SLIDESHOW ========== */
#slideshowOverlay, #fullscreenOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 2000;
}
#slideshowImage, #fullscreenOverlay img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 0 30px rgba(255,165,0,0.3);
  opacity: 0;
  transition: opacity 1s ease;
}

/* ========== FOOTER ========== */
footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.8rem;
  color: #888;
}

/* Optional: Play-Symbol auf Video-Previews */
.file-card .video-thumb::after {
  content: "▶";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  color: rgba(255,255,255,0.8);
  text-shadow: 0 0 10px rgba(0,0,0,0.6);
  pointer-events: none;
}

/* ===== LCARS Modal Styling ===== */
.lcars-modal {
  background: var(--lcars-bg);
  border-left: 6px solid var(--lcars-orange);
  border-right: 6px solid var(--lcars-pink);
  border-radius: 16px;
  color: #f0f0f0;
  box-shadow: 0 0 20px rgba(255, 153, 102, 0.3);
  padding: 5px;
}
.lcars-modal .modal-header h5 {
  color: var(--lcars-orange);
  font-weight: bold;
  letter-spacing: 1px;
}
.lcars-modal .lcars-btn {
  min-width: 100px;
}
/* ===== LCARS Chat Styles ===== */
.chat-panel {
  display: flex;
  flex-direction: column;
  height: 70vh;
  overflow: hidden;
}

.chat-history {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  text-align: left;
  background: #000;
  border-bottom: 4px solid var(--lcars-orange);
  scrollbar-color: var(--lcars-yellow) #222;
}

.chat-input {
  display: flex;
  gap: 10px;
  padding: 15px;
  background: var(--lcars-bg);
  border-top: 4px solid var(--lcars-pink);
}

.chat-input textarea {
  flex: 1;
  resize: none;
  padding: 10px;
  border-radius: 20px;
  border: 2px solid var(--lcars-yellow);
  background: #000;
  color: #fff;
  font-family: 'Orbitron', sans-serif;
}

/* Nachrichtenblasen */
.msg {
  padding: 12px 18px;
  margin: 10px 0;
  border-radius: 20px;
  max-width: 80%;
  line-height: 1.4;
}
.msg.user {
  background: var(--lcars-orange);
  color: #000;
  margin-left: auto;
  border-top-right-radius: 0;
}
.msg.assistant {
  background: var(--lcars-blue);
  color: #fff;
  margin-right: auto;
  border-top-left-radius: 0;
}
.msg.summary {
  background: var(--lcars-purple);
  color: #fff;
  font-style: italic;
}

/* LCARS Tabs */
.lcars-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}
.lcars-tab {
  background-color: var(--lcars-blue);
  border: none;
  color: #000;
  padding: 0.6rem 1.2rem;
  border-radius: 1rem;
  font-family: 'Orbitron', sans-serif;
  cursor: pointer;
}
.lcars-tab.active {
  background-color: var(--lcars-orange);
  color: #000;
}

/* Tab Inhalte */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* 2-Spalten Grid für Formular */
.lcars-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.mt-2 { margin-top: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }


@media (max-width: 768px) {
  .delete-btn {
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    font-size: 13px;
    line-height: 20px;
  }
}
