/* Commands page specific styles */

.commands-hero {
  margin-top: 3.5rem;
  margin-bottom: 2.5rem;
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: none;
}
.commands-hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}
.commands-hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  letter-spacing: 0.03em;
  background: linear-gradient(90deg, #43b7ce 0%, #0e7c73 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 2px 16px rgba(23, 150, 189, 0.13));
}
.commands-hero-intro {
  max-width: 540px;
  margin: 0 auto;
  color: #e6f7f6;
  font-size: 1.18rem;
  line-height: 1.6;
  text-align: center;
}
.hint-accent {
  color: #43b7ce;
  font-weight: 600;
  font-size: 1.01em;
  margin-top: 0.5em;
  display: inline-block;
}

/* --- Commands Search Bar --- */
.commands-search-row {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2.2rem;
  gap: 0.5em;
}
#commands-search {
  width: 320px;
  max-width: 90vw;
  padding: 0.8em 2.5em 0.8em 1.1em;
  border-radius: 1.2em;
  border: none;
  background: rgba(23,189,177,0.08);
  color: #fff;
  font-size: 1.08em;
  font-family: inherit;
  box-shadow: 0 2px 16px 0 rgba(23, 156, 189, 0.1);
  outline: none;
  transition: background 0.18s, box-shadow 0.18s;
}
#commands-search:focus {
  background: rgba(23, 164, 189, 0.16);
  box-shadow: 0 4px 24px 0 rgba(23, 150, 189, 0.18);
}
.search-icon {
  position: relative;
  left: -2.2em;
  color: #43b7ce;
  font-size: 1.2em;
  pointer-events: none;
}

/* --- Plugins Showcase Layout --- */
.plugin-section {
  margin-bottom: 3.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(23,189,177,0.08);
}
.plugin-title {
  font-size: 2.1rem;
  font-weight: 700;
  color: #43b7ce;
  margin-bottom: 0.2em;
  letter-spacing: 0.01em;
}
.plugin-desc {
  color: #b6eae6;
  font-size: 1.13rem;
  margin-bottom: 1.2em;
  font-weight: 500;
}
.plugin-groups {
  margin-left: 0.5em;
}
.plugin-group-title {
  font-size: 1.18rem;
  font-weight: 600;
  color: #43b7ce;
  margin: 1.2em 0 0.3em 0;
  letter-spacing: 0.01em;
}
.plugin-command-list {
  margin: 0 0 0.7em 0.7em;
  padding: 0;
  list-style: none;
}
.plugin-command-list li {
  color: #e6f7f6;
  font-size: 1.05em;
  margin-bottom: 0.2em;
  line-height: 1.6;
}
.plugin-command-list code {
  color: #43b7ce;
  background: #1a1c20;
  border-radius: 0.4em;
  padding: 0.13em 0.5em;
  font-size: 1em;
  font-family: inherit;
  font-weight: 600;
  margin-right: 0.3em;
}

/* Plugins Grid Styles */
.plugins-grid { display: contents; }
.commands-showcase {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 2.2rem;
  width: 100%;
  max-width: 1200px;
  margin: 2.5rem auto 4rem auto;
}
.commands-col {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  flex: 1 1 0;
  min-width: 260px;
  position: relative;
}
.command-card.glass {
  width: 100%;
  box-sizing: border-box;
  background: rgba(36, 44, 54, 0.85);
  border: 1.5px solid rgba(67, 183, 206, 0.13);
  box-shadow: 0 2px 8px 0 rgba(23, 156, 189, 0.08);
  border-radius: 1.3em;
  padding: 1em 1.2em;
  transition: box-shadow 0.18s, border 0.18s, background 0.18s;
  cursor: pointer;
  position: relative;
  min-height: 84px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow: visible;
}
.command-card.glass:hover {
  background: rgba(36, 44, 54, 0.97);
  border: 1.5px solid #43b7ce;
  box-shadow: 0 4px 16px 0 rgba(23, 164, 189, 0.10);
  z-index: 2;
}
.command-card-header {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-between;
  font-size: 1.25rem;
  font-weight: 700;
  color: #43b7ce;
  margin-bottom: 0.2em;
  user-select: none;
}
.command-card-title {
  font-size: 1.18em;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.command-card-chevron {
  font-size: 1.2em;
  transition: transform 0.25s;
}
.command-card.expanded .command-card-chevron {
  transform: rotate(180deg);
}
.command-card-desc {
  color: #b6eae6;
  font-size: 1.01rem;
  margin-bottom: 0.7em;
  font-weight: 500;
  width: 100%;
  user-select: none;
}
.command-groups-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.7em;
  overflow: hidden;
  height: 0;
  pointer-events: none;
  margin-top: 0;
  transition: height 0.28s cubic-bezier(.4,.2,.2,1);
}
.command-card.expanded .command-groups-list {
  /* height will be set inline by JS to scrollHeight, then to auto after transition */
  pointer-events: auto;
  margin-top: 0.7em;
}

