/* PIANO KEYBOARD STYLES */
.piano-container {
  display: flex;
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 200px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), inset 0 -2px 6px rgba(255,255,255,0.05);
  background: linear-gradient(180deg, #1a1a2e 0%, #0d0d1a 100%);
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

/* White Keys */
.piano-key {
  position: relative;
  flex: 1;
  height: 100%;
  background: linear-gradient(180deg, #f8f8ff 0%, #e8e8f0 85%, #d0d0dd 100%);
  border: 1px solid rgba(0,0,0,0.15);
  border-top: none;
  border-radius: 0 0 6px 6px;
  cursor: pointer;
  z-index: 1;
  transition: background 0.08s, transform 0.08s, box-shadow 0.08s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 10px;
}

.piano-key::after {
  content: '';
  position: absolute;
  bottom: 0; left: 10%; right: 10%;
  height: 3px;
  background: rgba(0,0,0,0.08);
  border-radius: 2px 2px 0 0;
}

.piano-key:hover { background: linear-gradient(180deg, #fff 0%, #f0f0ff 85%, #ddddf0 100%); }

.piano-key.active {
  background: linear-gradient(180deg, #e0e0ff 0%, #c8c8e8 85%, #b0b0d0 100%);
  transform: scaleY(0.98);
  transform-origin: top;
  box-shadow: inset 0 2px 8px rgba(139,92,246,0.3);
}

.piano-key.active::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  border-radius: 0 0 6px 6px;
}

/* Black Keys */
.piano-key.black {
  position: absolute;
  width: 7%;
  height: 62%;
  background: linear-gradient(180deg, #2a2a3e 0%, #1a1a28 70%, #111118 100%);
  border: 1px solid rgba(0,0,0,0.4);
  border-top: none;
  border-radius: 0 0 5px 5px;
  z-index: 2;
  box-shadow: 0 4px 8px rgba(0,0,0,0.5), inset 0 -1px 2px rgba(255,255,255,0.05);
}

.piano-key.black:hover { background: linear-gradient(180deg, #353550 0%, #222230 70%, #181820 100%); }

.piano-key.black.active {
  background: linear-gradient(180deg, #3a2a6e 0%, #2a1a58 70%, #1a1040 100%);
  transform: scaleY(0.97);
  transform-origin: top;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5), 0 0 15px var(--accent-glow);
}

.piano-key.black.active::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-pink);
  box-shadow: 0 0 10px rgba(236,72,153,0.5);
  border-radius: 0 0 5px 5px;
}

/* Key Labels */
.key-label {
  font-size: 0.55rem;
  font-weight: 700;
  color: rgba(0,0,0,0.25);
  text-transform: uppercase;
  pointer-events: none;
  z-index: 3;
}

.piano-key.black .key-label {
  color: rgba(255,255,255,0.25);
  position: absolute;
  bottom: 8px;
  font-size: 0.5rem;
}

.key-shortcut {
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(0,0,0,0.15);
  margin-top: 2px;
}

.piano-key.black .key-shortcut {
  color: rgba(255,255,255,0.15);
  position: absolute;
  bottom: 20px;
}

/* Remote player visual */
.piano-key.remote-active {
  background: linear-gradient(180deg, #d8d0ff 0%, #c0b8e8 85%, #a8a0d0 100%);
}
.piano-key.black.remote-active {
  background: linear-gradient(180deg, #4a3a8e 0%, #3a2a78 70%, #2a1a60 100%);
  box-shadow: 0 2px 4px rgba(0,0,0,0.5), 0 0 12px var(--accent-glow);
}

/* Disabled state - not your turn */
.piano-container.disabled { opacity: 0.6; pointer-events: none; }
.piano-container.disabled .piano-key { cursor: default; }

/* Responsive */
@media (max-width: 700px) {
  .piano-container { height: 160px; }
  .key-label, .key-shortcut { display: none; }
}
@media (max-width: 500px) {
  .piano-container { height: 130px; }
  .piano-key.black { width: 8%; height: 58%; }
}
