/* Weather Theme System Styles */

/* Weather Badge Styles */
.weather-badge {
  position: fixed;
  top: 80px;
  right: 20px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 1000;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  animation: slideInRight 0.6s ease-out 0.2s both;
}

.weather-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.weather-badge-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.weather-icon {
  font-size: 24px;
  animation: pulse 2s infinite;
}

.weather-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.weather-condition {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  text-transform: capitalize;
}

.weather-location {
  font-size: 10px;
  color: #6b7280;
  opacity: 0.8;
}

.weather-temp {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  text-align: right;
}

.weather-badge-arrow {
  font-size: 10px;
  color: #6b7280;
  margin-left: 8px;
  transition: transform 0.2s ease;
}

.weather-badge[aria-expanded="true"] .weather-badge-arrow {
  transform: rotate(180deg);
}

.weather-badge:hover .weather-badge-arrow {
  color: #374151;
}

/* Sound Controls */
.weather-sound-controls {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  animation: slideInUp 0.6s ease-out;
}

.sound-toggle {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #374151;
  font-size: 18px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.sound-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 1);
}

.sound-toggle:active {
  transform: scale(0.95);
}

/* Theme-specific body classes */
body.theme-clear {
  background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
  color: #78350f;
}

body.theme-rain {
  background: linear-gradient(135deg, #e0f2fe 0%, #b3e5fc 100%);
  color: #0c4a6e;
}

body.theme-snow {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  color: #1e293b;
}

body.theme-cloudy {
  background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
  color: #374151;
}

body.theme-storm {
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  color: #3730a3;
}

body.theme-fog {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  color: #374151;
}

/* Weather Canvas */
#weather-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Theme-specific styling for top-right elements */
.theme-clear .weather-badge,
.theme-clear .top-nav-controls .lang-link {
  background: rgba(254, 243, 199, 0.95);
  border: 1px solid rgba(251, 191, 36, 0.2);
  color: #78350f;
}

.theme-rain .weather-badge,
.theme-rain .top-nav-controls .lang-link {
  background: rgba(224, 242, 254, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: #0c4a6e;
}

.theme-snow .weather-badge,
.theme-snow .top-nav-controls .lang-link {
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(203, 213, 225, 0.2);
  color: #1e293b;
}

.theme-cloudy .weather-badge,
.theme-cloudy .top-nav-controls .lang-link {
  background: rgba(249, 250, 251, 0.95);
  border: 1px solid rgba(156, 163, 175, 0.2);
  color: #374151;
}

.theme-storm .weather-badge,
.theme-storm .top-nav-controls .lang-link {
  background: rgba(237, 233, 254, 0.95);
  border: 1px solid rgba(168, 85, 247, 0.2);
  color: #3730a3;
}

.theme-fog .weather-badge,
.theme-fog .top-nav-controls .lang-link {
  background: rgba(249, 250, 251, 0.95);
  border: 1px solid rgba(209, 213, 219, 0.2);
  color: #374151;
}

/* Terminal button weather theme integration */
.theme-clear .top-nav-controls .terminal-button {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.5);
  color: #d97706;
}

.theme-clear .top-nav-controls .terminal-button:hover {
  background: rgba(245, 158, 11, 0.25);
  border-color: #d97706;
}

.theme-clear .top-nav-controls .terminal-text {
  color: #d97706;
}

.theme-rain .top-nav-controls .terminal-button {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(14, 165, 233, 0.5);
  color: #0ea5e9;
}

.theme-rain .top-nav-controls .terminal-button:hover {
  background: rgba(14, 165, 233, 0.25);
  border-color: #0ea5e9;
}

.theme-rain .top-nav-controls .terminal-text {
  color: #0ea5e9;
}

.theme-snow .top-nav-controls .terminal-button {
  background: rgba(148, 163, 184, 0.15);
  border-color: rgba(148, 163, 184, 0.5);
  color: #94a3b8;
}

.theme-snow .top-nav-controls .terminal-button:hover {
  background: rgba(148, 163, 184, 0.25);
  border-color: #94a3b8;
}

.theme-snow .top-nav-controls .terminal-text {
  color: #94a3b8;
}

.theme-cloudy .top-nav-controls .terminal-button {
  background: rgba(107, 114, 128, 0.15);
  border-color: rgba(107, 114, 128, 0.5);
  color: #6b7280;
}

.theme-cloudy .top-nav-controls .terminal-button:hover {
  background: rgba(107, 114, 128, 0.25);
  border-color: #6b7280;
}

.theme-cloudy .top-nav-controls .terminal-text {
  color: #6b7280;
}

.theme-storm .top-nav-controls .terminal-button {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.5);
  color: #a855f7;
}

