@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:wght@400;700&family=Fredoka:wght@500;700&family=VT323&display=swap');

/* ===================================================
   BASE / DEFAULT THEME (PINK)
   =================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Fredoka', 'Segoe UI', sans-serif;
  user-select: none;
}

body {
  background-color: #ffe6f2;
  color: #333333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.3s ease;
}

/* DESKTOP LAYOUT */
.desktop {
  flex: 1;
  display: flex;
  padding: 20px;
  gap: 20px;
  padding-bottom: 60px;
}

/* MAIN SIDEBAR */
.sidebar {
  width: 150px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-btn {
  background: #ffffff;
  border: 2px solid #ff8dc4;
  border-radius: 10px;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: bold;
  color: #333333;
  font-size: 0.85rem;
  box-shadow: 3px 3px 0 rgba(255, 141, 196, 0.4);
  transition: all 0.2s ease;
}

.nav-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 rgba(255, 141, 196, 0.4);
}

.nav-btn .icon {
  font-size: 1.1rem;
}

/* SUB-SIDEBAR FOR INNER NAVIGATION */
.page-layout {
  display: flex;
  gap: 20px;
  width: 100%;
}

.sub-sidebar {
  width: 140px;
  background: #ffffff;
  border: 2px solid #ff8dc4;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: flex-start;
  box-shadow: 3px 3px 0 rgba(255, 141, 196, 0.4);
}

