* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  min-height: 100vh;
  color: #e0e0e0;
}

.container {
  max-width: 500px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  padding: 30px 0;
}

header h1 {
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 8px;
}

.subtitle {
  color: #888;
  font-size: 0.9rem;
}

.card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card h2 {
  font-size: 1.2rem;
  margin-bottom: 16px;
  color: #fff;
}

.status {
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  text-align: center;
}

.status.loading {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

.status.success {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}

.status.error {
  background: rgba(244, 67, 54, 0.2);
  color: #f44336;
}

.location-data {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.location-data.hidden {
  display: none;
}

.data-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-row:last-child {
  border-bottom: none;
}

.data-row .label {
  color: #888;
}

.data-row .value {
  color: #4fc3f7;
  font-family: 'Courier New', monospace;
}

.btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
  color: #000;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(79, 195, 247, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
  color: #fff;
}

.btn-success:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 187, 106, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #888;
  font-size: 0.9rem;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  font-size: 1rem;
}

.form-group input:focus {
  outline: none;
  border-color: #4fc3f7;
}

.form-group input::placeholder {
  color: #666;
}

.locations-list {
  margin-top: 16px;
}

.locations-list .loading,
.locations-list .empty,
.locations-list .error {
  text-align: center;
  padding: 20px;
  color: #888;
}

.locations-list .error {
  color: #f44336;
}

.location-item {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

.location-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.location-header strong {
  color: #fff;
}

.btn-delete {
  background: rgba(244, 67, 54, 0.2);
  color: #f44336;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-delete:hover {
  background: rgba(244, 67, 54, 0.4);
}

.location-coords,
.location-date {
  color: #888;
}

footer {
  text-align: center;
  padding: 30px 0;
  color: #666;
  font-size: 0.8rem;
}

@media (max-width: 480px) {
  .container {
    padding: 15px;
  }

  header h1 {
    font-size: 1.5rem;
  }

  .card {
    padding: 20px;
  }
}

/* ========== BANNER INSTALLAZIONE ========== */

#install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
  padding: 16px 20px;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

#install-banner.hidden {
  display: none;
}

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

.install-content {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.install-content span {
  color: #000;
  font-weight: 600;
  font-size: 0.95rem;
}

.install-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-install {
  background: #000;
  color: #4fc3f7;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-install:hover {
  background: #1a1a2e;
  transform: scale(1.05);
}

.btn-close-install {
  background: transparent;
  border: none;
  color: #000;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 8px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.btn-close-install:hover {
  opacity: 1;
}

@media (max-width: 400px) {
  .install-content {
    flex-direction: column;
    text-align: center;
  }
}
