/* 해시 생성기 전용 스타일 */

nav { max-width: 720px; }
main { max-width: 720px; }

.mode-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
}
.mode-tab {
  flex: 1;
  padding: 0.55rem 0.9rem;
  border: none;
  background: transparent;
  color: var(--text-sub);
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.mode-tab:hover { color: var(--text); }
.mode-tab.active {
  background: var(--primary);
  color: white;
}

.mode-section[hidden] { display: none; }

/* 텍스트 입력 */
#text-input {
  width: 100%;
  padding: 0.85rem;
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.5;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  resize: vertical;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
#text-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}
.text-meta {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-sub);
}

/* 파일 정보 */
.file-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  flex-wrap: wrap;
}
.file-info[hidden] { display: none; }
.file-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}
.file-name {
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-size {
  font-size: 0.75rem;
  color: var(--text-sub);
}
.file-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-primary {
  padding: 0.55rem 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  padding: 0.55rem 0.9rem;
  background: none;
  color: var(--text-sub);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

/* 진행 바 */
.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.85rem;
}
.progress-bar[hidden] { display: none; }
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.2s;
}

/* 결과 */
.results {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.result-row {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.result-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-sub);
}
.result-value {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--text);
  word-break: break-all;
  line-height: 1.45;
  min-height: 1.3em;
}
.result-value:empty::before {
  content: '—';
  color: var(--text-sub);
  opacity: 0.5;
}
.btn-copy {
  padding: 0.35rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-sub);
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.btn-copy:hover {
  border-color: var(--primary);
  color: var(--primary);
}

@media (max-width: 480px) {
  .result-row {
    grid-template-columns: 60px 1fr auto;
    gap: 0.5rem;
    padding: 0.6rem 0.7rem;
  }
  .result-value { font-size: 0.72rem; }
  .file-info { flex-direction: column; align-items: stretch; }
  .file-actions { justify-content: stretch; }
  .file-actions button { flex: 1; }
}
