:root {
  --bg: #140f1f;
  --bg2: #241937;
  --card: #ffffff;
  --text: #f3efff;
  --muted: #b6aecb;
  --accent: #8a5cff;
  --accent2: #14d5ff;
  --ok: #22c55e;
  --bad: #ef4444;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: Inter, Segoe UI, system-ui, sans-serif;
  background:
    radial-gradient(1200px 600px at 15% -10%, #4b2a7a 0%, transparent 55%),
    radial-gradient(1000px 600px at 100% 100%, #1f3f66 0%, transparent 55%),
    linear-gradient(160deg, var(--bg), var(--bg2));
  color: var(--text);
}

.screen {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}

.panel {
  width: min(920px, 100%);
  border-radius: 18px;
  padding: 20px;
  background: rgba(18, 14, 29, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

h1 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: 0.02em;
}

.sub { color: var(--muted); margin: 10px 0 16px; }

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.card {
  border-radius: 14px;
  background: linear-gradient(160deg, #fff, #f3f2f9);
  color: #1f1a2c;
  padding: 12px;
  min-height: 170px;
  border: 1px solid rgba(35, 28, 50, 0.1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(14, 10, 24, 0.24);
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.55);
  pointer-events: none;
}

.corner {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
}
.corner.bottom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  transform: rotate(180deg);
}
.suit-big {
  font-size: 2.4rem;
  text-align: center;
  margin-top: 28px;
}

.red { color: #e11d48; }
.black { color: #1f2937; }

.expression-wrap {
  display: grid;
  gap: 6px;
}

label {
  font-size: 0.85rem;
  color: #cbc4de;
}

input {
  width: 100%;
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  font-size: 1rem;
}
input:focus {
  border-color: rgba(20, 213, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(20, 213, 255, 0.2);
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.btn {
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: 0.2s ease;
}
.btn:hover { background: rgba(255,255,255,0.15); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  color: #fff;
  font-weight: 600;
}

.status {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: #d7d0e7;
}
.status.ok { color: #d8ffe3; background: rgba(34,197,94,0.2); }
.status.bad { color: #ffdada; background: rgba(239,68,68,0.22); }

.help {
  margin-top: 14px;
  color: #cfc6e7;
}
.help summary { cursor: pointer; }
.help ul { margin: 8px 0 0 20px; }

@media (max-width: 760px) {
  .cards { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
}
