/* Global Styles - Base CSS for all pages */

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

/* CSS Variables */
:root {
  --primary: #0047AB;      /* HockeyFy Primary Blue (will be overridden by colors.js) */
  --primary-light: #007AFF; /* HockeyFy Secondary Blue (will be overridden by colors.js) */
  --secondary: #E63946;     /* HockeyFy Red (will be overridden by colors.js) */
  --dark: #0f172a;
  --light: #f8fafc;
  --gray: #64748b;
}

/* Base Typography */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  overflow-x: hidden;
}

/* Global Utility Classes */
.hidden {
  display: none;
}

.text-center {
  text-align: center;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Common Button Styles */
.btn {
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: white;
  color: var(--primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border: 2px solid transparent;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  background: var(--primary-light);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background: white;
  color: var(--primary);
  border-color: white;
}

.btn-danger {
  background: var(--secondary);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-right: 1rem;
  transition: all 0.3s;
}

.btn-danger:hover {
  background: #c82333;
  transform: translateY(-2px);
}

.btn-cancel {
  background: var(--gray);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-cancel:hover {
  background: #555;
}

/* Common Form Styles */
.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--dark);
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--light);
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group small {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* Common Message Styles */
.message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
}

.message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.warning-box {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  text-align: left;
}

.warning-box ul {
  margin: 0.5rem 0 0 1rem;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: var(--primary, #0047AB);
  color: white;
  border-color: var(--primary, #0047AB);
}

.btn-primary:hover {
  background: var(--primary-light, #007AFF);
  border-color: var(--primary-light, #007AFF);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 71, 171, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--primary, #0047AB);
  border-color: var(--primary, #0047AB);
}

.btn-secondary:hover {
  background: var(--primary, #0047AB);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 71, 171, 0.2);
}

/* Download CTA Section */
.download-cta-section {
  background: linear-gradient(135deg, #0047AB 0%, #007AFF 100%);
  padding: 80px 20px;
  text-align: center;
  margin-top: 80px;
}

.download-cta-section h2 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.download-cta-section p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.app-badges-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.app-store-btn-cta,
.google-play-btn-cta {
  display: inline-block;
  transition: transform 0.3s ease, opacity 0.3s ease;
  text-decoration: none;
}

.app-store-btn-cta:hover,
.google-play-btn-cta:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.app-store-btn-cta img,
.google-play-btn-cta img {
  height: 70px;
  width: auto;
}

.store-btn-fallback {
  background: rgba(0, 0, 0, 0.3);
  padding: 16px 32px;
  border-radius: 8px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px;
  color: white;
  font-weight: 600;
  backdrop-filter: blur(10px);
  text-decoration: none !important;
  min-height: 70px;
}

.store-btn-fallback svg {
  width: 32px !important;
  height: 32px !important;
  flex-shrink: 0;
}

.store-btn-fallback span {
  font-size: 16px;
  white-space: nowrap;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .btn {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }
  
  .download-cta-section {
    padding: 60px 20px;
    margin-top: 60px;
  }
  
  .download-cta-section h2 {
    font-size: 2rem;
  }
  
  .download-cta-section p {
    font-size: 1.1rem;
  }
  
  .app-badges-cta {
    flex-direction: column;
    gap: 1rem;
  }
  
  .app-store-btn-cta img,
  .google-play-btn-cta img {
    height: 60px;
  }
  
  .store-btn-fallback {
    min-height: 60px;
    padding: 12px 24px;
  }
  
  .store-btn-fallback svg {
    width: 28px !important;
    height: 28px !important;
  }
  
  .store-btn-fallback span {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.75rem;
  }
  
  .btn {
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
  }
  
  .download-cta-section {
    padding: 40px 15px;
    margin-top: 40px;
  }
  
  .download-cta-section h2 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
  }
  
  .download-cta-section p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .app-store-btn-cta img,
  .google-play-btn-cta img {
    height: 50px;
  }
  
  .store-btn-fallback {
    min-height: 50px;
    padding: 10px 20px;
    gap: 8px;
  }
  
  .store-btn-fallback svg {
    width: 24px !important;
    height: 24px !important;
  }
  
  .store-btn-fallback span {
    font-size: 13px;
  }
}

/* Touch-friendly styles for mobile */
@media (hover: none) and (pointer: coarse) {
  .btn, 
  .locale-btn,
  .mobile-menu-toggle,
  .nav-links a {
    min-height: 44px; /* iOS recommended touch target size */
    min-width: 44px;
  }
  
  .btn {
    padding: 1rem 2rem;
  }
  
  .nav-links a {
    padding: 1rem 0;
  }
  
  /* Remove hover effects on touch devices */
  .btn:hover,
  .nav-links a:hover,
  .locale-btn:hover {
    transform: none;
  }
  
  /* Add touch feedback */
  .btn:active,
  .nav-links a:active,
  .mobile-menu-toggle:active {
    opacity: 0.7;
    transform: scale(0.98);
  }
}