/* Prevent zoom on mobile devices */
html, body {
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Prevent zoom on buttons and interactive elements */
button, .btn, .flag-btn, .skyline-btn, a {
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Prevent zoom on canvas */
#fireworks-canvas {
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-weight: 400;
  font-style: normal;
  background-color: #0a0e1a;
  color: #e8eaed;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: 'Cinzel', serif !important;
  font-optical-sizing: auto;
  font-weight: 700 !important;
  font-style: normal;
}

.navbar {
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  background-color: #1a1f2e !important;
}

.navbar-brand {
  letter-spacing: 2px;
}

section {
  scroll-margin-top: 80px;
}

/* Font weights are now handled in the heading selector above */

.text-primary {
  color: #dc3545 !important;
}

.bg-primary {
  background-color: #1a1f2e !important;
}

.btn-outline-primary {
  border-color: #dc3545;
  color: #dc3545;
}
.btn-outline-primary:hover {
  background-color: #dc3545;
  color: #ffffff;
}
.btn-outline-primary:focus {
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.flag-btn {
  background: #1a1f2e;
  border: none;
  border-radius: 6px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 2rem;
  cursor: pointer;
  padding: 3px 13px 0px;
  line-height: 1;
}
.flag-btn:hover, .flag-btn:focus {
  box-shadow: 0 0 0 4px #dc3545;
  outline: none;
  background: #2a2f3e;
  color: #ffffff;
}

#fireworks-canvas {
  background: #0f141f;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(74, 158, 255, 0.3);
  transition: box-shadow 0.3s ease;
}

.skyline-btn {
  background: #1a1f2e;
  border: 2px solid #dc3545;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #dc3545;
  transition: all 0.2s;
  cursor: pointer;
}
.skyline-btn:hover, .skyline-btn:focus {
  background: #dc3545;
  color: #ffffff;
  outline: none;
  border-color: #ffffff;
}
.skyline-btn.active {
  background: #dc3545;
  color: #ffffff;
  box-shadow: 0 0 0 2px #ffffff;
  border-color: #ffffff;
}

footer {
  letter-spacing: 1px;
  background-color: #1a1f2e !important;
}

/* Dark theme for cards */
.card {
  background-color: #0f141f !important;
  border: 1px solid #2a2f3e !important;
  color: #e8eaed !important;
}

.card-title {
  color: #dc3545 !important;
  font-family: 'Cinzel', serif !important;
  font-weight: 600;
  font-style: normal;
}

.card-text {
  color: #b0b3b8 !important;
}

/* Dark theme for text */
.text-muted {
  color: #9aa0a6 !important;
}

/* Dark theme for navbar brand */
.navbar-brand {
  color: #ffffff !important;
  font-family: 'Cinzel', serif !important;
  font-weight: 700;
  font-style: normal;
  font-size: 1.5rem;
  text-shadow: 0px 0px 9px rgba(220, 53, 69, 0.9);
}

/* Dark theme for nav links */
.navbar-nav .nav-link {
  color: #e8eaed !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-weight: 400;
  font-style: normal;
  transition: color 0.2s;
}

.navbar-nav .nav-link:hover {
  color: #ffffff !important;
}

/* Changelog styling */
.changelog-entry {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #2a2f3e;
}

.changelog-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.changelog-entry h6 {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #dc3545 !important;
}

.changelog-entry ul li {
  margin-bottom: 0.25rem;
  padding-left: 0.5rem;
  color: #e8eaed !important;
}

/* Modal dark theme */
.modal-content {
  background-color: #0f141f !important;
  border: 1px solid #2a2f3e !important;
}

.modal-header {
  border-bottom: 1px solid #2a2f3e !important;
  color: #e8eaed !important;
}

.modal-body {
  color: #e8eaed !important;
}

.modal-footer {
  border-top: 1px solid #2a2f3e !important;
}

/* Policy Table of Contents Styles */
.policy-toc {
  background: linear-gradient(135deg, #2a2f3e, #1a1f2e);
  border: 2px solid #007bff;
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.2);
}

.policy-toc-link {
  display: inline-block;
  background: linear-gradient(135deg, #dc3545, #b02a37);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
  margin: 0.25rem;
}

.policy-toc-link:hover {
  background: linear-gradient(135deg, #c82333, #a71e2a);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
  color: white;
  text-decoration: none;
}

/* Policy Section Styles */
.policy-section {
  background: linear-gradient(135deg, #2a2f3e, #1a1f2e);
  border: 2px solid #007bff;
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.2);
  transition: all 0.3s ease;
}

.policy-section:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(0, 123, 255, 0.3);
}

.policy-title {
  color: #007bff;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

.policy-section p {
  color: #e9ecef;
  line-height: 1.8;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.policy-section:target {
  border-color: #dc3545;
  box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
}

/* Add scroll margin to policy sections to account for fixed navbar */
.policy-section {
  scroll-margin-top: 100px;
}

/* Grand Finale Button Slide Down Animation */
.slide-down {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: opacity 0.5s cubic-bezier(0.4,2,0.2,1), transform 0.5s cubic-bezier(0.4,2,0.2,1);
}
#grand-finale-btn {
  opacity: 0;
  transform: translateY(-40px);
  transition: opacity 0.5s cubic-bezier(0.4,2,0.2,1), transform 0.5s cubic-bezier(0.4,2,0.2,1);
  /* Mobile responsive adjustments */
  max-width: 90vw;
  word-wrap: break-word;
  white-space: normal;
  text-align: center;
  padding: 12px 16px;
  font-size: 1rem;
  line-height: 1.4;
  margin: 0 auto;
  display: block;
  position: relative;
  z-index: 1000;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
  #grand-finale-btn {
    font-size: 0.9rem;
    padding: 10px 12px;
    margin: 10px auto;
    max-width: 95vw;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
  }
}

/* Ensure button container doesn't overflow */
.text-center.mt-3 {
  overflow: visible;
  padding: 0 10px;
}

/* Grand Finale Label Scale In Animation */
.finale-label {
  transition: transform 0.7s cubic-bezier(0.4,2,0.2,1), opacity 0.7s cubic-bezier(0.4,2,0.2,1);
  opacity: 0;
  transform: scale(0) translate(-50%,0);
}
.finale-label.finale-scale-in {
  opacity: 1 !important;
  transform: scale(1) translate(-50%,0) !important;
}

.finale-label {
  z-index: 10001 !important;
}

/* Primary color override */
:root {
  --bs-primary: #007bff !important;
}

.btn-primary, .btn-outline-primary {
  background-color: #007bff !important;
  border-color: #007bff !important;
  color: #fff !important;
}

.btn-outline-primary {
  background-color: transparent !important;
  color: #007bff !important;
}

.text-primary, .link-primary, a.text-primary, a.link-primary {
  color: #007bff !important;
}

a.text-primary:hover, a.link-primary:hover, a.btn-outline-primary:hover {
  color: #fff !important;
  background-color: #007bff !important;
  border-color: #007bff !important;
} 