/* Base Styles */
body { 
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: #333;
  scroll-behavior: smooth;
  margin: 0;
  padding: 0;
}

/* Performance optimizations */
* {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}

/* Reduce layout shifts */
.card {
  min-height: 200px;
}

.hero {
  min-height: 400px;
}

/* Improved Mobile Responsiveness */
@media (max-width: 768px) {
  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  h1 {
    font-size: 2rem !important;
  }
  
  h2 {
    font-size: 1.75rem !important;
  }
  
  .card {
    margin-bottom: 15px;
  }
  
  .navbar-collapse {
    background: rgba(0, 0, 0, 0.9);
    border-radius: 0 0 15px 15px;
    padding: 10px;
  }
}

/* Modern Spinner */
.spinner-border {
  width: 2rem;
  height: 2rem;
  border-width: 0.2em;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Ad Section Spacing Fix */
.ad-section {
  margin: 15px 0;
  padding: 10px;
  background: rgba(248, 249, 250, 0.7);
  border-radius: 8px;
}

/* WhatsApp Feedback Button */
.whatsapp-feedback {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #25D366;
  color: white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  z-index: 1000;
}

.whatsapp-feedback:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 15px rgba(0,0,0,0.25);
  background: #128C7E;
}

.whatsapp-feedback i {
  font-size: 28px;
}

/* Accessibility */
.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, rgb(78, 84, 200), rgb(143, 148, 251));
  color: white;
  padding: 100px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  margin-bottom: 30px;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /*background: url('https://via.placeholder.com/1920x1080.png?text=Pattern') repeat;*/
  opacity: 0.05;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 span { 
  border-right: 2px solid #fff; 
  animation: blink 0.8s infinite; 
}

@keyframes blink { 
  50% { border-color: transparent; } 
}

/* Card Styles */
.card {
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: none;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  margin-bottom: 20px;
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
  background: linear-gradient(145deg, #ffffff, #f0f0f0);
}

/* Navigation */
.navbar { 
  backdrop-filter: blur(10px); 
  -webkit-backdrop-filter: blur(10px);
  background-color: rgba(13, 17, 55, 0.9) !important; 
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  padding: 10px 0;
  z-index: 1030;
}

/* Button Styles */
.btn-primary {
  background: linear-gradient(45deg, #4361ee, #3a0ca3);
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-primary:hover {
  background: linear-gradient(45deg, #3a0ca3, #4361ee);
  transform: translateY(-2px);
  box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 2px 5px rgba(50, 50, 93, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.btn-primary:hover::after {
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(20, 20);
    opacity: 0;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.navbar-brand { 
  font-weight: bold; 
  color: #fff !important; 
}

.navbar-nav .nav-link { 
  color: #ddd !important; 
  transition: color 0.2s ease;
  padding: 0.5rem 1rem;
  margin: 0 0.2rem;
}

.navbar-nav .nav-link:hover, 
.navbar-nav .nav-link:focus { 
  color: #fff !important; 
}

.navbar-nav .nav-link.active {
  color: #fff !important;
  font-weight: 600;
}

/* Footer */
footer { 
  background: #222; 
  color: #bbb; 
  padding: 40px 0 20px; 
}

footer h5 {
  color: #fff;
  margin-bottom: 1.2rem;
  font-weight: 600;
}

footer a {
  transition: color 0.2s ease;
}

footer a:hover {
  color: #fff !important;
  text-decoration: none;
}

/* Ad Containers */
.ad-container {
  margin: 20px auto;
  overflow: hidden;
  transition: all 0.3s ease;
}

.ad-placeholder {  
  background: #f8f9fa;  
  border: 2px dashed #bbb;  
  color: #555;  
  text-align: center;  
  padding: 20px;  
  margin: 40px auto;  
  font-size: 14px;  
  border-radius: 10px;  
  transition: background-color 0.3s ease;
}

/* AdSense format specific styles */
.ad-container[data-ad-format="horizontal"] {
  max-width: 728px;
  min-height: 90px;
}

.ad-container[data-ad-format="rectangle"] {
  max-width: 300px;
  min-height: 250px;
}

.ad-container[data-ad-format="large-rectangle"] {
  max-width: 336px;
  min-height: 280px;
}

/* Wheel Container */
.wheel-container {
  margin: 0 auto;
  max-width: 300px;
}

/* Quote Container */
.quote-container {
  background-color: #f8f9fa;
  color: #212529;
  padding: 2rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  position: relative;
  border-left: 5px solid #4e54c8;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero {
    padding: 100px 0 80px;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
}

/* Performance optimizations */
.will-change-transform {
  will-change: transform;
}

.will-change-opacity {
  will-change: opacity;
}

/* Optimize animations for performance */
.card {
  transform: translateZ(0);
  backface-visibility: hidden;
}

.btn-primary {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Reduce paint operations */
.hero::before {
  transform: translateZ(0);
  will-change: transform;
}

/* Print Styles */
@media print {
  .navbar, .hero, footer, .ad-placeholder {
    display: none;
  }
  
  body {
    font-size: 12pt;
  }
  
  .container {
    width: 100%;
    max-width: 100%;
  }
}