.theme-storm .top-nav-controls .terminal-button:hover {
  background: rgba(168, 85, 247, 0.25);
  border-color: #a855f7;
}

.theme-storm .top-nav-controls .terminal-text {
  color: #a855f7;
}

.theme-fog .top-nav-controls .terminal-button {
  background: rgba(156, 163, 175, 0.15);
  border-color: rgba(156, 163, 175, 0.5);
  color: #9ca3af;
}

.theme-fog .top-nav-controls .terminal-button:hover {
  background: rgba(156, 163, 175, 0.25);
  border-color: #9ca3af;
}

.theme-fog .top-nav-controls .terminal-text {
  color: #9ca3af;
}

/* Theme-specific sound controls */
.theme-clear .sound-toggle {
  background: rgba(254, 243, 199, 0.95);
  border: 1px solid rgba(251, 191, 36, 0.2);
  color: #78350f;
}

.theme-rain .sound-toggle {
  background: rgba(224, 242, 254, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: #0c4a6e;
}

.theme-snow .sound-toggle {
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(203, 213, 225, 0.2);
  color: #1e293b;
}

.theme-cloudy .sound-toggle {
  background: rgba(249, 250, 251, 0.95);
  border: 1px solid rgba(156, 163, 175, 0.2);
  color: #374151;
}

.theme-storm .sound-toggle {
  background: rgba(237, 233, 254, 0.95);
  border: 1px solid rgba(168, 85, 247, 0.2);
  color: #3730a3;
}

.theme-fog .sound-toggle {
  background: rgba(249, 250, 251, 0.95);
  border: 1px solid rgba(209, 213, 219, 0.2);
  color: #374151;
}

/* Enhanced animations for weather themes */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Weather-specific particle effects enhancements */
.theme-rain .animated-shapes .shape {
  animation: rainFloat 8s ease-in-out infinite;
}

.theme-snow .animated-shapes .shape {
  animation: snowFloat 12s ease-in-out infinite;
}

.theme-storm .animated-shapes .shape {
  animation: stormFloat 6s ease-in-out infinite;
}

.theme-clear .animated-shapes .shape {
  animation: sunFloat 10s ease-in-out infinite;
}

@keyframes rainFloat {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(-20px, -10px) rotate(5deg);
  }
  50% {
    transform: translate(10px, -20px) rotate(-3deg);
  }
  75% {
    transform: translate(20px, 10px) rotate(2deg);
  }
}

@keyframes snowFloat {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(-15px, -5px) rotate(3deg);
  }
  50% {
    transform: translate(5px, -15px) rotate(-2deg);
  }
  75% {
    transform: translate(15px, 5px) rotate(1deg);
  }
}

@keyframes stormFloat {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(-30px, -15px) rotate(8deg);
  }
  50% {
    transform: translate(15px, -30px) rotate(-5deg);
  }
  75% {
    transform: translate(30px, 15px) rotate(3deg);
  }
}

@keyframes sunFloat {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(-10px, -5px) rotate(2deg);
  }
  50% {
    transform: translate(5px, -10px) rotate(-1deg);
  }
  75% {
    transform: translate(10px, 5px) rotate(1deg);
  }
}

/* Enhanced gradient text for weather themes */
.theme-clear .gradient-text {
  background: linear-gradient(45deg, #f59e0b, #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: sunShimmer 3s ease-in-out infinite;
}

.theme-rain .gradient-text {
  background: linear-gradient(45deg, #0ea5e9, #0284c7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rainShimmer 4s ease-in-out infinite;
}

.theme-snow .gradient-text {
  background: linear-gradient(45deg, #64748b, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: snowShimmer 5s ease-in-out infinite;
}

.theme-storm .gradient-text {
  background: linear-gradient(45deg, #7c3aed, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: stormShimmer 2s ease-in-out infinite;
}

@keyframes sunShimmer {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.2);
  }
}

@keyframes rainShimmer {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.1);
  }
}

@keyframes snowShimmer {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.3);
  }
}

