/* Optimization styles for Novelista web app */

/* Use system fonts by default */
body, html {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* Optimize font loading behavior for custom fonts */
@font-face {
  font-family: 'SFPro';
  font-style: normal;
  font-weight: 700;
  font-display: swap; /* Use system font until custom font loads */
  src: local('SF Pro Display Bold'), local('SFProDisplay-Bold');
}

@font-face {
  font-family: 'SFPro';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: local('SF Pro Display Semibold'), local('SFProDisplay-Semibold');
}

@font-face {
  font-family: 'SFPro';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: local('SF Pro Display Medium'), local('SFProDisplay-Medium');
}

@font-face {
  font-family: 'SFPro';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('SF Pro Display Regular'), local('SFProDisplay-Regular');
}

@font-face {
  font-family: 'SFPro';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: local('SF Pro Display Thin'), local('SFProDisplay-Thin');
}

/* Loading indicator styles */
#flutter-loading-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #000000;
  color: white;
  z-index: 9999;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 20px;
}

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

/* Performance optimization for Flutter canvas */
canvas {
  image-rendering: optimizeSpeed;
}