/* Modal Styles */
.command-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw; height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 24, 30, 0.55);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(.7,1.6,.5,1);
}
.command-modal.open {
  opacity: 1;
  pointer-events: auto;
}
.command-modal.closing {
  opacity: 0;
  pointer-events: none;
}
.command-modal-content {
  position: relative;
  background: linear-gradient(120deg, rgba(36, 44, 54, 0.65) 60%, rgba(23, 164, 189, 0.1) 100%);
  border-radius: 1.2em;
  border: 1.5px solid rgba(23, 156, 189, 0.1); /* much softer border */
  box-shadow: 0 8px 32px 0 rgba(23, 164, 189, 0.18);
  padding: 2.5em 2.2em 1.5em 2.2em;
  min-width: 340px;
  min-height: 120px;
  max-width: 95vw;
  max-height: 90vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  animation: modal-in 0.4s cubic-bezier(.7,1.6,.5,1);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  transform: none; /* Prevent subpixel jump after animation */
  will-change: transform;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: none; }
}
.command-modal-close {
  position: absolute;
  top: 0.3em;
  right: 0.7em;
  font-size: 1.7em;
  color: #43b7ce;
  cursor: pointer;
  font-weight: 700;
  background: none;
  border: none;
  z-index: 2;
  transition: color 0.18s;
  line-height: 1;
  padding: 0;
}
.command-modal-close:hover {
  color: #b42e50;
}
.command-modal-header {
  font-size: 1.35em;
  font-weight: 800;
  color: #43b7ce;
  margin-bottom: 1.1em;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 16px rgba(23, 150, 189, 0.13);
  line-height: 1.2;
  padding-right: 2.5em; /* space for X */
}
.command-modal-commands {
  margin: 1.5em 0 0 0;
  padding: 0;
  list-style: none;
}
.command-modal-commands li {
  color: #e6f7f6;
  font-size: 1.08em;
  margin-bottom: 0.4em;
  line-height: 1.6;
  font-weight: 500;
}
.command-modal-commands code {
  color: #43b7ce;
  background: #1a1c20;
  border-radius: 0.4em;
  padding: 0.13em 0.5em;
  font-size: 1em;
  font-family: inherit;
  font-weight: 700;
  margin-right: 0.3em;
}
.command-group-btn {
  background: rgba(23, 156, 189, 0.1);
  color: #43b7ce;
  border: 1.5px solid #43b7ce;
  border-radius: 0.7em;
  padding: 0.45em 1.1em;
  font-size: 1.08em;
  font-weight: 600;
  margin: 0;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border 0.18s, box-shadow 0.18s;
  outline: none;
  box-shadow: 0 2px 8px rgba(23,189,177,0.10);
  display: block;
  text-align: left;
}
.command-group-btn:hover, .command-group-btn:focus {
  background: #43b7ce;
  color: #0d0e10;
  border-color: #43b7ce;
  box-shadow: 0 4px 16px rgba(23, 178, 189, 0.18);
}

/* Responsive tweaks */
@media (max-width: 1100px) {
  .commands-showcase { gap: 1.2rem; max-width: 900px; }
  .commands-col { min-width: 220px; }
}
@media (max-width: 900px) {
  .commands-showcase { flex-wrap: wrap; gap: 1.2rem; }
  .commands-col { min-width: 45vw; }
}
@media (max-width: 700px) {
  .commands-showcase { flex-direction: column; gap: 1.2rem; max-width: 98vw; }
  .commands-col { min-width: 0; width: 100%; }
  .commands-hero-title { font-size: 2.2rem; }
  .commands-hero-intro { font-size: 1rem; padding: 0 1rem; }
  .command-card.glass {
    padding: 0.85em 1em;
    min-height: 72px;
  }
  .command-card-title { font-size: 1em; }
  .command-card-desc { font-size: 0.93rem; margin-bottom: 0.35em; }
}

