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

:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent-primary: #58a6ff;
  --accent-green: #3fb950;
  --accent-red: #f85149;
  --accent-orange: #d29922;
  --border-color: #30363d;
  --border-hover: #484f58;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.logo-link {
  text-decoration: none;
  color: inherit;
}

.logo-link:hover h1 {
  color: var(--accent-primary);
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Main content */
main {
  flex: 1;
}

/* Quick access box */
.quick-access-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.quick-access-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.quick-access-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  white-space: nowrap;
}

.quick-access-input {
  display: flex;
  flex: 1;
  min-width: 200px;
}

.quick-access-input input {
  flex: 1;
  border-radius: 8px 0 0 8px;
  border-right: none;
  min-width: 120px;
}

.btn-access {
  padding: 0.75rem 1.5rem;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.btn-access:hover {
  opacity: 0.9;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.divider span {
  padding: 0 1rem;
}

/* Form styles */
#pasteForm {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

textarea {
  width: 100%;
  padding: 1rem;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;
  font-size: 0.875rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  resize: vertical;
  transition: border-color 0.2s;
}

textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
}

textarea::placeholder {
  color: var(--text-muted);
}

select,
input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  transition: border-color 0.2s;
}

select:focus,
input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--accent-primary);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238b949e' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.options-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

/* Checkbox styles */
.checkbox-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 0.9rem;
  user-select: none;
}

.checkbox-label input {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  margin-right: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.checkbox-label:hover .checkmark {
  border-color: var(--accent-primary);
}

.checkbox-label input:checked + .checkmark {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.checkbox-label input:checked + .checkmark::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.checkbox-group small {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.25rem;
  margin-left: 2rem;
}

.input-hint {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 600;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  margin-top: 0.5rem;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-primary:active {
  transform: scale(0.99);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s;
}

.btn-secondary:hover {
  border-color: var(--border-hover);
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent-primary);
  cursor: pointer;
  font-size: 0.875rem;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-copy {
  padding: 0.75rem 1.5rem;
  background: var(--accent-green);
  color: white;
  border: none;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  font-weight: 500;
  transition: opacity 0.2s;
}

.btn-copy:hover {
  opacity: 0.9;
}

.btn-icon {
  padding: 0.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* Result box */
.result-box {
  margin-top: 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--accent-green);
  border-radius: 12px;
  padding: 1.5rem;
}

.result-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--accent-green);
  font-weight: 500;
}

.success-icon {
  width: 24px;
  height: 24px;
  background: var(--accent-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
}

.result-content {
  display: flex;
  gap: 0;
  margin-bottom: 1rem;
}

.result-content input {
  flex: 1;
  border-radius: 8px 0 0 8px;
  border-right: none;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.result-actions a {
  color: var(--accent-primary);
  text-decoration: none;
  font-size: 0.875rem;
}

.result-actions a:hover {
  text-decoration: underline;
}

/* Loading box */
.loading-box {
  text-align: center;
  padding: 4rem 2rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 0.8s linear infinite;
}

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

/* Error box */
.error-box {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.error-icon {
  width: 60px;
  height: 60px;
  background: var(--accent-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  margin: 0 auto 1rem;
}

.error-box p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.error-text {
  color: var(--accent-red);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Password box */
.password-box {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  max-width: 400px;
  margin: 0 auto;
}

.lock-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.password-box h2 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.password-box form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.password-box input {
  text-align: center;
}

/* Content box */
.content-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-tertiary);
}

.meta-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.language-tag {
  padding: 0.25rem 0.75rem;
  background: var(--accent-primary);
  color: white;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.create-time {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.actions {
  display: flex;
  gap: 0.5rem;
}

.burn-warning {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(248, 81, 73, 0.1);
  border-bottom: 1px solid var(--accent-red);
  color: var(--accent-red);
  font-size: 0.875rem;
}

.fire-icon {
  font-size: 1.25rem;
}

.code-wrapper {
  overflow-x: auto;
}

.code-wrapper pre {
  margin: 0;
  padding: 1.5rem;
  background: var(--bg-primary);
}

.code-wrapper code {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Override highlight.js styles */
.hljs {
  background: transparent !important;
  padding: 0 !important;
}

.content-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

/* Footer */
footer {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border-color);
}

footer p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 0.75rem 1.5rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.875rem;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
}

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

.toast.success {
  border-color: var(--accent-green);
  color: var(--accent-green);
}
