﻿:root {
  --bg-start: #0f2027;
  --bg-end: #2c5364;
  --card: rgba(255, 255, 255, 0.95);
  --border: rgba(255, 255, 255, 0.25);
  --accent: #38b6ff;
  --accent-2: #ff8a00;
  --text: #0b1120;
  --muted: rgba(11, 17, 32, 0.7);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 20%, rgba(56, 182, 255, 0.4), transparent 55%),
    linear-gradient(135deg, var(--bg-start), var(--bg-end));
  overflow: hidden;
}

.page {
  width: 100%;
  max-width: 380px;
  padding: 16px;
}

.card {
  background: var(--card);
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.32);
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.card-header {
  padding: 20px 18px 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  text-align: center;
}

.card-header h1 {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
}

.subtitle {
  margin: 6px 0 0;
  font-size: 0.9rem;
  opacity: 0.88;
}

.card-body {
  padding: 18px 16px 14px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field label {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.015em;
}

select,
input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(11, 17, 32, 0.12);
  background: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

select:focus,
input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(56, 182, 255, 0.25);
  transform: translateY(-1px);
}

.actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

button {
  appearance: none;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  padding: 12px 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  transition: transform 120ms ease, filter 120ms ease;
  box-shadow: 0 12px 28px rgba(56, 182, 255, 0.28);
}

button.secondary {
  background: rgba(11, 17, 32, 0.08);
  color: rgba(11, 17, 32, 0.85);
  box-shadow: none;
}

button:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

button.secondary:hover {
  background: rgba(11, 17, 32, 0.12);
}

.result {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(11, 17, 32, 0.1);
  background: rgba(255, 255, 255, 0.7);
  font-weight: 700;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 18px;
}

.history {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(11, 17, 32, 0.1);
  background: rgba(255, 255, 255, 0.7);
}

.history h2 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 600;
}

.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 110px;
  overflow-y: auto;
}

.history-list li {
  padding: 8px 10px;
  border-radius: 10px;
  margin-bottom: 8px;
  background: rgba(11, 17, 32, 0.05);
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-list li:last-child {
  margin-bottom: 0;
}

.footer {
  padding: 16px 20px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(11, 17, 32, 0.6);
}

@media (max-width: 380px) {
  .card {
    border-radius: 14px;
  }

  .actions {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}
