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

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

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

h1 {
  font-size: 1.5rem;
  text-align: center;
  padding: 16px 0;
  color: #222;
}

/* フォームセクション */
.form-section {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.form-section h2 {
  font-size: 1rem;
  color: #555;
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: bold;
  color: #555;
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  background: #fafafa;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #e67e22;
  background: #fff;
}

/* 星評価 */
.star-rating {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.star {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #ddd;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.15s, transform 0.1s;
}

.star:hover,
.star.active {
  color: #f39c12;
}

.star:active {
  transform: scale(0.9);
}

.star-label {
  font-size: 0.8rem;
  color: #999;
}

/* 追加ボタン */
.btn-add {
  width: 100%;
  padding: 12px;
  background: #e67e22;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-add:hover {
  background: #d35400;
}

.btn-add:active {
  background: #c0392b;
}

/* リストセクション */
.list-section {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

.list-header h2 {
  font-size: 1rem;
  color: #555;
}

#count {
  color: #e67e22;
  font-weight: bold;
}

/* フィルターボタン */
.filter-group {
  display: flex;
  gap: 6px;
}

.filter-btn {
  padding: 4px 12px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn.active {
  background: #e67e22;
  border-color: #e67e22;
  color: #fff;
}

/* レコードリスト */
.record-list {
  list-style: none;
}

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

.record-item {
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.record-item:last-child {
  border-bottom: none;
}

.record-main {
  flex: 1;
  min-width: 0;
}

.record-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.record-title {
  font-weight: bold;
  font-size: 1rem;
  color: #222;
}

.record-type {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
  background: #f0f0f0;
  color: #666;
  white-space: nowrap;
}

.record-type.movie {
  background: #fde8d2;
  color: #c0550a;
}

.record-type.drama {
  background: #dceeff;
  color: #1a6fc4;
}

.record-stars {
  color: #f39c12;
  font-size: 1rem;
  margin-bottom: 2px;
}

.record-comment {
  font-size: 0.85rem;
  color: #777;
}

.record-date {
  font-size: 0.75rem;
  color: #bbb;
  margin-top: 2px;
}

.btn-delete {
  background: none;
  border: none;
  color: #ccc;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s;
  flex-shrink: 0;
}

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

/* レスポンシブ */
@media (max-width: 375px) {
  .container {
    padding: 12px;
  }

  .form-section,
  .list-section {
    padding: 16px;
  }

  .star {
    font-size: 1.6rem;
  }
}
