:root {
  --text-main: #111827;
  --text-muted: #4b5563;
  --accent: #30a0c0;
  --accent-hover: #217b96;
  --danger: #e02010;
  --border-color: rgba(255, 255, 255, 0.4);
  --panel-bg: rgba(255, 255, 255, 0.9);
  --radius: 20px;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #30a0c0 0%, #e0a010 50%, #e02010 100%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#app {
  flex: 1;
  width: 100%;
  max-width: 650px;
  padding: 24px;
}

.app-footer {
  text-align: center;
  padding: 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  width: 100%;
  display: flex;
  justify-content: center;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px 24px;
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span {
  color: var(--accent);
}

.btn {
  background: linear-gradient(to right, #e0a010, #e02010);
  color: #fff;
  border: none;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(224, 160, 16, 0.3);
}

.btn:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  box-shadow: none;
}

.btn-secondary:hover {
  background: rgba(48, 160, 192, 0.1);
  box-shadow: none;
}

.btn-small {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-danger {
  background-color: transparent !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
  box-shadow: none;
  background-image: none !important;
}

.btn-black-outline {
  background-color: transparent !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
  box-shadow: none;
  background-image: none !important;
}

.btn-danger:hover, .btn-black-outline:hover {
  background-color: rgba(0, 0, 0, 0.05) !important;
  transform: translateY(-1px);
}

/* Modal System */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: modalFadeIn 0.2s ease-out;
}

.modal {
  background: white;
  padding: 32px;
  border-radius: 24px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  animation: modalScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
  color: #111827;
}

.modal p {
  color: #4b5563;
  margin-bottom: 24px;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalScaleIn {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.view {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Landing / Dashboard */
.card {
  background-color: var(--panel-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  margin-bottom: 24px;
  word-break: break-all;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.card h1 {
  font-size: 36px;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
  font-weight: 800;
  background: linear-gradient(to right, #30a0c0, #e0a010);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.card p {
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
  font-size: 15px;
}

.input-group {
  text-align: left;
  margin-bottom: 24px;
}

.input-group label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.input-field {
  width: 100%;
  background-color: #ffffff;
  border: 2px solid #e2e8f0;
  color: var(--text-main);
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  outline: none;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

.input-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(48, 160, 192, 0.2);
}

textarea.input-field {
  resize: vertical;
  min-height: 120px;
}

.password-display {
  background: linear-gradient(135deg, #1f2937, #111827);
  color: #e0a010;
  padding: 20px;
  border-radius: 12px;
  font-family: monospace;
  font-size: 32px;
  letter-spacing: 8px;
  margin: 24px 0;
  user-select: all;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
  text-align: center;
}

.alert {
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 600;
  display: none !important;
}

.alert.error {
  display: block !important;
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert.success {
  display: block !important;
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

/* Feed */
.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-block: 32px 16px;
  padding: 0 8px;
}

.feed-header h2 {
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(0,0,0,0.8);
}

.live-dot {
  width: 10px;
  height: 10px;
  background-color: #10b981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.message-card {
  background-color: var(--panel-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  border-left: 4px solid var(--accent);
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.message-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.message-content {
  font-size: 16px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  font-weight: 500;
  color: #334155;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  border: 2px dashed rgba(255,255,255,0.5);
  border-radius: var(--radius);
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  background: rgba(0,0,0,0.1);
  backdrop-filter: blur(8px);
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: #111827;
  color: #fff;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 14px;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3);
}

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

.copy-btn {
  background: rgba(255,255,255,0.5);
  padding: 10px 20px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-block;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.copy-btn:hover {
  background: rgba(255,255,255,0.8);
  transform: translateY(-1px);
}
