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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0a0a0a;
  color: #e0e0e0;
  line-height: 1.5;
  min-height: 100vh;
}

#root {
  min-height: 100vh;
}

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

h1 {
  font-size: 20px;
  color: #fff;
  margin-bottom: 16px;
}

h2 {
  font-size: 14px;
  color: #888;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.header h1 {
  margin: 0;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid #333;
  padding-bottom: 8px;
}

.tab {
  padding: 10px 20px;
  background: #1a1a1a;
  border: none;
  color: #888;
  cursor: pointer;
  border-radius: 6px 6px 0 0;
  font-size: 14px;
  transition: all 0.2s;
}

.tab:hover {
  color: #fff;
}

.tab.active {
  background: #2a2a2a;
  color: #fff;
}

.status-bar {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  padding: 14px;
  background: #1a1a1a;
  border-radius: 8px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot.on {
  background: #22c55e;
}

.dot.off {
  background: #666;
}

.dot.err {
  background: #ef4444;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: #1a1a1a;
  padding: 16px;
  border-radius: 8px;
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 600;
  color: #fff;
}

.stat-label {
  font-size: 11px;
  color: #888;
  text-transform: uppercase;
  margin-top: 4px;
}

.card {
  background: #1a1a1a;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.replies-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reply-item {
  background: #141414;
  border: 1px solid #1f1f1f;
  padding: 14px 16px;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 16px;
  align-items: center;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.reply-item:hover {
  background: #181818;
  border-color: #2a2a2a;
  transform: translateY(-1px);
}

.reply-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reply-tier {
  font-size: 18px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
  transition: transform 0.2s ease;
}

.reply-item:hover .reply-tier {
  transform: scale(1.1);
}

.reply-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  min-width: 0;
}

.reply-author {
  font-size: 13px;
  font-weight: 500;
  color: #9ca3af;
  letter-spacing: -0.01em;
}

.reply-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 12px;
  border-left: 1px solid #222;
}

.reply-link {
  color: #525252;
  text-decoration: none;
  font-size: 14px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.reply-link:hover {
  background: #252525;
  color: #a3a3a3;
}

.reply-style {
  font-size: 10px;
  padding: 5px 10px;
  border-radius: 5px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  min-width: 56px;
}

.reply-style.spicy { background: #7f1d1d; color: #fca5a5; }
.reply-style.funny { background: #713f12; color: #fcd34d; }
.reply-style.dumb { background: #1e3a5f; color: #93c5fd; }
.reply-style.genuine { background: #14532d; color: #86efac; }
.reply-style.unknown { background: #262626; color: #737373; }

.reply-text {
  font-size: 14px;
  color: #d4d4d4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}

.reply-time {
  font-size: 12px;
  color: #525252;
  font-variant-numeric: tabular-nums;
  min-width: 28px;
  text-align: right;
}

/* Responsive: stack on smaller screens */
@media (max-width: 600px) {
  .reply-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 14px;
  }
  
  .reply-meta {
    order: 1;
  }
  
  .reply-content {
    order: 2;
  }
  
  .reply-actions {
    order: 3;
    border-left: none;
    padding-left: 0;
    padding-top: 8px;
    border-top: 1px solid #222;
    justify-content: space-between;
  }
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.btn-primary {
  background: #3b82f6;
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: #2563eb;
}

.btn-success {
  background: #22c55e;
  color: #fff;
}

.btn-success:hover:not(:disabled) {
  background: #16a34a;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
}

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
}

.btn-secondary {
  background: #333;
  color: #fff;
}

.btn-secondary:hover:not(:disabled) {
  background: #444;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-link {
  background: none;
  color: #888;
  padding: 8px;
}

.btn-link:hover {
  color: #fff;
}

.input {
  padding: 12px 16px;
  border: 1px solid #333;
  border-radius: 8px;
  background: #1a1a1a;
  color: #fff;
  font-size: 14px;
  width: 100%;
}

.input:focus {
  outline: none;
  border-color: #3b82f6;
}

.select {
  padding: 12px 16px;
  border: 1px solid #333;
  border-radius: 8px;
  background: #1a1a1a;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

.controls {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.alert {
  padding: 14px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.alert-error {
  background: #7f1d1d;
  color: #fca5a5;
}

.alert-success {
  background: #14532d;
  color: #86efac;
}

.alert-info {
  background: #1e3a5f;
  color: #93c5fd;
}

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-box {
  background: #1a1a1a;
  padding: 32px;
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
}

.login-box h1 {
  text-align: center;
  margin-bottom: 8px;
}

.login-box p {
  text-align: center;
  color: #888;
  margin-bottom: 24px;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #888;
  font-size: 13px;
}

.tier-section {
  margin-bottom: 20px;
}

.tier-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #888;
  font-size: 14px;
}

.tier-accounts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.account-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #252525;
  border-radius: 6px;
  font-size: 13px;
}

.account-tag .remove {
  cursor: pointer;
  color: #666;
  font-size: 16px;
  line-height: 1;
}

.account-tag .remove:hover {
  color: #ef4444;
}

.tier-small .account-tag { border-left: 3px solid #22c55e; }
.tier-mid .account-tag { border-left: 3px solid #3b82f6; }
.tier-big .account-tag { border-left: 3px solid #f59e0b; }

.add-account-form {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.add-account-form .input {
  flex: 1;
}

.empty {
  color: #666;
  text-align: center;
  padding: 40px;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: #888;
}
