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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: #0d1117;
  color: #c9d1d9;
  min-height: 100vh;
  line-height: 1.6;
}

header {
  text-align: center;
  padding: 60px 20px 40px;
  background: linear-gradient(180deg, #161b22 0%, #0d1117 100%);
  border-bottom: 1px solid #21262d;
}

header h1 {
  font-size: 2.2rem;
  color: #f0f6fc;
  margin-bottom: 8px;
}

.subtitle {
  color: #8b949e;
  font-size: 1.05rem;
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 30px 20px 60px;
}

.card {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 12px;
  padding: 28px;
  margin-bottom: 24px;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: #30363d;
}

.card h2 {
  font-size: 1.25rem;
  color: #f0f6fc;
  margin-bottom: 8px;
}

.card > p {
  color: #8b949e;
  font-size: 0.92rem;
  margin-bottom: 18px;
}

/* Drop zone */
.drop-zone {
  border: 2px dashed #30363d;
  border-radius: 10px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  color: #8b949e;
  font-size: 0.95rem;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: #58a6ff;
  background: #1c2333;
  color: #c9d1d9;
}

.drop-icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 8px;
}

.hint {
  display: block;
  font-size: 0.8rem;
  color: #484f58;
  margin-top: 4px;
}

.result-box {
  margin-top: 16px;
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 16px;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Command list */
.cmd-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cmd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.cmd-item:hover {
  background: #1c2333;
  border-color: #30363d;
}

.cmd-item code {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.85rem;
  color: #7ee787;
  flex-shrink: 0;
  min-width: 240px;
}

.cmd-desc {
  color: #8b949e;
  font-size: 0.85rem;
  flex: 1;
}

.copy-hint {
  color: #484f58;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.15s;
}

.cmd-item:hover .copy-hint {
  opacity: 1;
}

/* Convert section */
.convert-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 640px) {
  .convert-row {
    grid-template-columns: 1fr;
  }
}

.convert-col label {
  display: block;
  font-size: 0.9rem;
  color: #8b949e;
  margin-bottom: 8px;
}

textarea {
  width: 100%;
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 10px 12px;
  color: #c9d1d9;
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  transition: border-color 0.2s;
}

textarea:focus {
  outline: none;
  border-color: #58a6ff;
}

textarea[readonly] {
  background: #0d1117;
  color: #8b949e;
}

.btn-row {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}

button {
  background: #21262d;
  color: #c9d1d9;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
}

button:hover {
  background: #30363d;
  border-color: #484f58;
}

button:active {
  background: #484f58;
}

/* Timestamp */
.timestamp-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.timestamp-row input {
  flex: 1;
  min-width: 200px;
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 10px 12px;
  color: #c9d1d9;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.timestamp-row input:focus {
  outline: none;
  border-color: #58a6ff;
}

.ts-result {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.95rem;
  color: #7ee787;
  min-width: 200px;
}

/* Footer */
footer {
  text-align: center;
  padding: 30px 20px;
  color: #484f58;
  font-size: 0.85rem;
  border-top: 1px solid #21262d;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #238636;
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: transform 0.25s ease;
  pointer-events: none;
  z-index: 999;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}
