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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: #1a1a2e;
  color: #eee;
  min-height: 100vh;
}

/* Login Page */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-container {
  background: #16213e;
  padding: 2rem;
  border-radius: 8px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.login-container h1 {
  text-align: center;
  color: #00d9ff;
  margin-bottom: 0.5rem;
}

.subtitle {
  text-align: center;
  color: #888;
  margin-bottom: 2rem;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #aaa;
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #333;
  border-radius: 4px;
  background: #0f0f23;
  color: #eee;
  font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #00d9ff;
}

.error-message {
  color: #ff6b6b;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  min-height: 1.2em;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: #00d9ff;
  color: #1a1a2e;
  font-weight: 600;
}

.btn-primary:hover {
  background: #00b8d9;
}

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

.btn-secondary:hover {
  background: #444;
}

.login-container .btn-primary {
  width: 100%;
}

/* Dashboard Header */
header {
  background: #16213e;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #333;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header-left h1 {
  color: #00d9ff;
  font-size: 1.5rem;
}

.user-info {
  color: #888;
  font-size: 0.9rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.last-updated {
  color: #666;
  font-size: 0.85rem;
}

/* Main Content */
main {
  padding: 1.5rem;
}

.columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.column {
  background: #16213e;
  border-radius: 8px;
  padding: 1rem;
  min-height: 400px;
  max-height: 500px;
  display: flex;
  flex-direction: column;
}

.column h2 {
  color: #00d9ff;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #333;
}

.message-list {
  overflow-y: auto;
  flex: 1;
}

.message-item {
  background: #0f0f23;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.message-item:hover {
  background: #1a1a3e;
}

.message-item .name {
  color: #eee;
  font-size: 0.9rem;
  word-break: break-all;
}

.message-item .meta {
  color: #666;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.empty-message {
  color: #555;
  text-align: center;
  padding: 2rem;
  font-style: italic;
}

/* Send Section */
.send-section {
  background: #16213e;
  border-radius: 8px;
  padding: 1.5rem;
}

.send-section h2 {
  color: #00d9ff;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

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

.form-row .form-group {
  flex: 0 0 200px;
}

.form-row .flex-grow {
  flex: 1;
}

.send-status {
  margin-left: 1rem;
  font-size: 0.9rem;
}

.send-status.success {
  color: #4caf50;
}

.send-status.error {
  color: #ff6b6b;
}

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

.modal.active {
  display: flex;
}

.modal-content {
  background: #16213e;
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #333;
}

.modal-header h3 {
  color: #00d9ff;
  font-size: 1rem;
  word-break: break-all;
}

.modal-close {
  background: none;
  border: none;
  color: #888;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-close:hover {
  color: #eee;
}

.modal-body {
  padding: 1rem;
  overflow-y: auto;
  flex: 1;
}

.modal-body pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #ccc;
}

/* Responsive */
@media (max-width: 900px) {
  .columns {
    grid-template-columns: 1fr;
  }

  header {
    flex-direction: column;
    gap: 1rem;
  }

  .header-left, .header-right {
    width: 100%;
    justify-content: center;
  }

  .form-row {
    flex-direction: column;
  }

  .form-row .form-group {
    flex: 1;
  }
}
