.ak-fandeck-wrapper {
  --ak-bg: #555555;
  --ak-accent: #00b3b3;
  --ak-text: #ffffff;

  position: relative;
  padding: 32px 24px 24px;
  border-radius: 8px;
  background: var(--ak-bg);
  color: var(--ak-text);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  box-sizing: border-box;
}

.ak-fandeck-wrapper:focus {
  outline: 2px solid var(--ak-accent);
  outline-offset: 2px;
}

.ak-fandeck-top {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.ak-fandeck-search-box {
  display: flex;
  align-items: stretch;
  background: #ffffff;
  border-radius: 2px;
  overflow: hidden;
  max-width: 360px;
  flex: 1 1 260px;
}

.ak-fandeck-search-input {
  border: none;
  padding: 10px 12px;
  font-size: 14px;
  flex: 1 1 auto;
  outline: none;
}

.ak-fandeck-search-button {
  border: none;
  min-width: 44px;
  cursor: pointer;
  font-size: 16px;
  background: var(--ak-accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ak-fandeck-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ak-fandeck-filter {
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: transparent;
  border-radius: 2px;
  padding: 6px 12px;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ak-fandeck-filter.active {
  background: var(--ak-accent);
  border-color: var(--ak-accent);
  color: #ffffff;
}

.ak-fandeck-middle {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  margin-bottom: 16px;
}

.ak-fandeck-fan {
  position: relative;
  width: 520px;
  max-width: 100%;
  height: 320px;
}

.ak-fandeck-card {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 120px;
  max-width: 30vw;
  height: 260px;
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  background: #ffffff;
  transform-origin: bottom center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 10px;
  font-size: 11px;
  box-sizing: border-box;
  cursor: pointer;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.ak-fandeck-card-code {
  font-size: 11px;
  font-weight: 500;
}

.ak-fandeck-card-name {
  font-size: 11px;
  font-weight: 600;
}

.ak-fandeck-card.active {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.ak-fandeck-mouse-hint {
  position: absolute;
  right: 24px;
  top: 0;
  font-size: 11px;
  opacity: 0.8;
  max-width: 220px;
  text-align: right;
}

.ak-fandeck-bottom {
  margin-top: 8px;
}

.ak-fandeck-strip-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  margin-bottom: 10px;
  padding-bottom: 4px;
}

.ak-fandeck-strip {
  display: flex;
  gap: 2px;
  min-height: 32px;
}

.ak-fandeck-swatch {
  border: none;
  width: 18px;
  height: 28px;
  border-radius: 2px 2px 0 0;
  cursor: pointer;
  flex: 0 0 auto;
  opacity: 0.8;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.ak-fandeck-swatch.active {
  transform: translateY(-4px);
  opacity: 1;
  box-shadow: 0 0 0 2px #ffffff, 0 4px 8px rgba(0, 0, 0, 0.4);
}

.ak-fandeck-info {
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  padding-top: 8px;
  padding-bottom: 4px;
}

.ak-fandeck-info-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.ak-fandeck-info-code {
  font-size: 13px;
  margin-bottom: 2px;
}

.ak-fandeck-info-extra {
  font-size: 12px;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .ak-fandeck-wrapper {
    padding: 20px 16px;
  }

  .ak-fandeck-middle {
    min-height: 260px;
  }

  .ak-fandeck-fan {
    height: 260px;
  }

  .ak-fandeck-card {
    height: 220px;
    width: 100px;
    font-size: 10px;
  }

  .ak-fandeck-mouse-hint {
    position: static;
    margin-top: 8px;
    text-align: center;
  }
}