#commands-detail {
  max-width: 600px;
  margin: 2rem auto 0 auto;
  position: relative;
}

.commands-detail-header {
  display: flex;
  align-items: center;
  gap: 1.2em;
  margin-bottom: 1.2em;
}

#back-to-groups {
  margin-bottom: 1.5em;
  margin-left: 0;
  display: none;
  align-self: flex-start;
}

#back-btn-row {
  width: 100vw;
  display: flex;
  align-items: flex-start;
  margin-top: 0.7rem;
}

#detail-category {
  font-size: 1.5em;
  font-weight: bold;
  color: #43b7ce !important;
  margin: 0;
  text-align: left;
  flex: 1;
}
.command-detail {
  margin-bottom: 1.2em;
  padding: 1em 1.2em;
  background: linear-gradient(135deg, #292c33 80%, #18191c 100%);
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(23, 156, 189, 0.1), 0 0 0 2px #18191c;
  border: 2px solid #18191c;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.18s, background 0.18s, filter 0.18s;
  cursor: pointer;
}
.command-detail:hover {
  background: linear-gradient(135deg, #31343b 80%, #18191c 100%);
  box-shadow: 0 6px 24px rgba(23, 156, 189, 0.13), 0 0 0 2px #43b7ce;
  filter: brightness(1.07);
}
.command-name {
  font-weight: bold;
  color: #fff;
  font-size: 1.08em;
  margin-bottom: 0.3em;
}
.command-desc {
  color: #bbb;
  font-size: 1em;
}
html, body {
  min-height: 140vh !important;
  height: auto !important;
}
body {
  height: auto !important;
}

@keyframes command-card-deal {
  0% {
    opacity: 0;
    transform: translateY(60px) scale(0.85) rotateZ(var(--deal-rot, 0deg));
    filter: blur(8px) brightness(1.2);
  }
  60% {
    opacity: 1;
    transform: translateY(-12px) scale(1.05) rotateZ(var(--deal-rot, 0deg));
    filter: blur(1.5px) brightness(1.08);
  }
  80% {
    opacity: 1;
    transform: translateY(2px) scale(0.98) rotateZ(0deg);
    filter: blur(0.5px) brightness(1.01);
  }
  100% {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
.command-card.glass.deal-animate {
  animation: command-card-deal 0.7s cubic-bezier(.7,0,.3,1) both;
}
@keyframes command-card-fan {
  0% {
    opacity: 0;
    transform: scale(0.7) translateY(80px) rotateZ(var(--fan-rot, 0deg)) skewY(8deg);
    filter: blur(10px) brightness(1.2);
  }
  40% {
    opacity: 1;
    transform: scale(1.08) translateY(-10px) rotateZ(var(--fan-rot, 0deg)) skewY(-2deg);
    filter: blur(2px) brightness(1.08);
  }
  70% {
    opacity: 1;
    transform: scale(0.98) translateY(2px) rotateZ(0deg) skewY(0deg);
    filter: blur(0.5px) brightness(1.01);
  }
  100% {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
.command-card.glass.fan-animate {
  animation: command-card-fan 0.85s cubic-bezier(.7,0,.3,1) both;
}
@keyframes command-card-throw {
  0% {
    opacity: 0;
    transform: translateX(0) scale(0.7) rotateZ(-12deg) skewY(8deg);
    filter: blur(10px) brightness(1.2);
    z-index: 1;
  }
  40% {
    opacity: 1;
    transform: translateX(var(--throw-x, 0)) scale(1.08) rotateZ(4deg) skewY(-2deg);
    filter: blur(2px) brightness(1.08);
    z-index: 2;
  }
  70% {
    opacity: 1;
    transform: translateX(calc(var(--throw-x, 0) * 0.95)) scale(0.98) rotateZ(0deg) skewY(0deg);
    filter: blur(0.5px) brightness(1.01);
    z-index: 2;
  }
  100% {
    opacity: 1;
    transform: none;
    filter: none;
    z-index: 2;
  }
}
.command-card.glass.throw-animate {
  animation: command-card-throw 0.85s cubic-bezier(.7,0,.3,1) both;
}
