/* ─── Hotel Arcade Card UI ─────────────────────────────────── */

/* Side-by-side card slots wrapper */
.card-slots-row {
  display: flex;
  gap: 16px;
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

/* Card Slot Area (inside cabinet) */
.card-slot-area {
  flex: 1;
  max-width: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 0;
  overflow: hidden;
  transition: min-height .4s ease;
  padding: 8px 4px;
  border-radius: 10px;
  background: rgba(200,168,76,.04);
  border: 1px solid rgba(200,168,76,.12);
}

.card-slot-area.active {
  min-height: 160px;
}

/* The physical card reader slot */
.card-reader {
  position: relative;
  width: 180px;
  height: 10px;
  background: linear-gradient(180deg, #0a0a1a, #1a1a3a);
  border: 2px solid #3a3a7a;
  border-radius: 4px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.8), 0 0 8px rgba(100,150,255,.15);
  overflow: visible;
  z-index: 5;
}

.card-reader::before {
  content: '';
  position: absolute;
  top: 2px; left: 50%;
  transform: translateX(-50%);
  width: 140px; height: 3px;
  background: #000;
  border-radius: 2px;
  border: 1px solid #4a4a8a;
}

/* LED indicator on card reader */
.card-reader-led {
  position: absolute;
  top: -6px; right: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #333;
  box-shadow: 0 0 3px rgba(0,0,0,.5);
  transition: all .3s;
}

.card-reader-led.ready {
  background: #00cc66;
  box-shadow: 0 0 6px rgba(0,204,102,.6);
}

.card-reader-led.active {
  background: #ffaa00;
  box-shadow: 0 0 6px rgba(255,170,0,.6);
  animation: ledBlink 1.5s ease-in-out infinite;
}

@keyframes ledBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* Card tray – clips the card during insert/eject animation */
.card-tray {
  width: 180px;
  height: 110px;
  overflow: hidden;
  margin-top: -10px;
  position: relative;
}

/* ─── The Card itself (Telefonkarten-style) ─── */
.arcade-card {
  position: relative;
  width: 165px;
  height: 104px;
  margin: 2px auto 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #1a1040 0%, #2a1860 30%, #1a1040 60%, #2a1860 100%);
  border: 2px solid;
  border-image: linear-gradient(135deg, #c9a84c, #f0d878, #c9a84c, #a07830) 1;
  box-shadow:
    0 4px 20px rgba(0,0,0,.6),
    0 0 30px rgba(200,168,76,.15),
    inset 0 1px 0 rgba(255,255,255,.08);
  overflow: hidden;
  transform: translateY(115px);
  transition: none;
}

/* Phase 1: Card rises up into tray, fully visible (0.5s) */
.arcade-card.showing {
  transform: translateY(0);
  transition: transform .5s ease-out;
}

/* Phase 2: Card pulled UP out of tray into reader slot (3s) */
.arcade-card.inserted {
  transform: translateY(-115px);
  transition: transform 3s cubic-bezier(.4,.0,.2,1);
}

/* Eject: Card slides back down into tray (0.8s) */
.arcade-card.ejecting {
  transform: translateY(0);
  transition: transform .8s ease-out;
}

/* Holographic shimmer effect */
.arcade-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(200,168,76,.08) 30%,
    rgba(255,255,255,.06) 35%,
    transparent 40%,
    transparent 60%,
    rgba(100,150,255,.05) 65%,
    rgba(200,168,76,.08) 70%,
    transparent 80%
  );
  animation: shimmer 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0%, 100% { transform: translateX(-100%) rotate(0deg); }
  50% { transform: translateX(100%) rotate(0deg); }
}

/* Card chip (gold IC contact) */
.card-chip {
  position: absolute;
  top: 28px; left: 16px;
  width: 38px; height: 28px;
  background: linear-gradient(135deg, #d4a83a, #f0d878, #c9a040, #e8c850);
  border-radius: 4px;
  box-shadow:
    0 1px 4px rgba(0,0,0,.4),
    inset 0 0 0 1px rgba(255,255,255,.2);
}

/* Chip contact lines */
.card-chip::before {
  content: '';
  position: absolute;
  top: 4px; left: 4px; right: 4px; bottom: 4px;
  border: 1px solid rgba(160,120,48,.5);
  border-radius: 2px;
}

.card-chip::after {
  content: '';
  position: absolute;
  top: 50%; left: 4px; right: 4px;
  height: 1px;
  background: rgba(160,120,48,.5);
  box-shadow:
    0 -6px 0 rgba(160,120,48,.4),
    0 6px 0 rgba(160,120,48,.4);
}

/* Card branding */
.card-brand {
  position: absolute;
  top: 8px; left: 16px;
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(200,168,76,.6);
}

.card-hotel-badge {
  position: absolute;
  top: 6px; right: 12px;
  font-size: .55rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: rgba(200,168,76,.8);
  text-shadow: 0 0 8px rgba(200,168,76,.3);
}

/* Card info (bottom section) */
.card-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 6px 14px 8px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.3));
}

