* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, sans-serif;
  background: #f3f4f6;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.app {
  width: 100%;
  max-width: 360px;
  padding: 16px;
}

.card-container {
  perspective: 1000px;
}

.card {
  width: 100%;
  height: 220px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(.4,.2,.2,1);
  cursor: pointer;
}

.card.flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backface-visibility: hidden;
  text-align: center;
  font-size: 24px;
  font-weight: 600;
}

.card-back {
  transform: rotateY(180deg);
  background: #111827;
  color: #fff;
}

.controls {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
}

button {
  flex: 1;
  margin: 0 4px;
  padding: 12px;
  font-size: 16px;
  border: none;
  border-radius: 10px;
  background: #111827;
  color: white;
}

.offline::after {
  content: "Offline mode";
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: white;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
}