@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Poppins:wght@300;400;500;600;700&display=swap');
@import 'variables.css';
@import 'layout.css';
@import 'animations.css';

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-primary-900);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary-700);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-600);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: var(--z-max);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-normal);
}

.modal.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: var(--bg-card);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 90%;
  text-align: center;
  position: relative;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xl);
  transform: scale(0.9);
  transition: transform var(--transition-normal);
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  font-size: var(--text-xl);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-title {
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

.modal-text {
  color: var(--text-secondary);
}

/* Page Content Spacing */
.page-content {
  padding-top: 80px; /* Account for fixed header */
  min-height: calc(100vh - 120px); /* Account for header and footer */
}

/* Section transition effects */
.section {
  position: relative;
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
  opacity: 0.05;
  z-index: -1;
  pointer-events: none;
}

.section:nth-of-type(odd)::before {
  background-image: url('../assets/images/section-bg-1.jpg');
}

.section:nth-of-type(even)::before {
  background-image: url('../assets/images/section-bg-2.jpg');
}

/* Game page styling */
.game-page-header {
  padding: var(--space-8) 0 var(--space-4);
  text-align: center;
}

.game-page-title {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-2);
  background: linear-gradient(to right, var(--color-accent-300), var(--color-secondary-300));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

.back-link:hover {
  color: var(--text-link);
}

/* Loader */
.loader {
  display: inline-block;
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--color-accent-500);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Loading overlay for game frames */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 5;
}

.game-wrapper {
  position: relative;
}