@keyframes stormShimmer {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.4);
  }
}

/* Weather Selector Modal */
.weather-selector {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
}

.weather-selector.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.weather-selector-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.weather-selector-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 480px;
  width: 90%;
  max-height: 80vh;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.weather-selector.visible .weather-selector-content {
  transform: translate(-50%, -50%) scale(1);
}

.weather-selector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.weather-selector-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  font-family: 'Poppins', sans-serif;
}

.weather-selector-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.weather-selector-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  transform: scale(1.1);
}

.weather-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  padding: 24px;
  max-height: 400px;
  overflow-y: auto;
}

.weather-option {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
}

.weather-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--option-color);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.weather-option:hover::before,
.weather-option.selected::before {
  transform: scaleX(1);
}

.weather-option:hover {
  border-color: var(--option-color);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.weather-option.selected {
  border-color: var(--option-color);
  background: color-mix(in srgb, var(--option-color) 5%, white);
  box-shadow: 0 4px 20px color-mix(in srgb, var(--option-color) 20%, transparent);
}

.weather-option:focus {
  outline: 2px solid var(--option-color);
  outline-offset: 2px;
}

.weather-option-icon {
  font-size: 32px;
  margin-bottom: 8px;
  line-height: 1;
}

.weather-option-name {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.weather-option-desc {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.3;
}

.weather-selector-footer {
  padding: 16px 24px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.weather-auto-button {
  width: 100%;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.weather-auto-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.weather-auto-button:hover::before {
  left: 100%;
}

.weather-auto-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.weather-auto-button.selected {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.weather-auto-button:active {
  transform: translateY(0);
}

/* Mobile responsive styles */
@media (max-width: 768px) {
  .weather-badge {
    top: 70px;
    right: 10px;
    padding: 8px 12px;
  }
  
  .weather-badge-content {
    gap: 8px;
  }
  
  .weather-icon {
    font-size: 20px;
  }
  
  .weather-temp {
    font-size: 16px;
  }
  
  .weather-condition {
    font-size: 11px;
  }
  
  .weather-location {
    font-size: 9px;
  }
  
  .weather-sound-controls {
    bottom: 10px;
    right: 10px;
  }
  
  .sound-toggle {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  /* Weather selector mobile styles */
  .weather-selector-content {
    max-width: 95%;
    max-height: 85vh;
  }
  
  .weather-selector-header {
    padding: 16px 20px;
  }
  
  .weather-selector-header h3 {
    font-size: 18px;
  }
  
  .weather-selector-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    padding: 20px;
  }
  
  .weather-option {
    padding: 16px 12px;
  }
  
  .weather-option-icon {
    font-size: 28px;
    margin-bottom: 6px;
  }
  
  .weather-option-name {
    font-size: 13px;
  }
  
  .weather-option-desc {
    font-size: 11px;
  }
  
  .weather-selector-footer {
    padding: 12px 20px;
  }
  
  .weather-auto-button {
    padding: 10px 14px;
    font-size: 13px;
  }
}

/* Accessibility enhancements */
.weather-badge:focus,
.sound-toggle:focus,
.weather-option:focus,
.weather-auto-button:focus,
.weather-selector-close:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.weather-badge[aria-expanded="true"] {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .weather-badge,
  .sound-toggle,
  .weather-icon,
  .gradient-text,
  .animated-shapes .shape,
  .weather-selector,
  .weather-selector-content,
  .weather-option {
    animation: none !important;
  }
  
  .weather-badge,
  .sound-toggle,
  .weather-selector,
  .weather-selector-content,
  .weather-option,
  .weather-auto-button {
    transition: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .weather-badge,
  .sound-toggle,
  .weather-option,
  .weather-auto-button {
    border: 2px solid #000;
    background: #fff;
    color: #000;
  }
  
  .weather-badge:hover,
  .sound-toggle:hover,
  .weather-option:hover,
  .weather-auto-button:hover {
    background: #f0f0f0;
  }
  
  .weather-selector-content {
    border: 3px solid #000;
  }
  
  .weather-option.selected {
    background: #000;
    color: #fff;
  }
  
  .weather-auto-button.selected {
    background: #000;
    color: #fff;
  }
}

/* Print styles */
@media print {
  .weather-badge,
  .weather-sound-controls,
  .weather-selector,
  #weather-canvas {
    display: none !important;
  }
} 