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

body {
  font-family: Arial, sans-serif;
  background: #f5f5f5;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
}

.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  width: 100%;
  max-width: 680px;
  padding: 28px;
}

h1 {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

h1 svg {
  flex-shrink: 0;
}

.subtitle {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

.input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.input-row input {
  flex: 1;
  padding: 11px 14px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s;
}

.input-row input:focus {
  border-color: #cc0000;
}

.btn-red {
  padding: 11px 20px;
  background: #cc0000;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.btn-red:hover { background: #aa0000; }
.btn-red:disabled { background: #999; cursor: not-allowed; }

#transcriptBox {
  width: 100%;
  height: 340px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fafafa;
  overflow-y: auto;
  margin-bottom: 14px;
  padding: 12px;
  font-size: 13px;
  color: #444;
  line-height: 1.6;
}

#transcriptBox .placeholder {
  color: #aaa;
}

.line {
  display: flex;
  gap: 10px;
  margin-bottom: 4px;
}

.ts {
  color: #cc0000;
  font-size: 12px;
  font-weight: bold;
  min-width: 42px;
  padding-top: 2px;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
}

.ts:hover { text-decoration: underline; }

.txt {
  flex: 1;
}

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

.btn-black {
  flex: 1;
  padding: 12px;
  background: #111;
  color: #fff;
  font-size: 15px;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-black:hover { background: #333; }

#status {
  font-size: 13px;
  color: #666;
  min-height: 18px;
  margin-top: 8px;
  text-align: center;
}

#status.error { color: #cc0000; }
#status.success { color: #007700; }

.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spin { to { transform: rotate(360deg); } }