.sub-sidebar-btn {
  color: #ff8dc4;
  background: none;
  border: none;
  font-size: 0.85rem;
  font-weight: bold;
  text-align: left;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.sub-sidebar-btn:hover, .sub-sidebar-btn.active-sub {
  background: #ffe6f2;
  text-decoration: underline;
}

.sub-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* WORKSPACE PAGES */
.workspace {
  flex: 1;
  position: relative;
}

.view-page {
  display: none !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  align-items: flex-start;
}

.view-page.active {
  display: grid !important;
}

.view-page.flex-active {
  display: flex !important;
}

/* MOVEABLE TAB PANELS */
.card {
  background: #ffffff;
  border: 3px solid #ff8dc4;
  border-radius: 10px 12px 12px 12px;
  overflow: hidden;
  box-shadow: 4px 4px 0 rgba(255, 141, 196, 0.4);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.draggable-panel.is-dragging {
  opacity: 0.95;
  box-shadow: 8px 8px 15px rgba(255, 141, 196, 0.4);
}

.card-header {
  background: #ff8dc4;
  color: #ffffff;
  padding: 6px 12px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  cursor: move;
  border-bottom: 2px solid #ff8dc4;
}

.tab-title::before {
  content: "🎀 ";
  margin-right: 4px;
}

.card-controls {
  display: flex;
  gap: 6px;
}

.card-btn {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  display: inline-block;
}

.card-body {
  padding: 15px;
  font-size: 0.9rem;
  line-height: 1.5;
  user-select: text;
}

/* SECTION CARDS */
.section-card {
  display: none !important;
}

.section-card.show {
  display: block !important;
}

/* OC BADGES & PORTRAITS */
.oc-badge-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.oc-badge {
  background: #ffe6f2;
  border: 1px solid #ff8dc4;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: bold;
}

.oc-portrait-box {
  width: 100%;
  height: 220px;
  border: 2px dashed #ff8dc4;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #ffe6f2;
  color: #ff8dc4;
  font-weight: bold;
  margin-bottom: 10px;
  text-align: center;
  padding: 10px;
  overflow: hidden;
}

.oc-portrait-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* TODO LIST */
.todo-list {
  list-style: none;
  padding: 0;
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.85rem;
}

.todo-tag {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: #ffe6f2;
  border: 1px solid #ff8dc4;
  color: #333333;
}

/* GALLERY GRID */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
}

.gallery-item {
  background: #ffffff;
  border: 2px solid #ff8dc4;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}

/* THEME BUTTONS */
.vote-btn {
  background: #ff8dc4;
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  margin-right: 6px;
  font-size: 0.85rem;
}

/* BUTTON WALL LINKS */
.button-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.web-button {
  min-width: 90px;
  height: 34px;
  padding: 0 10px;
  border: 2px solid #ff8dc4;
  background: #ffe6f2;
  color: #333333;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
  text-decoration: none;
  border-radius: 6px;
  box-shadow: 2px 2px 0 rgba(255, 141, 196, 0.4);
  transition: all 0.2s ease;
}

.web-button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 rgba(255, 141, 196, 0.4);
  background: #ffffff;
}

/* TASKBAR & START MENU */
.taskbar {
  position: fixed;
  bottom: 0px;
  left: 0px;
  right: 0px;
  height: 42px;
  background: #ffffff;
  border-top: 3px solid #ff8dc4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
  z-index: 1000;
}

.start-btn {
  background: #ff8dc4;
  color: #ffffff;
  border: 2px solid #ff8dc4;
  padding: 4px 14px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  font-size: 0.85rem;
}

.start-btn::before {
  content: "🎀 ";
}

.clock {
  font-size: 0.85rem;
  font-weight: bold;
}

.start-menu {
  position: fixed;
  bottom: 50px;
  left: 15px;
  width: 200px;
  background: #ffffff;
  border: 3px solid #ff8dc4;
  border-radius: 10px;
  padding: 8px;
  box-shadow: 4px 4px 0 rgba(255, 141, 196, 0.4);
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 1001;
}

.start-menu.open {
  display: flex;
}

.start-item {
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}

.start-item:hover {
  background: #ffe6f2;
}

/* ===================================================
   THEME OVERRIDES — PURPLE
   Only properties that differ from the pink base are
   restated here; everything else (layout, spacing,
   sizing) is inherited from the base rules above.
   =================================================== */

[data-theme="purple"] * {
  font-family: 'Courier Prime', monospace;
}

[data-theme="purple"] .tab-title::before,
[data-theme="purple"] .start-btn::before {
  content: "🔮 ";
}

[data-theme="purple"] body {
  background-color: #f3e6f7;
}

[data-theme="purple"] .sub-sidebar-btn,
[data-theme="purple"] .oc-portrait-box {
  color: #af70c8;
}

[data-theme="purple"] .sub-sidebar-btn:hover,
[data-theme="purple"] .sub-sidebar-btn.active-sub,
[data-theme="purple"] .oc-badge,
[data-theme="purple"] .oc-portrait-box,
[data-theme="purple"] .todo-tag,
[data-theme="purple"] .web-button,
[data-theme="purple"] .start-item:hover {
  background-color: #f3e6f7;
}

[data-theme="purple"] .nav-btn,
[data-theme="purple"] .sub-sidebar,
[data-theme="purple"] .card,
[data-theme="purple"] .oc-badge,
[data-theme="purple"] .oc-portrait-box,
[data-theme="purple"] .todo-tag,
[data-theme="purple"] .gallery-item,
[data-theme="purple"] .web-button,
[data-theme="purple"] .start-btn,
[data-theme="purple"] .start-menu {
  border-color: #af70c8;
}

[data-theme="purple"] .card-header {
  border-bottom-color: #af70c8;
}

[data-theme="purple"] .taskbar {
  border-top-color: #af70c8;
}

[data-theme="purple"] .card-header,
[data-theme="purple"] .vote-btn,
[data-theme="purple"] .start-btn {
  background-color: #af70c8;
}

[data-theme="purple"] .nav-btn,
[data-theme="purple"] .sub-sidebar,
[data-theme="purple"] .card {
  box-shadow: 3px 3px 0 rgba(175, 112, 200, 0.4);
}

[data-theme="purple"] .nav-btn:hover {
  box-shadow: 5px 5px 0 rgba(175, 112, 200, 0.4);
}

[data-theme="purple"] .card {
  box-shadow: 4px 4px 0 rgba(175, 112, 200, 0.4);
}

[data-theme="purple"] .draggable-panel.is-dragging {
  box-shadow: 8px 8px 15px rgba(175, 112, 200, 0.4);
}

[data-theme="purple"] .web-button {
  box-shadow: 2px 2px 0 rgba(175, 112, 200, 0.4);
}

[data-theme="purple"] .web-button:hover {
  box-shadow: 4px 4px 0 rgba(175, 112, 200, 0.4);
}

[data-theme="purple"] .start-menu {
  box-shadow: 4px 4px 0 rgba(175, 112, 200, 0.4);
}

/* ===================================================
   THEME OVERRIDES — MINT
   =================================================== */

[data-theme="mint"] * {
  font-family: 'VT323', monospace;
}

[data-theme="mint"] .tab-title::before,
[data-theme="mint"] .start-btn::before {
  content: "🌿 ";
}

[data-theme="mint"] body,
[data-theme="mint"] .nav-btn,
[data-theme="mint"] .todo-tag,
[data-theme="mint"] .web-button {
  color: #222222;
}

[data-theme="mint"] body {
  background-color: #e6fff9;
}

[data-theme="mint"] .sub-sidebar-btn,
[data-theme="mint"] .oc-portrait-box {
  color: #2ed1ab;
}

[data-theme="mint"] .sub-sidebar-btn:hover,
[data-theme="mint"] .sub-sidebar-btn.active-sub,
[data-theme="mint"] .oc-badge,
[data-theme="mint"] .oc-portrait-box,
[data-theme="mint"] .todo-tag,
[data-theme="mint"] .web-button,
[data-theme="mint"] .start-item:hover {
  background-color: #e6fff9;
}

[data-theme="mint"] .nav-btn,
[data-theme="mint"] .sub-sidebar,
[data-theme="mint"] .card,
[data-theme="mint"] .oc-badge,
[data-theme="mint"] .oc-portrait-box,
[data-theme="mint"] .todo-tag,
[data-theme="mint"] .gallery-item,
[data-theme="mint"] .web-button,
[data-theme="mint"] .start-btn,
[data-theme="mint"] .start-menu {
  border-color: #2ed1ab;
}

[data-theme="mint"] .card-header {
  border-bottom-color: #2ed1ab;
}

[data-theme="mint"] .taskbar {
  border-top-color: #2ed1ab;
}

[data-theme="mint"] .card-header,
[data-theme="mint"] .vote-btn,
[data-theme="mint"] .start-btn {
  background-color: #66ffda;
  color: #005040;
}

[data-theme="mint"] .nav-btn,
[data-theme="mint"] .sub-sidebar {
  box-shadow: 3px 3px 0 rgba(102, 255, 218, 0.5);
}

[data-theme="mint"] .nav-btn:hover {
  box-shadow: 5px 5px 0 rgba(102, 255, 218, 0.5);
}

[data-theme="mint"] .card {
  box-shadow: 4px 4px 0 rgba(102, 255, 218, 0.5);
}

[data-theme="mint"] .draggable-panel.is-dragging {
  box-shadow: 8px 8px 15px rgba(102, 255, 218, 0.5);
}

[data-theme="mint"] .web-button {
  box-shadow: 2px 2px 0 rgba(102, 255, 218, 0.5);
}

[data-theme="mint"] .web-button:hover {
  box-shadow: 4px 4px 0 rgba(102, 255, 218, 0.5);
}

[data-theme="mint"] .start-menu {
  box-shadow: 4px 4px 0 rgba(102, 255, 218, 0.5);
}

/* ===================================================
   THEME OVERRIDES — DARK
   =================================================== */

[data-theme="dark"] * {
  font-family: 'Consolas', 'Courier New', monospace;
}

[data-theme="dark"] .tab-title::before,
[data-theme="dark"] .start-btn::before {
  content: "🖤 ";
}

[data-theme="dark"] body,
[data-theme="dark"] .nav-btn,
[data-theme="dark"] .todo-tag,
[data-theme="dark"] .web-button {
  color: #e0e0e0;
}

[data-theme="dark"] body {
  background-color: #121212;
}

[data-theme="dark"] .sub-sidebar-btn,
[data-theme="dark"] .oc-portrait-box {
  color: #888888;
}

[data-theme="dark"] .sub-sidebar-btn:hover,
[data-theme="dark"] .sub-sidebar-btn.active-sub,
[data-theme="dark"] .oc-badge,
[data-theme="dark"] .oc-portrait-box,
[data-theme="dark"] .todo-tag,
[data-theme="dark"] .web-button,
[data-theme="dark"] .start-item:hover {
  background-color: #121212;
}

[data-theme="dark"] .nav-btn,
[data-theme="dark"] .sub-sidebar,
[data-theme="dark"] .card,
[data-theme="dark"] .card-btn,
[data-theme="dark"] .gallery-item,
[data-theme="dark"] .web-button:hover,
[data-theme="dark"] .taskbar,
[data-theme="dark"] .start-menu {
  background-color: #1e1e1e;
}

[data-theme="dark"] .nav-btn,
[data-theme="dark"] .sub-sidebar,
[data-theme="dark"] .card,
[data-theme="dark"] .oc-badge,
[data-theme="dark"] .oc-portrait-box,
[data-theme="dark"] .todo-tag,
[data-theme="dark"] .gallery-item,
[data-theme="dark"] .web-button,
[data-theme="dark"] .start-btn,
[data-theme="dark"] .start-menu {
  border-color: #444444;
}

[data-theme="dark"] .card-header {
  border-bottom-color: #444444;
}

[data-theme="dark"] .taskbar {
  border-top-color: #444444;
}

[data-theme="dark"] .card-header,
[data-theme="dark"] .vote-btn,
[data-theme="dark"] .start-btn {
  background-color: #2a2a2a;
}

[data-theme="dark"] .nav-btn,
[data-theme="dark"] .sub-sidebar {
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.9);
}

[data-theme="dark"] .nav-btn:hover {
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.9);
}

[data-theme="dark"] .card {
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.9);
}

[data-theme="dark"] .draggable-panel.is-dragging {
  box-shadow: 8px 8px 15px rgba(0, 0, 0, 0.9);
}

[data-theme="dark"] .web-button {
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.9);
}

[data-theme="dark"] .web-button:hover {
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.9);
}

[data-theme="dark"] .start-menu {
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.9);
}