/* Pokemon css originally from https://github.com/fccview/fccview-degoog-extensions/tree/main/themes/pokemon */
body::after {
    content: "";
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 100px;
    height: 100px;
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
    animation: pokemon-float 4s ease-in-out infinite;
}

@keyframes pokemon-float {

    0%,
    100% {
        transform: translateY(0);
    }

    25% {
        transform: translateY(-8px);
    }

    75% {
        transform: translateY(8px);
    }
}

.sparkle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, #fff 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    opacity: 0.25;
    pointer-events: none;
    z-index: 1;
    animation: sparkle-animation 1.5s infinite;
}

@keyframes sparkle-animation {
    0% {
        transform: scale(0);
        opacity: 0.8;
    }

    50% {
        transform: scale(1);
        opacity: 0.4;
    }

    100% {
        transform: scale(0);
        opacity: 0;
    }
}

.pokemon-content {
    display: flex;
}

.pokemon-sprite-box {
    display: flex;
    align-items: center;
}

.pokemon-sprite {
    flex: 0 0 100px;
    margin-right: 15px;
}

.pokemon-sprite img {
    width: 100%;
    height: auto;
    animation: none;
}

.pokemon-sprite img:hover {
    animation: pokemon-float 4s ease-in-out infinite;
}

.about-pokemon {
    flex: 1;
    padding-left: 32px;
}

.pokemon-header {
    font-size: 2em;
    font-weight: bold;
}

.pokemon-pokedex,
.pokemon-name {
    display: inline-block;
}

.pokemon-species-data {
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
    font-size: 1em;
}

.pokemon-species-data-information {
    flex: 2;
    margin: 10px 10px 10px 0px;
}

.pokemon-types {
    display: flex;
    flex-wrap: wrap;
}

.pokemon-type {
    padding: 5px 12px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    margin-right: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.type-normal {
    background: #9B9B9B;
    color: white;
}

.type-fire {
    background: #FF7F50;
    color: white;
}

.type-water {
    background: #5A9BD5;
    color: white;
}

.type-electric {
    background: #FFD700;
    color: #222;
}

.type-grass {
    background: #5BAF43;
    color: white;
}

.type-ice {
    background: #95D8FF;
    color: white;
}

.type-fighting {
    background: #D55D5D;
    color: white;
}

.type-poison {
    background: #D56EBE;
    color: white;
}

.type-ground {
    background: #B07744;
    color: white;
}

.type-flying {
    background: #99D2FF;
    color: white;
}

.type-psychic {
    background: #E55D87;
    color: white;
}

.type-bug {
    background: #A4E822;
    color: #222;
}

.type-rock {
    background: #D08A65;
    color: white;
}

.type-ghost {
    background: #7F87D5;
    color: white;
}

.type-dragon {
    background: #5F94D9;
    color: white;
}

.type-dark {
    background: #5A5A5A;
    color: white;
}

.type-steel {
    background: #B7B9D2;
    color: #222;
}

.type-fairy {
    background: #EE99AC;
    color: #222;
}

.pokemon-legendary {
    background: #F4D06F;
    color: #222;
}

.pokemon-mythical {
    background: #2D728F;
    color: white;
}

.pokemon-biometrics {
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
}

#pokemon-height,
#pokemon-weight {
    flex: 1;
}

.pokemon-bulbapedia-link {
    font-size: 0.8em;
}

.pokemon-flavour-entry {
    flex: 1;
    margin: 10px;
}

.define-result .define-word {
  font-size: 1.5rem;
  margin: 0 0 0.25rem 0;
}

.define-phonetic {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0 0 0.75rem 0;
}

.define-meaning {
  margin-bottom: 1rem;
}

.define-pos {
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.define-list {
  margin: 0.25rem 0 0 1rem;
  padding-left: 0.5rem;
}

.define-example {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ── OSM Slot ─────────────────────────────────────────────── */

.osm-slot-wrap {
  margin-bottom: 12px;
  max-width: 680px;
}

.osm-slot-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.osm-slot-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.osm-slot-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-primary);
  flex-shrink: 0;
}

