@import "tailwindcss";
@plugin "daisyui" {
  themes: coffee --default;
}

/* Custom component classes using standard CSS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: background-color 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background-color: #3B82F6;
  color: white;
}
.btn-primary:hover {
  background-color: #2563EB;
}

.btn-secondary {
  background-color: #10B981;
  color: white;
}
.btn-secondary:hover {
  background-color: #059669;
}

.btn-outline {
  border: 1px solid #D1D5DB;
  color: #374151;
  background-color: transparent;
}
.btn-outline:hover {
  background-color: #F9FAFB;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

.card {
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-primary {
  background-color: #DBEAFE;
  color: #1E40AF;
}

.badge-success {
  background-color: #D1FAE5;
  color: #065F46;
}

.badge-neutral {
  background-color: #F3F4F6;
  color: #374151;
}

.badge-lg {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-content {
  position: relative;
  z-index: 10;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.5rem 1rem;
  text-align: left;
  border-bottom: 1px solid #E5E7EB;
}

.table th {
  background-color: #F9FAFB;
  font-weight: 500;
}

.table-zebra tbody tr:nth-child(odd) {
  background-color: #F9FAFB;
}

.avatar {
  position: relative;
  display: inline-block;
}

.avatar.placeholder div {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-box {
  position: relative;
  border-radius: 0.5rem;
  max-width: 32rem;
  width: 100%;
  max-height: 100vh;
  overflow: auto;
}

/* Custom Gamizz colors */
:root {
  --color-gamizz-primary: #3B82F6;
  --color-gamizz-secondary: #10B981;
  --color-gamizz-accent: #F59E0B;
  --color-gamizz-dark: #1F2937;
}

/* Additional professional styles */
.btn-disabled {
  background-color: #6B7280;
  color: #9CA3AF;
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-disabled:hover {
  background-color: #6B7280;
  color: #9CA3AF;
}

/* Enhanced card hover effects */
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

/* Text shadow for better readability over images */
.drop-shadow-lg {
  filter: drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1));
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

/* Enhanced gradient overlays for better text readability */
.image-overlay-strong {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.3) 100%);
}

.image-overlay-medium {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.2) 100%);
}

/* Card image with better text contrast */
.card-image-overlay {
  position: relative;
}

.card-image-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.1) 100%);
  pointer-events: none;
}

/* Smooth animations */
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

/* Gradient text effect */
.gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Custom scrollbar for thumbnails */
.thumbnail-scroll::-webkit-scrollbar {
  height: 4px;
}

.thumbnail-scroll::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.thumbnail-scroll::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.thumbnail-scroll::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Prose styling for game instructions */
.prose {
  max-width: none;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
  color: #1F2937;
  font-weight: 700;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.prose p {
  margin-bottom: 1em;
  line-height: 1.7;
}

.prose ul, .prose ol {
  margin-bottom: 1em;
  padding-left: 1.5em;
}

.prose li {
  margin-bottom: 0.5em;
}

.prose strong {
  font-weight: 600;
  color: #374151;
}

/* Loading animation for images */
.image-loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Enhanced focus states for accessibility */
.btn:focus,
button:focus {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
}

/* Modern glass morphism effect */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Improved mobile responsiveness */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .hero-content {
    padding: 2rem 0;
  }
  
  .grid {
    gap: 1rem;
  }
}

/* Game End Modal Styles */
.game-end-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.game-end-modal.show {
  opacity: 1;
  visibility: visible;
}

.game-end-modal-content {
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
  border-radius: 1rem;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  border: 2px solid #4b5563;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.game-end-modal.show .game-end-modal-content {
  transform: scale(1);
}

.game-end-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #4b5563;
}

.game-end-title {
  font-size: 2rem;
  font-weight: bold;
  color: #f59e0b;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.game-end-subtitle {
  color: #d1d5db;
  font-size: 1.1rem;
}

.game-end-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.game-end-stat {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid #3b82f6;
  border-radius: 0.5rem;
  padding: 1rem;
  text-align: center;
}

.game-end-stat-label {
  color: #93c5fd;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.game-end-stat-value {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: bold;
}

.game-end-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.game-end-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.game-end-btn-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
}

.game-end-btn-primary:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  transform: translateY(-1px);
  box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.4);
}

.game-end-btn-secondary {
  background: transparent;
  color: #d1d5db;
  border: 1px solid #6b7280;
}

.game-end-btn-secondary:hover {
  background: #374151;
  border-color: #9ca3af;
}

/* Enhanced game UI styles */
.game-ui {
  position: relative;
  overflow: hidden;
}

.game-header-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    #f59e0b 20%, 
    #ef4444 50%, 
    #f59e0b 80%, 
    transparent 100%);
  animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.loading-spinner {
  position: relative;
}

.loading-spinner::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  background: #f59e0b;
  animation: pulse-glow 1.5s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { 
    transform: scale(0.8);
    opacity: 0.5; 
  }
  50% { 
    transform: scale(1.2);
    opacity: 1; 
  }
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .game-end-modal-content {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .game-end-stats {
    grid-template-columns: 1fr;
  }
  
  .game-end-title {
    font-size: 1.5rem;
  }
}

/* Responsive Game Container */
.game-container-responsive {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9; /* Responsywny aspect ratio */
  max-height: 80vh;
  overflow: hidden;
}

@media (max-width: 640px) {
  .game-container-responsive {
    aspect-ratio: 4/3; /* Lepszy aspect ratio na telefonie */
    min-height: 400px;
  }
  
  /* Adjust game header for mobile */
  .game-header-mobile {
    flex-direction: column;
    gap: 1rem;
  }
  
  .game-stats-mobile {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
  }
}

/* Game Instructions Popup */
.game-instructions-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.game-instructions-modal.show {
  opacity: 1;
  visibility: visible;
}

.game-instructions-content {
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
  border-radius: 1rem;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  border: 2px solid #4b5563;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.game-instructions-modal.show .game-instructions-content {
  transform: scale(1);
}

.game-instructions-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #4b5563;
}

.game-instructions-title {
  font-size: 1.8rem;
  font-weight: bold;
  color: #f59e0b;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.game-instructions-body {
  color: #e5e7eb;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.game-instructions-body h4 {
  color: #f59e0b;
  font-weight: 600;
  margin: 1rem 0 0.5rem 0;
}

.game-instructions-body ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}

.game-instructions-body li {
  margin-bottom: 0.25rem;
}

.game-instructions-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.game-instructions-btn {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.game-instructions-btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
}

.game-instructions-btn-primary:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.4);
}

.game-instructions-btn-secondary {
  background: transparent;
  color: #d1d5db;
  border: 1px solid #6b7280;
}

.game-instructions-btn-secondary:hover {
  background: #374151;
  border-color: #9ca3af;
}

/* Mobile responsiveness for instructions */
@media (max-width: 640px) {
  .game-instructions-content {
    padding: 1.5rem;
    margin: 1rem;
    max-height: 90vh;
  }
  
  .game-instructions-title {
    font-size: 1.5rem;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .prose h1, .prose h2, .prose h3, .prose h4 {
    color: #F9FAFB;
  }
  
  .prose p {
    color: #E5E7EB;
  }
  
  .prose strong {
    color: #D1D5DB;
  }
}
