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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f5f5;
  color: #222;
  min-height: 100vh;
}

header {
  background: #222222;
  color: white;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

header a {
  color: white;
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 700;
}

.header-logo {
  height: 36px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.container {
  max-width: 640px;
  margin: 40px auto;
  padding: 0 20px;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.subtitle {
  color: #666;
  margin-bottom: 28px;
  font-size: 0.95rem;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
  margin-top: 18px;
}

input[type="text"],
input[type="date"],
input[type="time"] {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s;
}

input:focus {
  border-color: #222222;
}

.option-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}

.option-row input[type="date"],
.option-row input[type="time"] {
  flex: 1;
}

.remove-btn {
  background: none;
  border: none;
  color: #999;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.15s;
}

.remove-btn:hover {
  color: #222222;
}

.add-btn {
  background: none;
  border: 1.5px dashed #ccc;
  color: #666;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  width: 100%;
  margin-top: 4px;
  transition: all 0.15s;
}

.add-btn:hover {
  border-color: #222222;
  color: #222222;
}

.submit-btn {
  background: #222222;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 28px;
  transition: background 0.15s;
}

.submit-btn:hover {
  background: #444444;
}

.success-box {
  background: #f5f5f5;
  border: 1.5px solid #cccccc;
  border-radius: 10px;
  padding: 20px;
  margin-top: 24px;
  display: none;
}

.success-box p {
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: #222222;
}

.share-link {
  display: flex;
  gap: 8px;
}

.share-link input {
  flex: 1;
  font-size: 0.85rem;
  color: #444;
}

.copy-btn {
  background: #222222;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Poll voting table */
.poll-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.poll-meta {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.vote-table {
  overflow-x: auto;
  margin-bottom: 24px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  padding: 10px 14px;
  text-align: center;
  border-bottom: 1px solid #eee;
}

th {
  background: #f8f8f8;
  font-weight: 600;
  color: #444;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td:first-child, th:first-child {
  text-align: left;
  font-weight: 500;
}

.check {
  color: #222222;
  font-size: 1.2rem;
}

.cross {
  color: #bbbbbb;
  font-size: 1.2rem;
}

.count-badge {
  display: inline-block;
  background: #e8e8e8;
  color: #222222;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.8rem;
}

.best-option {
  background: #f5f5f5;
}

.best-badge {
  display: inline-block;
  background: #222222;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  text-transform: uppercase;
}

/* Checkbox toggle */
.availability-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.availability-row label {
  margin: 0;
  font-weight: 400;
  font-size: 1rem;
  cursor: pointer;
  flex: 1;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #222222;
  cursor: pointer;
}

.links-row {
  margin-top: 20px;
  display: flex;
  gap: 12px;
}

.link-btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
}

.link-btn.primary {
  background: #222222;
  color: white;
}

.link-btn.secondary {
  background: #f3f4f6;
  color: #444;
}

.error {
  color: #dc2626;
  font-size: 0.9rem;
  margin-top: 12px;
  display: none;
}

.loading {
  color: #666;
  text-align: center;
  padding: 40px;
}