.card-name {
  font-size: .65rem;
  font-weight: 700;
  color: rgba(255,255,255,.75);
  letter-spacing: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.card-number {
  font-size: .55rem;
  font-family: 'Courier New', monospace;
  color: rgba(200,168,76,.5);
  letter-spacing: 2px;
  margin-top: 1px;
}

/* Card remaining credits display */
.card-credits {
  position: absolute;
  bottom: 8px; right: 12px;
  text-align: right;
}

.card-credits-label {
  font-size: .45rem;
  color: rgba(255,255,255,.35);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.card-credits-value {
  font-size: 1.1rem;
  font-weight: 900;
  color: #88bbff;
  text-shadow: 0 0 10px rgba(100,150,255,.4);
  line-height: 1;
}

.card-credits-value.low {
  color: #ff8866;
  text-shadow: 0 0 10px rgba(255,100,80,.4);
}

.card-credits-value.empty {
  color: #ff4466;
  text-shadow: 0 0 10px rgba(255,60,100,.4);
}

/* ─── Card Action Buttons ─── */
.card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.card-insert-btn,
.card-eject-btn {
  padding: 5px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: .65rem;
  letter-spacing: .5px;
  cursor: pointer;
  transition: all .2s;
  text-transform: uppercase;
  border: none;
}

.card-insert-btn {
  background: linear-gradient(180deg, rgba(200,168,76,.2), rgba(200,168,76,.08));
  border: 2px solid rgba(200,168,76,.5);
  color: #f0d878;
}

.card-insert-btn:hover {
  background: linear-gradient(180deg, rgba(200,168,76,.35), rgba(200,168,76,.18));
  box-shadow: 0 0 20px rgba(200,168,76,.25);
  transform: scale(1.03);
}

.card-eject-btn {
  background: linear-gradient(180deg, rgba(255,100,80,.12), rgba(255,100,80,.05));
  border: 2px solid rgba(255,100,80,.3);
  color: #ff8866;
  font-size: .65rem;
  padding: 4px 12px;
}

.card-eject-btn:hover {
  background: linear-gradient(180deg, rgba(255,100,80,.25), rgba(255,100,80,.12));
  box-shadow: 0 0 15px rgba(255,100,80,.2);
}

/* Card status text */
.card-status-text {
  font-size: .7rem;
  color: rgba(200,168,76,.6);
  text-align: center;
  min-height: 1em;
}

.card-status-text.error {
  color: #ff4466;
}

/* ─── Separator between coin and card sections ─── */
.card-separator {
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,168,76,.2), transparent);
  margin: 4px 0;
}

/* ─── Quota display (next to card slot) ─── */
.card-quota-display {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 0;
}

.card-quota-value {
  font-size: 1.3rem;
  font-weight: 900;
  color: #f0d878;
  text-shadow: 0 0 10px rgba(200,168,76,.3);
  line-height: 1;
}

.card-quota-value.low {
  color: #ff8866;
  text-shadow: 0 0 10px rgba(255,100,80,.3);
}

.card-quota-value.empty {
  color: #ff4466;
  text-shadow: 0 0 10px rgba(255,60,100,.3);
}

.card-quota-label {
  font-size: .6rem;
  color: rgba(200,168,76,.5);
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* ─── No-card state ─── */
.card-no-access {
  display: none;
}

/* ─── Loading state ─── */
.card-loading {
  font-size: .65rem;
  color: rgba(255,255,255,.3);
  letter-spacing: 1px;
}

@keyframes cardPulse {
  0%, 100% { opacity: .3; }
  50% { opacity: 1; }
}

.card-loading::after {
  content: '...';
  animation: cardPulse 1.5s ease-in-out infinite;
}