.osm-slot-city {
  font-size: 0.72rem;
  color: var(--text-secondary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.osm-slot-open {
  font-size: 0.7rem;
  color: var(--primary);
  text-decoration: none;
  flex-shrink: 0;
  white-space: nowrap;
}

.osm-slot-open:hover {
  text-decoration: underline;
}

.osm-map-container {
  width: 100%;
  height: 280px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

/* Fix Leaflet popup inside dark themes */
.leaflet-popup-content-wrapper {
  background: var(--bg-light) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
}

.leaflet-popup-tip {
  background: var(--bg-light) !important;
}

.leaflet-popup-content {
  margin: 8px 12px !important;
  font-size: 0.8rem !important;
}

/* Fix Leaflet controls inside dark themes */
.leaflet-control-zoom a {
  background: var(--bg-light) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

.leaflet-control-zoom a:hover {
  background: var(--bg-hover) !important;
}

.leaflet-control-attribution {
  background: rgba(0,0,0,0.4) !important;
  color: var(--text-secondary) !important;
  font-size: 0.6rem !important;
}

.leaflet-control-attribution a {
  color: var(--primary) !important;
}

.weather-result {
  padding: 1.5em 0;
  max-width: 652px;
  color: var(--text-primary);
}

.weather-result .ti {
  font-size: 1.25em;
  opacity: 0.9;
  color: var(--text-primary);
}

.weather-location {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.weather-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.weather-hero-icon {
  flex-shrink: 0;
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.weather-hero-icon .ti {
  font-size: 2.5rem;
  color: var(--primary, #1a73e8);
}

.weather-hero-text {
  min-width: 0;
}

.weather-temp {
  font-size: 2rem;
  margin: 0 0 0.2rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.weather-desc {
  font-size: 0.9375rem;
  font-weight: 400;
  opacity: 0.85;
  color: var(--text-secondary);
}

.weather-feels {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.weather-now-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.weather-now-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
}

.weather-now-icon {
  flex-shrink: 0;
  font-size: 1.1rem !important;
  opacity: 0.7;
  color: var(--text-secondary) !important;
}

.weather-value {
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weather-week-heading {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.weather-week-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.8;
}

.weather-week-wrap {
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-light);
  overflow: hidden;
}

.weather-week {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.weather-week th,
.weather-week td {
  text-align: left;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border-light);
}

.weather-week th {
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.7rem;
}

.weather-week tbody tr:last-child td {
  border-bottom: none;
}

.weather-week-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.weather-week-row:hover {
  background: var(--bg-hover, rgba(0, 0, 0, 0.04));
}

.weather-week-row:focus {
  outline: 2px solid var(--primary, #1a73e8);
  outline-offset: -2px;
}

.weather-day {
  font-weight: 600;
  color: var(--text-primary);
  width: 3.5rem;
}

.weather-day-icon .ti {
  font-size: 1.35rem !important;
  color: var(--primary, #1a73e8) !important;
}

.weather-day-temps {
  font-weight: 500;
  color: var(--text-primary);
}

.weather-day-precip {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.weather-day-precip .ti {
  font-size: 0.9rem !important;
  opacity: 0.8;
  margin-right: 0.2rem;
}

.weather-hourly-row td {
  padding: 0 !important;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
  background: var(--bg-light);
}

.weather-hourly-cell {
  padding: 0.75rem 1rem !important;
  overflow: hidden;
}

.weather-hourly-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0;
  margin: 0 -0.25rem 0 0;
}

.weather-hourly-strip {
  display: flex;
  gap: 0.5rem;
  width: max-content;
  padding: 0 0.25rem 0 0;
}

.weather-hourly-scroll::-webkit-scrollbar {
  height: 6px;
}

.weather-hourly-scroll::-webkit-scrollbar-track {
  background: var(--border-light);
  border-radius: 3px;
}

.weather-hourly-scroll::-webkit-scrollbar-thumb {
  background: var(--text-secondary);
  opacity: 0.3;
  border-radius: 3px;
}

.weather-hour-card {
  flex: 0 0 auto;
  min-width: 4.25rem;
  padding: 0.6rem 0.5rem;
  background: var(--search-bar-bg, #fff);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.weather-hour-time {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.weather-hour-icon {
  font-size: 1.5rem !important;
  color: var(--primary, #1a73e8) !important;
}

.weather-hour-temp {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.weather-hour-precip {
  font-size: 0.65rem;
  color: var(--text-secondary);
}

.math-widget {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg-light);
  max-width: 652px;
  color: var(--text-primary);
}

.math-header {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.5rem;
}

.math-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.math-query {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.math-equals {
  font-size: 0.9rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

.math-result {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.nyaa-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.nyaa-action-link {
  font-size: 12px;
  color: var(--text-link);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  transition: background 0.12s;
}

.nyaa-action-link:hover {
  background: var(--bg-hover);
  text-decoration: none;
}
