/* Custom styles for IP Tracker */

/* Base styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color-scheme: dark;
}

/* Background pattern overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1.59px, transparent 1px);
    background-size: 30px 30px;
    z-index: -1;
    opacity: 0.6;
    pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Apply animations to elements */
#results, #map-container, #history-section {
    animation: fadeIn 0.5s ease-out;
}

/* Common transitions */
.result-item, input, button, a, footer a, .history-item {
    transition: all 0.3s ease;
}

/* Input styling */
input {
    border: 1px solid rgba(75, 85, 99, 0.5);
}

input:hover {
    border-color: rgba(75, 85, 99, 0.8);
}

/* Map container styles */
#map {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.8);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 114, 128, 0.8);
}

/* Feature icons */
.bg-primary-500 {
    transition: background-color 0.3s ease;
}

/* Element hover effects */
.result-item:hover {
    transform: translateY(-2px);
}

.grid .bg-dark-800:hover {
    border-color: #0c694d;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.history-item:hover {
    background-color: rgba(31, 41, 55, 0.7);
    transform: translateX(3px);
}

/* Terminal mockup styles */
.bg-gray-800.font-mono {
    border-radius: 0 0 0.5rem 0.5rem;
}

/* Country flag styles */
#country-flag {
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Loading spinner */
.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Footer links hover effect */
footer a {
    position: relative;
}

footer a:hover {
    padding-left: 3px;
}

footer a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: rgba(25, 187, 120, 0.8);
    transition: width 0.3s ease;
}

footer a:hover::after {
    width: 100%;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    #results, #map-container, #history-section {
        margin-left: 1rem;
        margin-right: 1rem;
    }
    
    .grid {
        gap: 1rem;
    }
    
    .testimonials-section .md\:translate-y-4 {
        transform: translateY(0);
    }
    
    .testimonials-section .grid {
        gap: 2rem;
    }
    
    .testimonials-section .border-r.border-gray-700 {
        display: none;
    }
    
    .testimonials-section .mt-16.flex {
        flex-direction: column;
        gap: 2rem;
    }
}

/* Dark mode specific styles */
.dark input {
    background-color: rgba(17, 24, 39, 0.8);
    color: #fff;
}

.dark .bg-dark-800 {
    background-color: rgba(31, 41, 55, 0.7);
    backdrop-filter: blur(10px);
}

/* Testimonials Section Styles */
.testimonials-section .bg-dark-800 {
  background-color: rgba(31, 41, 55, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(75, 85, 99, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.testimonials-section .bg-dark-800:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  border-color: rgba(25, 187, 120, 0.3);
}

.testimonials-section .text-yellow-400 {
  display: flex;
  font-size: 1.1rem;
  letter-spacing: 1px;
  text-shadow: 0 0 5px rgba(250, 204, 21, 0.3);
}

.testimonials-section .bg-gradient-to-br {
  position: relative;
  overflow: hidden;
}

.testimonials-section .bg-gradient-to-br::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at bottom right, rgba(25, 187, 120, 0.3), transparent 70%);
  border-radius: 9999px;
}

.testimonials-section .text-primary-400 {
  color: rgba(25, 187, 120, 0.9);
  font-weight: 600;
}

.testimonials-section .bg-primary-500 {
  background-color: rgba(25, 187, 120, 0.9);
  box-shadow: 0 0 10px rgba(25, 187, 120, 0.5);
}

.testimonials-section .border-gray-700 {
  height: 40px;
  opacity: 0.4;
}

.testimonials-section .text-gray-300.mb-6 {
  position: relative;
  padding-left: 6px;
  line-height: 1.6;
}

.testimonials-section .text-gray-300.mb-6::before {
  content: "";
  position: absolute;
  left: -10px;
  top: -8px;
  font-size: 2rem;
  font-family: Georgia, serif;
  color: rgba(25, 187, 120, 0.3);
  opacity: 0.7;
}