/* Стили для модального окна отправки координат */
.location-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(10px);
    }
}

.location-modal-content {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    padding: 30px;
    width: 100%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.location-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.location-close-btn:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    transform: rotate(90deg);
}

.location-modal-title {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: center;
    line-height: 1.4;
}

.location-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #f8fafc;
    font-weight: 600;
    font-size: 1rem;
}

.form-group input {
    padding: 15px;
    border: 2px solid rgba(100, 116, 139, 0.3);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.8);
    color: #f8fafc;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background: rgba(15, 23, 42, 0.9);
}

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

.form-group small {
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 4px;
}

/* Блок с информацией об устройстве */
.location-info {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(100, 116, 139, 0.2);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
    font-size: 0.9rem;
}

.info-item i {
    color: #3b82f6;
    width: 16px;
    text-align: center;
}

.location-status {
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    margin: 10px 0;
    transition: all 0.3s ease;
}

.location-status.success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.location-status.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.location-status:empty {
    display: none;
}

.modal-actions {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

#send-location-btn {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

#send-location-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
}

#send-location-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Адаптивность */
@media (max-width: 768px) {
    .location-modal {
        padding: 15px;
    }
    
    .location-modal-content {
        padding: 25px 20px;
        margin: 10px;
    }
    
    .location-modal-title {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .form-group input {
        padding: 12px;
    }
    
    .location-info {
        padding: 12px;
    }
    
    .info-item {
        font-size: 0.85rem;
    }
    
    #send-location-btn {
        padding: 14px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .location-modal-content {
        padding: 20px 15px;
    }
    
    .location-modal-title {
        font-size: 1.2rem;
    }
    
    .location-close-btn {
        top: 10px;
        right: 15px;
        font-size: 24px;
    }
    
    .info-item {
        font-size: 0.8rem;
    }
}

/* Анимация загрузки */
.fa-spinner {
    animation: spin 1s linear infinite;
}

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


/* Адаптивность для баннера emergency-banner */
.emergency-banner {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.15) 0%,
    rgba(139, 92, 246, 0.15) 25%,
    rgba(245, 158, 11, 0.15) 50%,
    rgba(59, 130, 246, 0.15) 75%,
    rgba(139, 92, 246, 0.15) 100%
  );
  backdrop-filter: blur(10px);
  border: 1px solid rgba(59, 130, 246, 0.4);
  padding: 20px;
  border-radius: 16px;
  margin: 20px 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: gradientShift 8s ease-in-out infinite;
  background-size: 400% 400%;
  width: 100%;
  text-align: center;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.emergency-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    rgba(59, 130, 246, 0.1) 0%, 
    transparent 30%,
    transparent 70%,
    rgba(139, 92, 246, 0.1) 100%);
  z-index: 1;
}

.emergency-content {
  position: relative;
  z-index: 2;
  margin-bottom: 20px;
  width: 100%;
  text-align: center;
}

.emergency-content h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--light);
  line-height: 1.4;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.emergency-content p {
  color: var(--gray-light);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Стиль для светящейся переливающейся кнопки */
.btn-glow {
  position: relative;
  z-index: 2;
  animation: glowPulse 2s ease-in-out infinite;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: white;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
  margin: 0 auto;
}

@keyframes glowPulse {
  0% {
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4),
                0 0 0 0 rgba(59, 130, 246, 0.7);
  }
  50% {
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.6),
                0 0 0 10px rgba(59, 130, 246, 0);
  }
  100% {
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4),
                0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.btn-glow:hover {
  transform: translateY(-3px);
  animation: none;
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.5),
              0 0 0 5px rgba(59, 130, 246, 0.3);
}

/* Адаптивность для баннера */
@media (max-width: 768px) {
  .emergency-banner {
    padding: 18px 15px;
    margin: 18px 0;
  }
  
  .emergency-content h3 {
    font-size: 1.1rem;
  }
  
  .emergency-content p {
    font-size: 0.9rem;
  }
  
  .btn-glow {
    width: auto;
    min-width: 280px;
    justify-content: center;
    white-space: nowrap;
    padding: 10px 18px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .emergency-banner {
    padding: 15px 12px;
    margin: 15px 0;
  }
  
  .emergency-content h3 {
    font-size: 1rem;
    margin-bottom: 8px;
  }
  
  .emergency-content p {
    font-size: 0.85rem;
  }
  
  .btn-glow {
    min-width: 220px;
    padding: 10px 16px;
    font-size: 0.85rem;
  }
}
/* Текст кнопки в одну строку */
@media (max-width: 768px) {
  .hero .btn-primary {
    white-space: nowrap;
    font-size: 0.9rem;
    padding: 12px 16px;
    width: auto;
    min-width: 280px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero .btn-primary {
    font-size: 0.85rem;
    padding: 11px 14px;
    min-width: 260px;
  }
}

@media (max-width: 360px) {
  .hero .btn-primary {
    font-size: 0.8rem;
    padding: 10px 12px;
    min-width: 240px;
  }
}