/* ===== OFFLINE SCREEN STYLES ===== */

.offline-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #090b13 0%, #1a1b3a 50%, #090b13 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease-out;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
}

.offline-screen.show {
  opacity: 1;
  visibility: visible;
}

.offline-container {
  max-width: 500px;
  width: 100%;
  background: rgba(15, 18, 32, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 32px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  text-align: center;
  animation: slideUp 0.5s ease-out;
}

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

/* Offline Icon */
.offline-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, #ff3158, #ff6b8a);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  box-shadow: 0 8px 24px rgba(255, 49, 88, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 24px rgba(255, 49, 88, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(255, 49, 88, 0.5);
  }
}

/* Offline Title */
.offline-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #ecf2ff;
  margin: 0 0 12px 0;
  line-height: 1.2;
}

.offline-subtitle {
  font-size: 1rem;
  color: #a7afc6;
  margin: 0 0 32px 0;
  line-height: 1.5;
}

/* Event Info Card */
.offline-event-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  text-align: left;
}

.offline-event-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ecf2ff;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.offline-event-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.offline-event-detail {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: #dfe7ff;
}

.offline-event-detail-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff3158;
  font-size: 16px;
}

/* QR Code Container */
.offline-qr-container {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.offline-qr-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #090b13;
  margin: 0 0 16px 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.offline-qr-code {
  width: 100%;
  max-width: 280px;
  height: auto;
  margin: 0 auto;
  display: block;
  border-radius: 8px;
}

.offline-qr-placeholder {
  width: 280px;
  height: 280px;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a7afc6;
  font-size: 0.9rem;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}

/* Retry Button */
.offline-retry-btn {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #ff3158, #ff6b8a);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(255, 49, 88, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.offline-retry-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(255, 49, 88, 0.4);
}

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

.offline-retry-icon {
  font-size: 18px;
  animation: rotate 1s linear infinite;
}

.offline-retry-btn:not(.checking) .offline-retry-icon {
  animation: none;
}

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

/* Status Indicator */
.offline-status {
  margin-top: 16px;
  font-size: 0.85rem;
  color: #a7afc6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.offline-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff3158;
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .offline-screen {
    padding: 16px;
    align-items: flex-start;
    padding-top: 80px; /* Platz für Navbar */
  }
  
  .offline-container {
    padding: 24px 16px;
    border-radius: 20px;
    max-width: 100%;
  }
  
  .offline-icon {
    width: 64px;
    height: 64px;
    font-size: 32px;
    margin-bottom: 16px;
  }
  
  .offline-title {
    font-size: 1.5rem;
    margin-bottom: 8px;
  }
  
  .offline-subtitle {
    font-size: 0.875rem;
    margin-bottom: 20px;
  }
  
  .offline-event-card {
    padding: 16px;
    margin-bottom: 20px;
  }
  
  .offline-event-name {
    font-size: 1.125rem;
    margin-bottom: 12px;
  }
  
  .offline-event-details {
    gap: 10px;
  }
  
  .offline-event-detail {
    font-size: 0.875rem;
    padding: 8px 0;
  }
  
  .offline-event-detail-icon {
    font-size: 16px;
    min-width: 20px;
  }
  
  .offline-qr-container {
    padding: 16px;
    margin-bottom: 20px;
  }
  
  .offline-qr-code,
  .offline-qr-placeholder {
    max-width: 260px;
    height: 260px;
  }
  
  .offline-retry-btn {
    padding: 14px 28px;
    font-size: 0.9375rem;
  }
  
  .offline-status {
    font-size: 0.8125rem;
    margin-top: 12px;
  }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
  .offline-screen {
    padding: 12px;
    padding-top: 70px;
  }
  
  .offline-container {
    padding: 20px 14px;
    border-radius: 16px;
  }
  
  .offline-icon {
    width: 56px;
    height: 56px;
    font-size: 28px;
    margin-bottom: 14px;
  }
  
  .offline-title {
    font-size: 1.25rem;
  }
  
  .offline-subtitle {
    font-size: 0.8125rem;
    margin-bottom: 16px;
  }
  
  .offline-event-card {
    padding: 14px;
    margin-bottom: 16px;
  }
  
  .offline-event-name {
    font-size: 1rem;
    margin-bottom: 10px;
  }
  
  .offline-event-detail {
    font-size: 0.8125rem;
    padding: 6px 0;
  }
  
  .offline-event-detail-icon {
    font-size: 14px;
    min-width: 18px;
  }
  
  .offline-qr-code,
  .offline-qr-placeholder {
    max-width: 220px;
    height: 220px;
  }
  
  .offline-retry-btn {
    padding: 12px 24px;
    font-size: 0.875rem;
    width: 100%;
  }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .offline-screen {
    padding-top: 60px;
    align-items: center;
  }
  
  .offline-container {
    max-height: 90vh;
    overflow-y: auto;
  }
  
  .offline-icon {
    width: 50px;
    height: 50px;
    font-size: 25px;
    margin-bottom: 12px;
  }
  
  .offline-title {
    font-size: 1.25rem;
    margin-bottom: 6px;
  }
  
  .offline-subtitle {
    font-size: 0.8125rem;
    margin-bottom: 14px;
  }
  
  .offline-qr-code,
  .offline-qr-placeholder {
    max-width: 180px;
    height: 180px;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .offline-screen,
  .offline-container,
  .offline-icon,
  .offline-retry-icon,
  .offline-status-dot {
    animation: none !important;
    transition: none !important;
  }
}
