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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 700px;
  margin: 0 auto;
}

header {
  text-align: center;
  margin-bottom: 30px;
  color: white;
}

header h1 {
  font-size: 2.5rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
  margin-bottom: 8px;
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
}

.card {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.form-card {
  margin-bottom: 30px;
}

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

.input-group label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.input-group input,
.input-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s, box-shadow 0.3s;
  resize: vertical;
}

.input-group input:focus,
.input-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.btn-send {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.btn-send:active {
  transform: translateY(0);
}

.btn-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.messages-wall {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.message-card {
  background: white;
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  animation: slideIn 0.4s ease-out;
  position: relative;
  overflow: hidden;
}

.message-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #667eea, #764ba2);
}

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

.message-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.message-name {
  font-weight: 700;
  color: #333;
  font-size: 1.05rem;
}

.message-time {
  font-size: 0.8rem;
  color: #999;
  margin-left: auto;
}

.message-text {
  color: #444;
  font-size: 1rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: rgba(255,255,255,0.8);
}

.empty-state .emoji {
  font-size: 3rem;
  margin-bottom: 16px;
}

.empty-state p {
  font-size: 1.2rem;
}

.loading {
  text-align: center;
  padding: 30px;
  color: rgba(255,255,255,0.8);
  font-size: 1rem;
}

.counter {
  text-align: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  padding: 10px;
}

@media (max-width: 500px) {
  header h1 {
    font-size: 1.8rem;
  }

  .card {
    padding: 18px;
  }
}
