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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: linear-gradient(145deg, #0f0c29, #1a1a3e, #24243e);
  color: #fff;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.container {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

header {
  margin-bottom: 36px;
}

header h1 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #f7971e, #ffd200);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

header p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.phone-frame {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 32px;
  padding: 32px 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}

.phone-frame::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 20%, rgba(255, 210, 0, 0.06), transparent 60%);
  pointer-events: none;
}

.buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.vibrate-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 18px 20px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  color: #fff;
  text-align: left;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.vibrate-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent 50%);
  pointer-events: none;
}

.vibrate-btn:active {
  transform: scale(0.96);
}

.btn-corta {
  background: linear-gradient(135deg, #11998e, #38ef7d);
  box-shadow: 0 4px 20px rgba(56, 239, 125, 0.25);
}

.btn-larga {
  background: linear-gradient(135deg, #4776e6, #8e54e9);
  box-shadow: 0 4px 20px rgba(71, 118, 230, 0.25);
}

.btn-patron {
  background: linear-gradient(135deg, #f093fb, #f5576c);
  box-shadow: 0 4px 20px rgba(245, 87, 108, 0.25);
}

.btn-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.btn-corta .btn-icon {
  background: rgba(255, 255, 255, 0.15);
}

.btn-larga .btn-icon {
  background: rgba(255, 255, 255, 0.15);
}

.btn-patron .btn-icon {
  background: rgba(255, 255, 255, 0.15);
}

.btn-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.btn-text .title {
  font-size: 1rem;
  font-weight: 600;
}

.btn-text .desc {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.7;
}

.vibrate-btn:focus-visible {
  outline: 2px solid #ffd200;
  outline-offset: 3px;
}

#status {
  margin-top: 20px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.3s;
}

#status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: background 0.3s, box-shadow 0.3s;
}

#status.active {
  color: rgba(255, 255, 255, 0.9);
}

#status.active .dot {
  background: #38ef7d;
  box-shadow: 0 0 12px rgba(56, 239, 125, 0.6);
  animation: pulse-dot 0.6s ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.5); }
}

#unsupported {
  display: none;
  position: relative;
  z-index: 1;
}

#unsupported .card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
}

#unsupported .card-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}

#unsupported h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #f5576c;
}

#unsupported p {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
}

#unsupported .detail {
  display: block;
  margin-top: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  font-family: monospace;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  word-break: break-all;
}

.hidden {
  display: none !important;
}

.visual-feedback {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  transition: background 0.1s;
}

.visual-feedback.shake {
  background: radial-gradient(circle at 50% 50%, rgba(255, 210, 0, 0.08), transparent 60%);
  animation: shake 0.4s ease-out;
}

@keyframes shake {
  0%, 100% { transform: translate(0); }
  10% { transform: translate(-3px, 1px); }
  20% { transform: translate(3px, -1px); }
  30% { transform: translate(-2px, 2px); }
  40% { transform: translate(2px, -2px); }
  50% { transform: translate(-1px, 1px); }
}

@keyframes vibrate-visual {
  0%, 100% { transform: translate(0) rotate(0); }
  15% { transform: translate(-4px, 1px) rotate(-0.5deg); }
  30% { transform: translate(4px, -1px) rotate(0.5deg); }
  45% { transform: translate(-3px, 2px) rotate(-0.3deg); }
  60% { transform: translate(3px, -2px) rotate(0.3deg); }
  75% { transform: translate(-2px, 1px) rotate(-0.2deg); }
  90% { transform: translate(2px, -1px) rotate(0.2deg); }
}

.vibrating .phone-frame {
  animation: vibrate-visual 0.3s ease-out;
}

@media (max-width: 380px) {
  header h1 { font-size: 1.4rem; }
  .phone-frame { padding: 24px 16px; border-radius: 24px; }
  .vibrate-btn { padding: 14px 16px; }
  .btn-icon { width: 40px; height: 40px; font-size: 1.1rem; }
}

@media (min-width: 768px) {
  header h1 { font-size: 2.2rem; }
  .phone-frame { padding: 40px 32px; }
  .vibrate-btn { padding: 22px 24px; font-size: 1.1rem; }
  .vibrate-btn:hover { transform: scale(1.02); }
  .btn-text .desc { font-size: 0.8rem; }
}
