/* VPN Checker Website - Main Stylesheet */

/* Ad Placeholder Styles */
.ad-top { background: #e3f2fd; border-color: #4285f4; color: #174ea6; }
.ad-incontent {
  background: #fffbe6;
  border-color: #fbbc05;
  color: #c5221f;
  display: block;
  margin: 2rem 0 2rem 0;
  border-radius: 0.7rem;
  box-shadow: 0 0 8px 2px #fbbc05aa;
  font-size: 1.15rem;
  font-weight: bold;
  padding: 1.2rem 0;
  text-align: center;
}
.ad-bottom { background: #e6f4ea; border-color: #34a853; color: #0b8043; }

/* CSS Variables */
:root {
  --bg-main: #1a202c;
  --bg-panel: #2d3748;
  --text-main: #ffffff;
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
}

/* Base Styles */
* { box-sizing: border-box; }
body {
  font-family: sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  margin: 0;
  padding: 0;
}

/* Layout */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

section {
  display: grid;
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Responsive Grid */
@media (min-width: 768px) {
  section {
    grid-template-columns: repeat(2, 1fr);
  }
  .faq {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 767px) {
  main {
    padding: 1rem 0.5rem;
  }
  section {
    grid-template-columns: 1fr !important;
    gap: 1rem;
    margin-bottom: 2rem;
  }
  .faq {
    grid-template-columns: 1fr;
  }
  .header {
    flex-direction: row;
    padding: 1rem 1rem;
  }
}

/* Panel Styles */
.panel {
  background-color: var(--bg-panel);
  padding: 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Button Styles */
.btn {
  background-color: var(--accent);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.7rem 1.8rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background-color: var(--accent-hover);
  transform: scale(1.02);
}

/* Input Styles */
input[type="text"] {
  flex: 1;
  padding: 0.6rem;
  font-size: 1rem;
  border: 1px solid #2d3748;
  border-radius: 0.5rem;
  background-color: #4a5568;
  color: white;
  outline: none;
}

/* Utility Classes */
.flex {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.text-sm { font-size: 0.9rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.font-semibold { font-weight: 600; }
.text-blue { color: #60a5fa; }

.center-btn {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-start;
}

/* Map Styles */
#map, #lookup-map {
  height: 220px;
  border-radius: 0.5rem;
  overflow: hidden;
}

/* Header Styles */
.header {
  background: #1a202c;
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.logo a {
  color: inherit;
  text-decoration: none;
}

/* Desktop Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s ease;
}

.nav a:hover {
  color: #60a5fa;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #60a5fa;
  transition: width 0.3s ease;
}

.nav a:hover::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  width: 25px;
  height: 3px;
  background: #ffffff;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.hamburger {
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  top: 8px;
}

/* Active Hamburger Animation */
.nav-toggle.active .hamburger {
  background: transparent;
}

.nav-toggle.active .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}

.nav-toggle.active .hamburger::after {
  transform: rotate(-45deg);
  top: 0;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(26, 32, 44, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 9999;
  }
  
  .nav.open {
    transform: translateX(0);
  }
  
  .nav a {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    padding: 1.2rem 2.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 220px;
    min-height: 48px;
  }
  
  .nav a:hover {
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
    transform: translateY(-2px);
  }
  
  .nav a::after {
    display: none;
  }
  
  .nav-toggle {
    display: flex;
  }
}

/* Leaflet Map Control Z-Index Override */
.leaflet-control-container .leaflet-top,
.leaflet-control-container .leaflet-bottom {
  z-index: 100 !important;
}

.leaflet-control-zoom,
.leaflet-control-attribution {
  z-index: 100 !important;
}

.leaflet-control {
  z-index: 100 !important;
}

/* Footer Styles */
.footer {
  background: #181e29;
  color: #b4c2d6;
  text-align: center;
  padding: 2rem 1rem 1rem 1rem;
  margin-top: 2rem;
  font-size: 1rem;
}

.footer-nav {
  margin-bottom: 0.5rem;
}

.footer-nav a {
  color: #60a5fa;
  margin: 0 0.75rem;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-nav a:hover, 
.footer-nav a:focus {
  color: #fff;
  text-decoration: underline;
}

.footer-copy {
  font-size: 0.95rem;
  color: #9ca3af;
}

@media (max-width: 600px) {
  .footer-nav a {
    display: block;
    margin: 0.5rem 0;
  }
}

/* FAQ Styles */
.faq {
  display: grid;
  gap: 1.2rem;
  margin-top: 1rem;
}

.faq-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.faq-item div {
  font-size: 1rem;
  color: #e0e0e0;
}

/* Side Ad Styles */
.ad-side {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  max-width: 160px;
  background: rgba(45, 55, 72, 0.3) !important;
  border: 1px solid rgba(96, 165, 250, 0.2) !important;
  box-shadow: none !important;
  color: transparent !important;
  z-index: 100;
  display: block;
  padding: 0;
  margin: 0 0.5rem;
  border-radius: 8px;
}

.ad-left {
  left: 0.5rem;
}

.ad-right {
  right: 0.5rem;
}

@media (max-width: 1200px) {
  .ad-side { display: none !important; }
}
