:root {
  --primary-color: #8a691a;
  --secondary-color: #ae8226;
  --accent-color: #8a691a;
  --text-color: #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.1);
  --button-text: #ffffff;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--text-color);
  min-height: 100vh;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 20px;
  line-height: 1.6;
}

.offline-container {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 2rem;
  max-width: 680px;
  width: 100%;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: fadeIn 0.5s ease-out;
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* Title section */
.title-container {
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 9px;
}

.license-content .license-section:first-child {
  margin-top: 0;
}

.title-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: nowrap;
}

.app-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
}

.verified-badge {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}

.subtitle {
  font-size: 1rem;
  color: #777;
  margin-top: 0.5rem;
}

p {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.button-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.button-horizontal {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
  width: 100%;
}

.btn {
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-primary {
  background: var(--accent-color);
  color: var(--button-text);
}

.btn-secondary {
  background: transparent;
  color: var(--text-color);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  background: #6a4f14;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

#connection-status {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.status-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ef4444;
  animation: pulse 2s infinite;
  transition: all 0.3s ease;
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.online .status-icon {
  background: #10b981;
  animation: none;
}

#retry-btn {
  display: none;
}

.btn.install-android {
  width: 100% !important;
}

.status-transition {
  opacity: 0.7;
  transform: scale(0.98);
}

/* iOS install guide styles */
.ios-install-guide {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 16px;
  margin-top: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  max-width: 320px;
}

.ios-install-guide .guide-content {
  color: #333;
}

.ios-install-guide h4 {
  margin-top: 0;
  margin-bottom: 12px;
  font-weight: 600;
}

.ios-install-guide .guide-steps {
  padding-left: 20px;
  margin-bottom: 16px;
}

.ios-install-guide .guide-steps li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.ios-install-guide .guide-steps .icon {
  margin-left: 4px;
}

.ios-install-guide .guide-footer {
  text-align: right;
}

.pulse-animation {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .offline-container {
    padding: 1.5rem;
    border-radius: 16px;
  }

  .logo {
    width: 80px;
    height: 80px;
  }

  h1 {
    font-size: 1.5rem;
  }

  .verified-badge {
    width: 16px;
    height: 16px;
  }

  .button-horizontal {
    flex-direction: row !important;
    flex-wrap: wrap;
    justify-content: center;
  }

  .btn {
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
  }

  #connection-status {
    font-size: 0.8rem;
  }

  .ios-install-guide {
    max-width: 100%;
  }
}

@media (max-width: 360px) {
  .btn span {
    display: none;
  }

  .btn {
    justify-content: center;
  }
}
