/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

 /* Logo Styles */
 .logo-grid {
  display: inline-grid;
  grid-template-columns: repeat(3, 60px);
  gap: 6px;
  margin: 0 auto;
}

.logo-letter {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  color: #7C3AED;
  font-size: 32px;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.logo-letter:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.logo-letter-special {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
  animation: pulse 2s ease-in-out infinite;
}

.logo-letter-placeholder {
  width: 60px;
  height: 60px;
}

/* Mini logo for form */
.mini-logo-grid {
  display: inline-grid;
  grid-template-columns: repeat(2, 30px);
  gap: 3px;
}

.mini-logo-letter {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  color: #7C3AED;
  font-size: 16px;
}

.mini-logo-letter-special {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
}

.mini-logo-letter-placeholder {
  width: 30px;
  height: 30px;
}

/* Animations */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes bounce-in {
  0% { 
    transform: scale(0);
    opacity: 0;
  }
  50% { 
    transform: scale(1.1);
  }
  100% { 
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.animate-bounce-in {
  animation: bounce-in 0.8s ease-out;
}

/* Interactive logo animation on page load */
.logo-letter {
  opacity: 0;
  animation: letterPop 0.4s ease-out forwards;
  user-select: none;
  -webkit-tap-highlight-color: transparent; /* Remove tap highlight on iOS */
  touch-action: manipulation; /* Prevent double-tap zoom */

  &.selected, &.selected-special {
    background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.5);
  }

  &-special.selected {
    background: linear-gradient(135deg, #EC4899 0%, #DB2777 100%);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.5);
  }

  &.winning {
    animation: winningPulse 1s ease-in-out infinite;
  }
}

@keyframes winningPulse {
  0%, 100% { 
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.5);
  }
  50% { 
    transform: scale(1.2);
    box-shadow: 0 12px 40px rgba(124, 58, 237, 0.8);
  }
}

.logo-letter:nth-child(1) { animation-delay: 0.1s; }
.logo-letter:nth-child(2) { animation-delay: 0.2s; }
.logo-letter:nth-child(3) { animation-delay: 0.3s; }
.logo-letter:nth-child(4) { animation-delay: 0.4s; }
.logo-letter:nth-child(5) { animation-delay: 0.5s; }
.logo-letter:nth-child(6) { animation-delay: 0.6s; }
.logo-letter:nth-child(8) { animation-delay: 0.8s; }

@keyframes letterPop {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-180deg);
  }
  50% {
    transform: scale(1.2) rotate(10deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* Stat cards */
.stat-card {
  min-width: 140px;
}

/* Remove hover effects on touch devices */
@media (hover: hover) and (pointer: fine) {
  /* Apply hover effects only on devices with precise pointers (mouse) */
  .logo-letter:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  }
}

/* Touch devices - add active state instead of hover */
@media (hover: none) and (pointer: coarse) {
  .logo-letter:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }
}

/* Small logo for header/footer */
.logo-grid-small {
  display: inline-grid;
  grid-template-columns: repeat(7, 24px);
  gap: 2px;
}

.logo-letter-small {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  color: #7C3AED;
  font-size: 12px;
}

.logo-letter-small.logo-letter-special {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .logo-grid {
    grid-template-columns: repeat(3, 50px);
    gap: 4px;
  }
  
  .logo-letter {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
  
  .logo-letter-placeholder {
    width: 50px;
    height: 50px;
  }
}
