:root {
  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;
  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

#app {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

header {
  margin-bottom: 3rem;
}

header h1 {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: white;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

header p {
  font-size: 1.2em;
  color: rgba(255, 255, 255, 0.8);
}

.flasher-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
  text-align: left;
}

@media (max-width: 768px) {
  .flasher-container {
    grid-template-columns: 1fr;
  }
}

.info-section,
.flash-section,
.status-section {
  background: rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.flash-section {
  text-align: center;
}

@media (max-width: 768px) {
  .flash-section {
    grid-column: span 1;
  }
}

.status-section {
  grid-column: span 2;
}

@media (max-width: 768px) {
  .status-section {
    grid-column: span 1;
  }
}

h2 {
  color: #e0e0e0;
  margin-bottom: 1rem;
  font-size: 1.5em;
}

ol {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
}

ol li {
  margin-bottom: 0.5rem;
}

.flash-button {
  background: #007bff;
  border: 1px solid #0056b3;
  color: white;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.flash-button:hover {
  background: #0056b3;
}

.flash-button:active {
  background: #004085;
}

#status {
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  color: #e0e0e0;
  border-left: 4px solid #007bff;
}

footer {
  color: rgba(255, 255, 255, 0.6);
  margin-top: 2rem;
}

footer a {
  color: #007bff;
}

/* ESP Web Tools component styling */
esp-web-install-button {
  --esp-tools-button-color: #ff6b6b;
  --esp-tools-button-text-color: white;
}

/* Responsive design */
@media (max-width: 768px) {
  .flasher-container {
    grid-template-columns: 1fr;
  }
  
  header h1 {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
  }
}

@media (max-width: 480px) {
  #app {
    padding: 1rem;
  }
  
  header h1 {
    font-size: clamp(1.2rem, 7vw, 2rem);
  }
  
  .info-section,
  .flash-section,
  .status-section {
    padding: 1.5rem;
  }
}

@media (max-width: 900px) {
  header h1 {
    font-size: clamp(1.6rem, 5.5vw, 2.8rem);
  }
}
