/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: #121212;
  color: #e0e0e0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1 {
  font-size: 2rem;
  font-weight: 600;
  color: #ffffff;
}

h2 {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  color: #ffffff;
}

p {
  line-height: 1.6;
  color: #b0b0b0;
}

/* Layout */
header {
  background-color: #1e1e1e;
  padding: 1rem 2rem;
  border-bottom: 2px solid #333;
  transition: display 0.3s ease;
}

main {
  flex: 1;
  padding: 2rem;
}

footer {
  background-color: #1e1e1e;
  padding: 1rem 2rem;
  text-align: center;
  border-top: 2px solid #333;
  font-size: 0.875rem;
  color: #888;
}

/* Loading Indicator */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  gap: 1rem;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #333;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Views */
.view {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Error Overlay */
.error-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-content {
  background-color: #1e1e1e;
  border: 3px solid #d32f2f;
  border-radius: 8px;
  padding: 2rem;
  max-width: 600px;
  text-align: center;
}

.error-content h2 {
  color: #f44336;
  margin-bottom: 1rem;
}

.error-content p {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  color: #e0e0e0;
}

#error-actions button {
  background-color: #1976d2;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  margin: 0.5rem;
  transition: background-color 0.2s;
}

#error-actions button:hover,
#error-actions button:focus {
  background-color: #1565c0;
  outline: 3px solid #64b5f6;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
