/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Georgia", "Times New Roman", serif;
  line-height: 1.6;
  color: #2d3748;
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out;
}

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

/* Header */
header {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
  padding: 40px 30px;
  text-align: center;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  font-weight: normal;
}

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

/* Main content */
main {
  padding: 40px 30px;
}

/* Inventory card */
.inventory-card,
.admin-card {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
  text-align: center;
  border: 2px solid #e2e8f0;
}

.count-display {
  margin-bottom: 20px;
}

.count-number {
  display: block;
  font-size: 4rem;
  font-weight: bold;
  color: #48bb78;
  margin-bottom: 5px;
  animation: countPulse 0.3s ease-out;
}

@keyframes countPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.count-label {
  font-size: 1.2rem;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.count-display.small .count-number {
  font-size: 2.5rem;
}

.count-display.small .count-label {
  font-size: 1rem;
}

/* Status indicator */
.status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e53e3e;
  animation: pulse 2s infinite;
}

.status-dot.connected {
  background: #48bb78;
}

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

.status-text {
  font-size: 0.9rem;
  color: #718096;
}

/* Info section */
.info-section {
  margin-bottom: 30px;
}

.info-section h2 {
  color: #2d3748;
  margin-bottom: 15px;
  font-size: 1.4rem;
}

.flower-list {
  list-style: none;
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
}

.flower-list li {
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
  padding-left: 25px;
}

.flower-list li:before {
  content: "💐";
  position: absolute;
  left: 0;
}

.flower-list li:last-child {
  border-bottom: none;
}

/* Admin specific styles */
.admin-page {
  background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
}

.admin-page header {
  background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.current-count {
  margin-bottom: 30px;
}

.current-count h2 {
  color: #2d3748;
  margin-bottom: 15px;
  font-size: 1.4rem;
}

.admin-controls {
  margin-bottom: 30px;
}

.admin-controls h3 {
  color: #2d3748;
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.button-group {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  justify-content: center;
}

.btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  min-width: 120px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.btn-increment {
  border-color: #48bb78;
  color: #48bb78;
}

.btn-increment:hover {
  background: #48bb78;
  color: white;
}

.btn-decrement {
  border-color: #f56565;
  color: #f56565;
}

.btn-decrement:hover {
  background: #f56565;
  color: white;
}

.btn-set {
  border-color: #4299e1;
  color: #4299e1;
  min-width: auto;
  flex-direction: row;
  padding: 12px 20px;
}

.btn-set:hover {
  background: #4299e1;
  color: white;
}

.btn-icon {
  font-size: 1.5rem;
  font-weight: bold;
}

.btn-text {
  font-size: 0.9rem;
}

.set-value-section {
  border-top: 1px solid #e2e8f0;
  padding-top: 20px;
}

.input-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

#exactValue {
  padding: 12px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  width: 120px;
  text-align: center;
}

#exactValue:focus {
  outline: none;
  border-color: #4299e1;
}

.status-section {
  border-top: 1px solid #e2e8f0;
  padding-top: 20px;
}

.preview-section {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.preview-section h3 {
  color: #2d3748;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.preview-section p {
  color: #718096;
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.preview-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #e2e8f0;
}

/* Footer */
footer {
  background: #f8f9fa;
  padding: 20px 30px;
  text-align: center;
  color: #718096;
  border-top: 1px solid #e2e8f0;
}

footer p {
  margin-bottom: 5px;
}

footer a {
  color: #4299e1;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Last updated */
.last-updated {
  font-size: 0.8rem;
  color: #a0aec0;
  text-align: center;
  margin-top: 15px;
}

/* Responsive design */
@media (max-width: 640px) {
  .container {
    margin: 10px;
    border-radius: 15px;
  }

  header {
    padding: 30px 20px;
  }

  header h1 {
    font-size: 2rem;
  }

  main {
    padding: 30px 20px;
  }

  .count-number {
    font-size: 3rem;
  }

  .button-group {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    min-width: 200px;
  }

  .input-group {
    flex-direction: column;
  }

  #exactValue {
    width: 150px;
  }
}
