:root {
  --bg: #0f0f23;
  --surface: #1a1a2e;
  --border: #2a2a4a;
  --text: #e0e0f0;
  --text-dim: #8888aa;
  --accent: #6c63ff;
  --accent-hover: #7d75ff;
  --danger: #ff6b6b;
  --success: #4ecdc4;
}

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

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

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--text);
}

h1 a {
  color: inherit;
  text-decoration: none;
}

h1 span {
  color: var(--accent);
}

/* Form Elements */
textarea, input, select, button {
  font-family: inherit;
  font-size: 1rem;
}

textarea {
  width: 100%;
  min-height: 300px;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  resize: vertical;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

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

.form-row {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-group label {
  font-size: 0.85rem;
  color: var(--text-dim);
}

select, input[type="text"], input[type="password"] {
  padding: 0.6rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  min-width: 150px;
}

select:focus, input:focus {
  outline: none;
  border-color: var(--accent);
}

button {
  padding: 0.7rem 1.5rem;
  background: var(--accent);
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

button:hover {
  background: var(--accent-hover);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

button.danger {
  background: var(--danger);
}

button.secondary {
  background: var(--surface);
  border: 1px solid var(--border);
}

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

/* Code View */
.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.code-meta {
  color: var(--text-dim);
  font-size: 0.9rem;
}

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

.code-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

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

.line-numbers {
  padding: 1rem 0.8rem;
  background: rgba(0,0,0,0.2);
  color: var(--text-dim);
  text-align: right;
  user-select: none;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  border-right: 1px solid var(--border);
}

.code-content {
  flex: 1;
  padding: 1rem;
  overflow-x: auto;
}

.code-content pre {
  margin: 0;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
}

.code-content code {
  background: transparent !important;
  padding: 0 !important;
}

/* Password Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
}

.modal h2 {
  margin-bottom: 1rem;
}

.modal input {
  width: 100%;
  margin-bottom: 1rem;
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* Admin Table */
.paste-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.paste-table th,
.paste-table td {
  padding: 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.paste-table th {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.85rem;
}

.paste-table tr:hover {
  background: rgba(108, 99, 255, 0.05);
}

.paste-table a {
  color: var(--accent);
  text-decoration: none;
}

.paste-table a:hover {
  text-decoration: underline;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  background: var(--border);
  color: var(--text-dim);
}

.badge.protected {
  background: rgba(255, 107, 107, 0.2);
  color: var(--danger);
}

/* Messages */
.message {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.message.success {
  background: rgba(78, 205, 196, 0.1);
  border: 1px solid var(--success);
  color: var(--success);
}

.message.error {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid var(--danger);
  color: var(--danger);
}

/* Login Form */
.login-container {
  max-width: 400px;
  margin: 4rem auto;
}

.login-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}

.login-form input {
  width: 100%;
  margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 1rem;
  }
  
  .form-row {
    flex-direction: column;
  }
  
  .form-group {
    width: 100%;
  }
  
  select, input[type="text"], input[type="password"] {
    width: 100%;
  }
  
  .code-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .paste-table {
    font-size: 0.85rem;
  }
  
  .paste-table th:nth-child(3),
  .paste-table td:nth-child(3) {
    display: none;
  }
}

/* highlight.js theme override */
.hljs {
  background: transparent !important;
  color: var(--text) !important;
}
