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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f0f0f;
  color: #e5e7eb;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 30px 0;
  margin-bottom: 40px;
  border-radius: 12px;
  text-align: center;
}

.header h1 {
  color: white;
  font-size: 36px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(102, 126, 234, 0.4);
}

.campaigns-grid {
  display: grid;
  gap: 20px;
  margin-top: 30px;
}

.campaign-card {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.2s;
}

.campaign-card:hover {
  border-color: #667eea;
}

.campaign-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 16px;
}

.campaign-name {
  font-size: 24px;
  font-weight: 700;
  color: #f3f4f6;
}

.campaign-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #9ca3af;
}

.code-blocks {
  display: grid;
  gap: 16px;
}

.code-block {
  background: #0a0a0a;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 16px;
}

.code-label {
  font-size: 12px;
  text-transform: uppercase;
  color: #9ca3af;
  margin-bottom: 8px;
  font-weight: 600;
}

.code-area {
  background: #000;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 12px;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  color: #60a5fa;
  width: 100%;
  resize: none;
  cursor: text;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #e5e7eb;
}

.form-group input {
  width: 100%;
  padding: 12px;
  background: #0a0a0a;
  border: 1px solid #333;
  border-radius: 6px;
  color: #e5e7eb;
  font-size: 16px;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.btn-secondary {
  background: #374151;
}

.btn-secondary:hover {
  background: #4b5563;
  box-shadow: none;
}

.btn-danger {
  background: #dc2626;
}

.btn-danger:hover {
  background: #b91c1c;
  box-shadow: 0 8px 16px rgba(220, 38, 38, 0.4);
}

.login-container {
  max-width: 400px;
  margin: 100px auto;
}

.login-box {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 32px;
}

.error {
  background: #7f1d1d;
  color: #fca5a5;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
}

/* Copy button styles */
.code-block {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 6px 12px;
  background: #374151;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.copy-btn:hover {
  background: #4b5563;
}

/* Visitors page styles */
.visitors-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.visitors-count {
  font-size: 18px;
  color: #9ca3af;
}

.visitors-table {
  width: 100%;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 8px;
  overflow: hidden;
}

.visitors-table table {
  width: 100%;
  border-collapse: collapse;
}

.visitors-table th {
  background: #0a0a0a;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  color: #e5e7eb;
  font-size: 12px;
  text-transform: uppercase;
  border-bottom: 1px solid #333;
}

.visitors-table td {
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid #222;
  font-family: 'Monaco', 'Courier New', monospace;
}

.visitors-table tr:last-child td {
  border-bottom: none;
}

.visitors-table tr:hover {
  background: #222;
}

.token-cell {
  color: #60a5fa;
  font-size: 11px;
}

.ip-cell {
  color: #9ca3af;
  font-size: 11px;
}

.campaign-cell {
  color: #a78bfa;
}

.timer-cell {
  color: #f59e0b;
  font-weight: 600;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.pagination a {
  padding: 8px 12px;
  background: #1a1a1a;
  border: 1px solid #333;
  color: #e5e7eb;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.2s;
}

.pagination a:hover {
  background: #374151;
  border-color: #667eea;
}

.pagination .current {
  background: #667eea;
  border-color: #667eea;
  color: white;
}

.pagination .disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination .disabled:hover {
  background: #1a1a1a;
  border-color: #333;
}
