/* LLT AIO Twitch Extension - Tactical Unit Stylings */

@import url("https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;700;800&display=swap");

:root {
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --color-gold: #d4af37;
  --color-accent: #6c89fd;
  --color-bg-dark: #363753; /* INDIGO - Main Site Match */
  --color-bg-deep: #1e1e30; /* MIDNIGHT - Main Site Match */
  --color-text: #fff0db;
  --color-text-dim: rgba(255, 240, 219, 0.6);
  --glass-bg: rgba(30, 30, 48, 0.85); /* Tinted Indigo Glass */
  --glass-border: rgba(108, 137, 253, 0.2);
  --font-main: "Ubuntu", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 100%;
  height: 100vh;
  font-family: var(--font-main);
  background-color: transparent; /* Allows transparency over stream */
  color: var(--color-text);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

/* The Tactical Unit Chassis */
#app-unit {
  width: 100%;
  max-width: 320px;
  height: 100%;
  max-height: 500px;
  background: var(--glass-bg);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  border-top: 1px solid rgba(255, 240, 219, 0.4);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(108, 137, 253, 0.15),
    inset 0 0 20px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  animation: unitEntrance 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes unitEntrance {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#controller {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 15px;
  overflow-y: auto;
  scrollbar-width: none;
}

#controller::-webkit-scrollbar {
  display: none;
}

/* Refined Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.header-actions {
  display: flex;
  gap: 8px;
}

.logo-mini {
  padding: 6px 16px;
  background: rgba(80, 85, 125, 0.2);
  border: 1px solid rgba(108, 137, 253, 0.3);
  border-radius: 50px;
  font-size: 0.55rem;
  font-weight: 400; /* Subtle weight */
  letter-spacing: 0.05em;
  text-transform: none; /* Removed all-caps */
}

.gold-text {
  background: linear-gradient(135deg, #ffffff 0%, #d4af37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.panel-logo {
  display: block;
  width: 58px;
  margin: 25px auto 20px auto;
  filter: drop-shadow(0 0 12px rgba(108, 137, 253, 0.4));
  transition: var(--transition);
}

.panel-logo:hover {
  transform: scale(1.05);
}

#main-interface {
  flex: 1;
}

/* 2-Column Grid */
#main-panel {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 0 auto 15px auto;
  max-width: 260px; /* Centering and compacting the grid width */
}

.slot {
  position: relative;
  width: 100%;
  aspect-ratio: 2.2; /* Even slimmer profile */
  border-radius: 8px;
  background: rgba(5, 5, 8, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.slot svg.icon {
  height: 35%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Universal Icon Colors */
svg.green {
  color: #4caf50;
  filter: drop-shadow(0 0 10px rgba(76, 175, 80, 0.4));
}
svg.red {
  color: #fa6d47;
  filter: drop-shadow(0 0 10px rgba(250, 109, 71, 0.4));
}

/* Action Buttons */
/* Action Buttons */
.action-grid {
  display: flex;
  gap: 10px;
}

.icon-btn {
  background: transparent;
  border: none;
  padding: 5px;
  cursor: pointer;
  color: var(--color-text);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-gold);
}

.icon-btn svg {
  width: 20px !important;
  height: 20px !important;
}

.settings-gear {
  color: var(--color-gold);
  filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.3));
}

.settings-gear svg {
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-gear:hover svg {
  transform: rotate(180deg);
}

.action-grid button {
  flex: 1;
  height: 52px; /* Increased height for primary actions */
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.75rem; /* Larger font for primary status */
  transition: var(--transition);
  text-transform: none;
}

#backstab {
  background: linear-gradient(160deg, #50050a 0%, #1e0002 100%);
  border: 1px solid rgba(180, 20, 20, 0.4);
  color: #ffeaea;
}

#backstab:not(.locked):hover {
  box-shadow: 0 5px 20px rgba(180, 20, 20, 0.5);
  border-color: rgba(255, 50, 50, 0.6);
  transform: translateY(-2px);
}

#heal {
  background: linear-gradient(160deg, #05501e 0%, #001e0a 100%);
  border: 1px solid rgba(20, 180, 60, 0.4);
  color: #eaffea;
}

#heal:not(.locked):hover {
  box-shadow: 0 5px 20px rgba(40, 255, 100, 0.4);
  border-color: rgba(40, 255, 100, 0.6);
  transform: translateY(-2px);
}

.locked {
  opacity: 0.6 !important;
  filter: grayscale(0.8);
  pointer-events: none;
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px dashed rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.3) !important;
  position: relative;
  overflow: hidden;
  animation: chargingBreathing 2s ease-in-out infinite;
}

/* Technical Shimmer Effect */
.locked::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.05),
    transparent
  );
  animation: chargingShimmer 3s infinite;
}

@keyframes chargingBreathing {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(0.98);
    opacity: 0.7;
  }
}

@keyframes chargingShimmer {
  0% {
    left: -100%;
  }
  30% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

/* Trigger Effect */
.triggered {
  transform: scale(0.9) !important;
  filter: brightness(2) !important;
}

/* Info Panel */
#info-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 20px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
}

.info-item {
  font-size: 0.5rem;
  font-weight: 500; /* Matching new typography weight */
  color: var(--color-text-dim);
  display: flex;
  align-items: center;
  justify-content: center; /* Centered alignment */
  gap: 6px;
}

.info-item svg,
.info-item .tiny-icon {
  width: 10px !important;
  height: 10px !important;
  font-size: 0.6rem !important;
  flex-shrink: 0;
}

.footer-credit {
  font-size: 0.6rem;
  margin-top: 20px;
  opacity: 0.5;
  text-align: center;
}

#settings-view {
  position: absolute;
  inset: 0;
  background: rgba(30, 30, 48, 0.98); /* Matching Midnight Indigo */
  backdrop-filter: blur(30px);
  z-index: 100;
  display: none;
  flex-direction: column;
  padding: 25px;
  overflow-y: auto;
  scrollbar-width: none;
}

#settings-view::-webkit-scrollbar {
  display: none;
}

#settings-view.visible {
  display: flex;
}

.settings-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
  color: var(--color-gold);
  font-weight: 800;
  font-size: 1.1rem;
}

.settings-description {
  font-size: 0.75rem;
  color: var(--color-text-dim);
  margin-bottom: 20px;
  line-height: 1.4;
}

.back-btn {
  width: 32px;
  height: 32px;
  color: var(--color-gold);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.back-btn:hover {
  background: rgba(212, 175, 55, 0.2);
  transform: scale(1.1);
}

.back-btn svg {
  width: 18px;
  height: 18px;
}

.settings-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-list li {
  width: 100%;
}

.settings-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  color: white;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.settings-list a:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-gold);
  transform: translateX(5px);
}

.menu-icon {
  width: 18px !important;
  height: 18px !important;
  color: var(--color-gold);
  flex-shrink: 0;
}
