/* Universal Voice Card — ใช้ได้ทุก V (V2-V6) */
:root {
  --bg-card: linear-gradient(160deg, #131722 0%, #1a1f33 100%);
  --bg-card-hover: linear-gradient(160deg, #1a1f33 0%, #232a45 100%);
  --border: #1f2535;
  --border-hover: #017741;
  --accent: #017741;
  --accent-2: #35D073;
  --text: #e8eaf1;
  --text-dim: #9aa3b2;
  --text-bright: #fff;
  --gold: #ffd166;
  --green: #4ecb71;
  --red: #ff4e4e;
}

.voice-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.voice-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(1,119,65, 0.15);
}
.voice-card .vc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.voice-card .vc-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-bright);
}
.voice-card .vc-tag {
  font-size: 11px;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.voice-card .vc-saved {
  margin-left: auto;
  font-size: 11px;
  color: var(--gold);
  font-weight: 600;
  display: none;
}
.voice-card.is-saved .vc-saved { display: inline; }

.voice-card .vc-sliders { display: flex; flex-direction: column; gap: 8px; }
.voice-card .vc-sliders label {
  display: grid;
  grid-template-columns: 100px 1fr 40px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
}
.voice-card .vc-sliders input[type="range"] {
  width: 100%;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: #1f2535;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
.voice-card .vc-sliders input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--text-bright);
  box-shadow: 0 0 0 1px var(--border);
}
.voice-card .vc-sliders input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--text-bright);
}
.voice-card .vc-sliders .vc-val {
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.voice-card .vc-text {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  min-height: 38px;
  max-height: 80px;
}
.voice-card .vc-text:focus { outline: none; border-color: var(--accent); }

.voice-card .vc-play {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.voice-card .vc-play:hover { opacity: 0.9; transform: scale(1.01); }
.voice-card .vc-play:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.voice-card .vc-play.playing { background: linear-gradient(135deg, #ff7a8a 0%, #ff4e4e 100%); }

.voice-card .vc-audio {
  width: 100%;
  height: 36px;
  border-radius: 8px;
}
.voice-card .vc-audio::-webkit-media-controls-panel {
  background: rgba(0, 0, 0, 0.3);
}

.voice-card .vc-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}
.voice-card .vc-actions button {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  padding: 8px 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.voice-card .vc-actions button:hover {
  border-color: var(--accent);
  color: var(--text-bright);
  background: rgba(1,119,65, 0.08);
}
.voice-card .vc-actions button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.voice-card .vc-status {
  font-size: 12px;
  text-align: center;
  min-height: 16px;
  color: var(--green);
  font-weight: 500;
}
.voice-card .vc-status.error { color: var(--red); }
.voice-card .vc-status.warn { color: var(--gold); }

.voice-card .vc-default-audio {
  width: 100%;
  height: 28px;
  margin-top: 4px;
  opacity: 0.7;
  border-radius: 6px;
}
.voice-card .vc-default-audio:hover { opacity: 1; }

.voice-card .vc-meta {
  display: flex;
  gap: 6px;
  font-size: 11px;
  color: #6a7384;
  flex-wrap: wrap;
}
.voice-card .vc-meta span {
  background: rgba(255, 255, 255, 0.03);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Grid container */
.voice-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
  padding: 16px 0;
}

@media (max-width: 480px) {
  .voice-card { max-width: 100%; }
  .voice-card .vc-sliders label { grid-template-columns: 80px 1fr 36px; font-size: 12px; }
  .voice-card-grid { grid-template-columns: 1fr; }
}
