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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7fa;
  color: #1e293b;
  min-height: 100vh;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
}

h1 {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: #1e293b;
}

/* Form */
.form-section {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

@media (max-width: 480px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
}

input {
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.95rem;
  color: #1e293b;
  transition: border-color 0.2s;
  width: 100%;
}

input:focus {
  outline: none;
  border-color: #2563eb;
}

.btn-primary {
  width: 100%;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #1d4ed8;
}

/* List */
.list-section {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.list-header h2 {
  font-size: 1rem;
  font-weight: 700;
}

.count-badge {
  background: #e0e7ff;
  color: #3730a3;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
}

.empty-msg {
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
  padding: 24px 0;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card {
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  position: relative;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.card-names {
  flex: 1;
}

.card-competitor {
  font-size: 0.78rem;
  color: #64748b;
  margin-bottom: 2px;
}

.card-product {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}

.delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  font-size: 1.1rem;
  padding: 0 0 0 8px;
  line-height: 1;
  transition: color 0.2s;
}

.delete-btn:hover {
  color: #ef4444;
}

.card-prices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
}

.price-block {
  background: #f8fafc;
  border-radius: 8px;
  padding: 6px 4px;
}

.price-label {
  font-size: 0.72rem;
  color: #64748b;
  margin-bottom: 2px;
}

.price-value {
  font-size: 0.95rem;
  font-weight: 700;
}

.diff-cheaper {
  color: #16a34a;
}

.diff-expensive {
  color: #dc2626;
}

.diff-same {
  color: #64748b;
}
