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

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

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

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

header h1 {
  font-size: 2.5rem;
  margin-bottom: 5px;
}

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

main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.card h2 {
  margin-bottom: 20px;
  color: #333;
  font-size: 1.5rem;
}

/* Form styles */
.form-group {
  margin-bottom: 20px;
}

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

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

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

.form-group small {
  display: block;
  margin-top: 5px;
  color: #666;
  font-size: 0.85rem;
}

/* Rating stars */
.rating {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 5px;
}

.rating input[type="radio"] {
  display: none;
}

.rating label {
  font-size: 2rem;
  color: #ddd;
  cursor: pointer;
  transition: color 0.2s;
}

.rating label:hover,
.rating label:hover ~ label,
.rating input[type="radio"]:checked ~ label {
  color: #ffc107;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

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

/* Reviews list */
#reviews-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.review-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  transition: box-shadow 0.3s;
}

.review-card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.company-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: #333;
}

.review-stars {
  color: #ffc107;
  letter-spacing: 2px;
}

.review-meta {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.review-meta span {
  margin-right: 15px;
}

.review-comment {
  color: #555;
  line-height: 1.6;
}

.loading {
  text-align: center;
  color: #999;
  padding: 20px;
}

.no-reviews {
  text-align: center;
  color: #999;
  padding: 30px;
}

/* QR Code section */
#qrcode-container {
  text-align: center;
  padding: 20px;
}

#qrcode-container img {
  max-width: 200px;
  border-radius: 8px;
  border: 4px solid #f0f0f0;
}

.url-display {
  text-align: center;
  margin-top: 15px;
  font-family: monospace;
  color: #666;
  word-break: break-all;
  font-size: 0.9rem;
}

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

.modal.show {
  display: flex;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  max-width: 400px;
  position: relative;
  animation: slideIn 0.3s ease;
}

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

.close {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
}

.close:hover {
  color: #333;
}

.success-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  background: #4caf50;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
}

.success-icon::after {
  content: '✓';
}

.modal-content h2 {
  margin-bottom: 15px;
  color: #333;
}

.modal-content p {
  color: #666;
  margin-bottom: 10px;
  line-height: 1.5;
}

/* Footer */
footer {
  text-align: center;
  color: white;
  margin-top: 30px;
  opacity: 0.8;
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 600px) {
  header h1 {
    font-size: 2rem;
  }

  .card {
    padding: 20px;
  }

  .review-header {
    flex-direction: column;
  }
}
