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

:root {
  --tb-bg: #0a0a0a;
  --tb-grid-line: rgba(255, 255, 255, 0.04);
  --tb-grid-size: 24px;
  --tb-text: #e0e0e0;
  --tb-accent: #ffffff;
  --tb-text-muted: #888888;
  --tb-card-bg: rgba(255, 255, 255, 0.03);
  --tb-card-border: rgba(255, 255, 255, 0.08);
  --tb-card-hover: rgba(255, 255, 255, 0.07);
}

* {
  box-sizing: border-box;
}

body.trashbin-theme,
html.trashbin-theme body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--tb-bg);
  background-image: var(--tb-bg-pattern, linear-gradient(var(--tb-grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--tb-grid-line) 1px, transparent 1px));
  background-size: var(--tb-bg-size, var(--tb-grid-size) var(--tb-grid-size));
  color: var(--tb-text);
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
}

/* Sidebar & Navigation */
.trashbin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 220px;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  z-index: 1000;
  pointer-events: auto;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.trashbin-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  width: fit-content;
}

.trashbin-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.7));
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.trashbin-logo-link:hover .trashbin-logo {
  transform: rotate(-12deg) scale(1.12);
}

.trashbin-sidebar .menu {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.menu-item {
  color: var(--tb-text);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 200;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  display: inline-block;
  width: fit-content;
}

.menu-item:hover,
.menu-item.active {
  color: var(--tb-accent);
  transform: translateX(15px) scale(1.1);
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.menu-item.active {
  font-weight: 400;
}

/* Right orientation modifier */
body.sidebar-right .trashbin-sidebar,
html.sidebar-right .trashbin-sidebar {
  left: auto;
  right: 0;
  align-items: flex-end;
  text-align: right;
}

body.sidebar-right .trashbin-sidebar .menu,
html.sidebar-right .trashbin-sidebar .menu {
  align-items: flex-end;
}

body.sidebar-right .menu-item:hover,
body.sidebar-right .menu-item.active,
html.sidebar-right .menu-item:hover,
html.sidebar-right .menu-item.active {
  transform: translateX(-15px) scale(1.1);
}

/* Main Content Area */
.trashbin-content {
  margin-left: 230px;
  min-height: 100vh;
  padding: 40px 48px 80px 24px;
  transition: margin 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body.sidebar-right .trashbin-content,
html.sidebar-right .trashbin-content {
  margin-left: 0;
  margin-right: 230px;
  padding: 40px 24px 80px 48px;
}

@media (max-width: 768px) {
  .trashbin-sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 20px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .trashbin-sidebar .menu {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
  }
  .menu-item {
    font-size: 1.2rem;
  }
  .trashbin-content,
  body.sidebar-right .trashbin-content,
  html.sidebar-right .trashbin-content {
    margin-left: 0;
    margin-right: 0;
    padding: 20px;
  }
}

/* Overlay Modals */
#modal-alpha {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--tb-bg);
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  z-index: 999999;
  flex-direction: column;
}

.runner-header {
  height: 56px;
  min-height: 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.runner-header-left,
.runner-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.runner-title {
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--tb-text);
  letter-spacing: -0.02em;
}

.runner-btn {
  background: var(--tb-card-bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--tb-text);
  border-radius: 6px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 300;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.runner-btn:hover {
  background: var(--tb-card-hover);
  color: var(--tb-accent);
  border-color: var(--tb-accent);
}

.runner-btn.starred {
  background: rgba(251, 188, 4, 0.15);
  border-color: rgba(251, 188, 4, 0.4);
  color: #fbbc04;
}

.content-frame {
  width: 100%;
  flex: 1;
  border: none;
  background: #000;
}

/* ====== NEW MINIMAL UI FOR DISCS AND TAPES ====== */

/* Common Cards */
.gc-media-card, .track-card, .pl-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--tb-card-border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  color: var(--tb-text);
}

.gc-media-card:hover, .track-card:hover, .pl-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.thumbnail-container, .card-thumb, .pl-img {
  background: var(--tb-card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #555;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Buttons */
.fav-trigger, .ep-btn, .row-action-btn, .card-plus-btn, #fav-btn-player, button {
  background: var(--tb-card-bg);
  border: 1px solid var(--tb-card-border);
  color: var(--tb-text);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 8px 12px;
  font-family: inherit;
  font-weight: 300;
}

.fav-trigger:hover, .ep-btn:hover, .row-action-btn:hover, .card-plus-btn:hover, #fav-btn-player:hover, button:hover {
  background: var(--tb-card-hover);
  border-color: var(--tb-accent);
  color: var(--tb-accent);
}

/* Bottom Panel Layout */
.fs-main {
  background: var(--tb-bg) !important;
  color: var(--tb-text);
}

.fs-bg {
  opacity: 0.1;
  filter: grayscale(100%) blur(10px);
}

.queue-item {
  background: var(--tb-card-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px;
  display: flex;
  align-items: center;
  transition: background 0.2s;
}

.queue-item:hover {
  background: var(--tb-card-bg);
}

.queue-item.active {
  border-left: 2px solid var(--tb-accent);
  background: rgba(255, 255, 255, 0.08);
}

/* Movies Player */
#video-container {
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

/* Search and Inputs */
input, select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--tb-text);
  border-radius: 4px;
  padding: 8px 12px;
  font-family: inherit;
  outline: none;
}

input:focus, select:focus {
  border-color: rgba(255, 255, 255, 0.3);
}

/* Utility layout resets */
.grid { display: grid; gap: 16px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }


/* Extracted Playbar CSS */
.panel-bottom { grid-area: panel-bottom; background-color: var(--tb-bg); border-top: 1px solid var(--tb-card-border); display: flex; align-items: center; justify-content: space-between; padding: 0 16px; z-index: 10; }
.now-playing { display: flex; align-items: center; gap: 14px; width: 30%; min-width: 180px; }
.image-block { width: 56px; height: 56px; background-color: var(--tb-card-border); object-fit: cover; cursor: pointer; border-radius: 4px; }
.image-block:hover { opacity: 0.8; }
.np-info { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.text-primary { font-family: 'Geist', sans-serif; font-size: 14px; font-weight: 700; color: var(--tb-text); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.text-secondary { font-family: 'Geist', sans-serif; font-size: 11px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--tb-text-muted); }
.text-secondary:hover { text-decoration: underline; color: var(--tb-text); }
.np-like, .np-plus { margin-left: 12px; color: var(--tb-text-muted); transition: color 0.2s; cursor: pointer; background: none; border: none; font-size: 16px; }
.np-like:hover, .np-plus:hover { color: var(--tb-text); }
.np-like.active { color: var(--tb-accent); }

.player-controls { display: flex; flex-direction: column; align-items: center; justify-content: center; max-width: 722px; width: 40%; }
.control-buttons { display: flex; align-items: center; gap: 24px; margin-bottom: 8px; }
.ctrl-btn { font-size: 16px; background: transparent !important; border: none !important; color: var(--tb-text) !important; transition: color 0.2s; cursor: pointer; }
.ctrl-btn:hover { color: var(--tb-text-muted) !important; }
.ctrl-btn i, .ctrl-btn svg { color: var(--tb-text) !important; fill: var(--tb-text) !important; }
.ctrl-play { width: 32px; height: 32px; background-color: var(--tb-text) !important; color: transparent !important; display: flex; align-items: center; justify-content: center; font-size: 14px; transition: transform 0.1s; border: none !important; border-radius: 50% !important; cursor: pointer; }
.ctrl-play i, .ctrl-play svg { color: transparent !important; fill: transparent !important; }
.ctrl-play:hover { background-color: var(--tb-accent) !important; }

.playback-bar { display: flex; align-items: center; gap: 10px; width: 100%; font-size: 11px; color: var(--tb-text-muted); }
.progress-bg { flex: 1; height: 4px; background-color: var(--tb-card-border) !important; border-radius: 2px; position: relative; cursor: pointer; }
.progress-fg { height: 100%; background-color: var(--tb-text) !important; border-radius: 2px; position: absolute; top: 0; left: 0; }
.progress-bg:hover .progress-fg { background-color: var(--tb-accent) !important; }

.extra-controls { display: flex; align-items: center; gap: 16px; width: 30%; justify-content: flex-end; }
.vol-bar { width: 90px; height: 4px; background-color: var(--tb-card-border) !important; display: flex; cursor: pointer; position: relative; border-radius: 2px; }
.vol-fg { height: 100%; background-color: var(--tb-text) !important; border-radius: 2px; }

@media (max-width: 768px) {
  .player-controls, .extra-controls { display: none; }
  .panel-bottom { padding: 0 12px; justify-content: space-between; }
  .now-playing { width: 100%; min-width: 0; }
}
