* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #8B0000 0%, #DC143C 50%, #B22222 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #1a1a1a;
  position: relative;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 10px,
      rgba(0, 0, 0, 0.03) 10px,
      rgba(0, 0, 0, 0.03) 20px
    );
  pointer-events: none;
}

.container {
  width: 100%;
  max-width: 1200px;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.header {
  text-align: center;
  margin-bottom: 30px;
  color: white;
}

.header h1 {
  font-size: 2rem;
  font-weight: 700;
  text-shadow: 
    2px 2px 0px rgba(0, 0, 0, 0.3),
    4px 4px 8px rgba(0, 0, 0, 0.5);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.header p {
  font-size: 1rem;
  opacity: 0.95;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  font-weight: 500;
}

/* Display Page Styles */
.display-container {
  text-align: center;
}

.display-content {
  background: #FFFFFF;
  border-radius: 15px;
  padding: 60px 40px;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.4),
    0 0 0 4px #DC143C,
    inset 0 0 30px rgba(220, 20, 60, 0.1);
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 3px solid #8B0000;
}

.display-content::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 2px solid #DC143C;
  border-radius: 10px;
  pointer-events: none;
}

.display-number {
  font-size: 15vw;
  font-weight: 900;
  color: #DC143C;
  line-height: 1;
  transition: all 0.3s ease;
  text-shadow: 
    3px 3px 0px #8B0000,
    6px 6px 10px rgba(0, 0, 0, 0.2);
  font-family: 'Arial Black', 'Arial Bold', sans-serif;
  letter-spacing: -2px;
}

.display-text {
  font-size: 8vw;
  font-weight: 700;
  color: #8B0000;
  line-height: 1.2;
  word-wrap: break-word;
  transition: all 0.3s ease;
  text-shadow: 
    2px 2px 0px #DC143C,
    4px 4px 8px rgba(0, 0, 0, 0.15);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

@media (min-width: 768px) {
  .display-number {
    font-size: 12rem;
  }
  .display-text {
    font-size: 5rem;
  }
  .header h1 {
    font-size: 2.5rem;
  }
  .header p {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 1.5rem;
    letter-spacing: 1px;
  }
  .header p {
    font-size: 0.9rem;
  }
  .display-content {
    padding: 40px 20px;
    min-height: 300px;
  }
  .control-container {
    padding: 25px 20px;
  }
}

/* Control Page Styles */
.control-container {
  background: #FFFFFF;
  border-radius: 15px;
  padding: 40px;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.4),
    0 0 0 4px #DC143C,
    inset 0 0 30px rgba(220, 20, 60, 0.05);
  max-width: 600px;
  margin: 0 auto;
  border: 3px solid #8B0000;
  position: relative;
}

.control-section {
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 3px solid #DC143C;
  position: relative;
}

.control-section::before {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 50px;
  height: 3px;
  background: #8B0000;
}

.control-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.control-section:last-child::before {
  display: none;
}

.control-section h2 {
  color: #8B0000;
  margin-bottom: 20px;
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-left: 5px solid #DC143C;
  padding-left: 15px;
}

.current-status {
  background: linear-gradient(135deg, #FFF5F5 0%, #FFE5E5 100%);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  text-align: center;
  border: 2px solid #DC143C;
  box-shadow: inset 0 2px 5px rgba(220, 20, 60, 0.1);
}

.current-status-label {
  font-size: 0.9rem;
  color: #8B0000;
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.current-status-value {
  font-size: 2.5rem;
  font-weight: 900;
  color: #DC143C;
  text-shadow: 2px 2px 0px rgba(139, 0, 0, 0.2);
  font-family: 'Arial Black', 'Arial Bold', sans-serif;
}

.button-group {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.btn {
  flex: 1;
  padding: 15px 30px;
  font-size: 1.2rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-primary {
  background: linear-gradient(135deg, #DC143C 0%, #B22222 100%);
  color: white;
  border: 2px solid #8B0000;
  box-shadow: 
    0 4px 0 #8B0000,
    0 6px 10px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #FF1744 0%, #DC143C 100%);
  transform: translateY(-2px);
  box-shadow: 
    0 6px 0 #8B0000,
    0 8px 15px rgba(0, 0, 0, 0.4);
}

.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 
    0 2px 0 #8B0000,
    0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
  background: linear-gradient(135deg, #8B0000 0%, #6B0000 100%);
  color: white;
  border: 2px solid #DC143C;
  box-shadow: 
    0 4px 0 #DC143C,
    0 6px 10px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #A00000 0%, #8B0000 100%);
  transform: translateY(-2px);
  box-shadow: 
    0 6px 0 #DC143C,
    0 8px 15px rgba(0, 0, 0, 0.4);
}

.btn-secondary:active {
  transform: translateY(2px);
  box-shadow: 
    0 2px 0 #DC143C,
    0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #B22222 0%, #8B0000 100%);
  color: white;
  border: 2px solid #DC143C;
  box-shadow: 
    0 4px 0 #DC143C,
    0 6px 10px rgba(0, 0, 0, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #DC143C 0%, #B22222 100%);
  transform: translateY(-2px);
  box-shadow: 
    0 6px 0 #DC143C,
    0 8px 15px rgba(0, 0, 0, 0.4);
}

.btn-danger:active {
  transform: translateY(2px);
  box-shadow: 
    0 2px 0 #DC143C,
    0 4px 8px rgba(0, 0, 0, 0.3);
}

.input-group {
  margin-bottom: 15px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-weight: 500;
}

.input-group input {
  width: 100%;
  padding: 12px 15px;
  font-size: 1.1rem;
  border: 2px solid #DC143C;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: #FFF5F5;
}

.input-group input:focus {
  outline: none;
  border-color: #8B0000;
  background: #FFFFFF;
  box-shadow: 
    0 0 0 3px rgba(220, 20, 60, 0.2),
    inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.status-message {
  padding: 10px;
  border-radius: 5px;
  margin-top: 10px;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.status-message.show {
  opacity: 1;
}

.status-message.success {
  background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
  color: #2E7D32;
  border: 2px solid #4CAF50;
  font-weight: 600;
}

.status-message.error {
  background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
  color: #C62828;
  border: 2px solid #DC143C;
  font-weight: 600;
}

.connection-status {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 1000;
}

.connection-status.connected {
  background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
  color: #2E7D32;
  border: 2px solid #4CAF50;
  font-weight: 600;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.connection-status.disconnected {
  background: linear-gradient(135deg, #FFEBEE 0%, #FFCDD2 100%);
  color: #C62828;
  border: 2px solid #DC143C;
  font-weight: 600;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

