/* ========================================
   Steam Calendar App - Main Styles
   Enhanced with Progressive Poll Status Colors
   ======================================== */

/* Poll Status Colors - Progressive System */
:root {
  /* Status Colors */
  --poll-complete: #4caf50;
  --poll-complete-bg: rgba(76, 175, 80, 0.1);
  --poll-complete-glow: rgba(76, 175, 80, 0.3);
  
  --poll-active: #ffc107;
  --poll-active-bg: rgba(255, 193, 7, 0.1);
  --poll-active-glow: rgba(255, 193, 7, 0.3);
  
  --poll-inactive: #f44336;
  --poll-inactive-bg: rgba(244, 67, 54, 0.1);
  --poll-inactive-glow: rgba(244, 67, 54, 0.3);
  
  /* Gradient Styles */
  --gradient-complete: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
  --gradient-active: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
  --gradient-inactive: linear-gradient(135deg, #f44336 0%, #e53935 100%);
}

/* Poll Card Status Badges */
.poll-status-badge {
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 2px solid;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.poll-status-badge::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.poll-status-badge:hover::before {
  opacity: 1;
}

/* Complete Status (Green) */
.poll-status-complete {
  background: var(--poll-complete-bg);
  border-color: var(--poll-complete);
  box-shadow: 0 2px 8px var(--poll-complete-glow);
}

.poll-status-complete .status-text {
  color: var(--poll-complete);
  font-weight: 600;
  font-size: 1rem;
}

/* Active Status (Yellow) */
.poll-status-active {
  background: var(--poll-active-bg);
  border-color: var(--poll-active);
  box-shadow: 0 2px 8px var(--poll-active-glow);
}

.poll-status-active .status-text {
  color: var(--poll-active);
  font-weight: 600;
  font-size: 1rem;
}

/* Inactive Status (Red) */
.poll-status-inactive {
  background: var(--poll-inactive-bg);
  border-color: var(--poll-inactive);
  box-shadow: 0 2px 8px var(--poll-inactive-glow);
}

.poll-status-inactive .status-text {
  color: var(--poll-inactive);
  font-weight: 600;
  font-size: 1rem;
}

/* Progress Bars */
.poll-progress-bar {
  width: 100%;
  height: 10px;
  background: rgba(0,0,0,0.3);
  border-radius: 5px;
  overflow: hidden;
  margin-top: 0.75rem;
  border: 1px solid rgba(255,255,255,0.1);
  position: relative;
}

.poll-progress-fill {
  height: 100%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.poll-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.3),
    transparent
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.poll-progress-complete {
  background: var(--gradient-complete);
}

.poll-progress-active {
  background: var(--gradient-active);
}

.poll-progress-inactive {
  background: var(--gradient-inactive);
}

.poll-progress-percentage {
  text-align: right;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  transition: color 0.3s ease;
}

/* Poll Card Animations */
.poll-card-status-complete {
  animation: glow-complete 2s ease-in-out infinite;
}

.poll-card-status-active {
  animation: glow-active 3s ease-in-out infinite;
}

.poll-card-status-inactive {
  animation: glow-inactive 4s ease-in-out infinite;
}

@keyframes glow-complete {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
  }
  50% {
    box-shadow: 0 4px 25px rgba(76, 175, 80, 0.4);
  }
}

@keyframes glow-active {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.2);
  }
  50% {
    box-shadow: 0 4px 25px rgba(255, 193, 7, 0.4);
  }
}

@keyframes glow-inactive {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.2);
  }
  50% {
    box-shadow: 0 4px 25px rgba(244, 67, 54, 0.4);
  }
}

/* Status Icons */
.status-icon {
  font-size: 1.2rem;
  margin-right: 0.5rem;
  display: inline-block;
  animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* Countdown Timers */
.poll-event-countdown {
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-block;
  transition: all 0.3s ease;
}

.event-countdown {
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

/* Live Pulse Animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .poll-status-badge {
    padding: 0.6rem;
  }
  
  .status-text {
    font-size: 0.9rem !important;
  }
  
  .poll-progress-bar {
    height: 8px;
  }
  
  .status-icon {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .poll-status-badge {
    padding: 0.5rem;
  }
  
  .poll-progress-percentage {
    font-size: 0.7rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .poll-card-status-complete,
  .poll-card-status-active,
  .poll-card-status-inactive,
  .status-icon,
  .poll-progress-fill::after {
    animation: none;
  }
  
  .poll-progress-fill {
    transition: none;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .poll-status-badge {
    border-width: 3px;
  }
  
  .poll-progress-bar {
    border-width: 2px;
  }
}

/* Dark Mode Enhancements */
@media (prefers-color-scheme: dark) {
  .poll-status-complete {
    box-shadow: 0 2px 12px var(--poll-complete-glow);
  }
  
  .poll-status-active {
    box-shadow: 0 2px 12px var(--poll-active-glow);
  }
  
  .poll-status-inactive {
    box-shadow: 0 2px 12px var(--poll-inactive-glow);
  }
}

/* Gaming Aesthetic Enhancements */
.steam-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.steam-card:hover {
  transform: translateY(-2px);
}

/* Button Hover States */
.btn-primary:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(102, 192, 244, 0.3);
}

.btn-danger:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(244, 67, 54, 0.3);
}

/* Tooltip Styles for Status Info */
.poll-status-tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.poll-status-badge:hover .poll-status-tooltip {
  opacity: 1;
}

/* Event Grid Enhancements */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .event-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Loading States */
.poll-loading {
  opacity: 0.6;
  pointer-events: none;
}

.poll-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #66c0f4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Success/Error Flash Messages */
.poll-flash-success {
  animation: flash-success 0.5s ease;
}

.poll-flash-error {
  animation: flash-error 0.5s ease;
}

@keyframes flash-success {
  0%, 100% {
    background: var(--poll-complete-bg);
  }
  50% {
    background: rgba(76, 175, 80, 0.3);
  }
}

@keyframes flash-error {
  0%, 100% {
    background: var(--poll-inactive-bg);
  }
  50% {
    background: rgba(244, 67, 54, 0.3);
  }
}

/* Print Styles */
@media print {
  .poll-card-status-complete,
  .poll-card-status-active,
  .poll-card-status-inactive {
    animation: none;
    box-shadow: none;
  }
  
  .poll-progress-fill::after {
    display: none;
  }
}
