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

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

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

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1565C0;
  margin-bottom: 20px;
  text-align: center;
  padding: 16px 0 12px;
  border-bottom: 2px solid #2196F3;
}

h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 12px;
}

/* Input Section */
.input-section {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 16px;
}

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

label {
  display: block;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 4px;
  font-weight: 500;
}

.required {
  color: #e53935;
}

input[type="number"],
input[type="date"],
input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
  background: #fafafa;
}

input[type="number"]:focus,
input[type="date"]:focus,
input[type="text"]:focus {
  outline: none;
  border-color: #2196F3;
  background: #fff;
}

.preview {
  background: #E3F2FD;
  border: 1px solid #90CAF9;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1565C0;
  margin-bottom: 14px;
}

.preview.hidden {
  display: none;
}

.btn-add {
  width: 100%;
  padding: 12px;
  background: #2196F3;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-add:hover {
  background: #1976D2;
}

.btn-add:active {
  background: #1565C0;
}

/* Stats Section */
.stats-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stat-label {
  font-size: 0.75rem;
  color: #888;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: #1565C0;
}

/* List Section */
.list-section {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

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

.record-item {
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  transition: border-color 0.2s;
}

.record-item:hover {
  border-color: #90CAF9;
}

.record-info {
  flex: 1;
}

.record-fuel {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2196F3;
  margin-bottom: 4px;
}

.record-fuel span {
  font-size: 0.85rem;
  font-weight: 400;
  color: #888;
}

.record-details {
  font-size: 0.82rem;
  color: #777;
  line-height: 1.6;
}

.record-memo {
  font-size: 0.82rem;
  color: #999;
  font-style: italic;
  margin-top: 2px;
}

.record-date {
  font-size: 0.78rem;
  color: #bbb;
  margin-bottom: 4px;
}

.btn-delete {
  background: none;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  color: #e53935;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-delete:hover {
  background: #FFEBEE;
  border-color: #e53935;
}

/* Responsive */
@media (max-width: 400px) {
  .stats-section {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 1.3rem;
  }
}
