:root {
  --navy: #102a43;
  --deep-yellow: #f2b632;
  --cyan: #1093ae;
}

body {
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  background: #eef4fb;
  color: #1f2933;
  margin: 0;
  overflow: hidden;
}

.text-navy {
  color: var(--navy);
}

.top-nav {
  background: #f6f8fb;
  border-bottom: 2px solid #122;
  min-height: 84px;
}

.nav-link.utility-btn {
  color: var(--cyan);
  text-decoration: none;
  font-size: 1.05rem;
}

.nav-link.utility-btn:hover {
  color: #0a3a6b;
  text-decoration: underline;
}

.search-pill {
  border: 4px solid #ffd23f;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%);
  padding: 0.25rem 0.55rem;
  box-shadow: 0 10px 20px rgba(16, 42, 67, 0.22);
  position: relative;
  overflow: hidden;
  min-height: 74px;
  flex: 0 1 640px;
  max-width: 640px;
  z-index: 4;
}

.search-pill::before {
  content: "";
  position: absolute;
  top: -5%;
  left: -40%;
  width: 28%;
  height: 110%;
  background: linear-gradient(100deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.95) 50%, rgba(255,255,255,0) 100%);
  animation: shine-strong 2.2s infinite;
}

.search-pill::after {
  content: "";
  position: absolute;
  inset: -22%;
  background: radial-gradient(circle, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.12) 45%, rgba(255,255,255,0) 70%);
  opacity: 0;
  transform: scale(0.86);
  animation: search-pulse 1.8s ease-in-out infinite;
  pointer-events: none;
}

.logo-overlay {
  border: 0;
  background: transparent;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 58px;
  padding: 0.2rem 0.35rem;
  position: relative;
  z-index: 2;
  cursor: text;
}

.search-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  opacity: 0.72;
}

.logo-wordmark {
  white-space: nowrap;
  font-weight: 900;
  font-size: 1.03rem;
  font-size: clamp(2.05rem, 3.1vw, 3.15rem);
  letter-spacing: -0.6px;
  line-height: 1;
}

.logo-uni,
.logo-com {
  color: #03295f;
}

.logo-finder {
  color: #f4c300;
}

.search-input-wrap {
  position: absolute;
  inset: 0.22rem 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 3;
}

.search-input-wrap .btn {
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  margin-left: -0.1rem;
}

#top-search-input {
  background: transparent;
  font-size: 1.07rem;
}

#top-search-input:focus {
  box-shadow: none;
}


.search-pill.logo-mode {
  box-shadow: 0 0 0 4px rgba(255, 218, 90, 0.72), 0 0 28px rgba(255, 208, 0, 0.92), 0 16px 28px rgba(16,42,67,0.34);
}

.search-pill.input-mode {
  box-shadow: 0 10px 22px rgba(16, 42, 67, 0.35);
  border-color: #f2b632;
}

.search-pill.input-mode::before,
.search-pill.input-mode::after {
  opacity: 0;
  animation: none;
}

.search-pill.input-mode .logo-overlay {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.search-pill.input-mode .search-input-wrap {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.premium-btn {
  border: 3px solid #f2b632;
  border-radius: 999px;
  background: linear-gradient(180deg, #1b3f6b 0%, #102a43 100%);
  color: #fff5cc;
  font-weight: 800;
  letter-spacing: 0.35px;
  box-shadow: 0 8px 18px rgba(16, 42, 67, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  position: relative;
  overflow: hidden;
  padding: 0.62rem 1.22rem;
}

.premium-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -45%;
  width: 35%;
  height: 100%;
  background: linear-gradient(102deg, transparent 0%, rgba(255, 255, 255, 0.46) 50%, transparent 100%);
  animation: premium-shimmer 6.5s ease-in-out infinite;
}

.premium-btn:hover::before {
  background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,0.8) 50%, transparent 100%);
  animation: premium-shimmer-fast 2.4s linear infinite;
}

.premium-btn::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.premium-btn:hover {
  transform: translateY(-1px);
  color: #fff5cc;
  border-color: transparent;
}

.premium-btn:hover::after {
  opacity: 1;
  inset: -4px;
  border: 4px solid transparent;
  background: conic-gradient(#ff0040, #ff8a00, #ffe600, #00c853, #00b0ff, #7c4dff, #ff0040) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spin-border 2s linear infinite;
}

.app-shell {
  height: calc(100vh - 84px);
  position: relative;
}

#map-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.side-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  width: min(620px, 47vw);
  height: calc(100% - 20px);
  overflow-y: auto;
  padding: 0.9rem;
  border-radius: 16px;
  background: rgba(246, 250, 255, 0.92);
  box-shadow: -12px 8px 28px rgba(16, 42, 67, 0.24);
  backdrop-filter: blur(2px);
}

.result-item {
  border: 2px solid #5f6974;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.8rem;
  box-shadow: 0 8px 22px rgba(16, 42, 67, 0.12);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.result-item:hover {
  transform: translateY(-2px);
  background: linear-gradient(145deg, rgba(214, 238, 255, 0.98), rgba(188, 223, 248, 0.98));
  box-shadow: 0 13px 24px rgba(16, 42, 67, 0.22);
}

.result-header {
  display: flex;
  gap: 0.8rem;
}

.uni-photo {
  width: 148px;
  height: 102px;
  object-fit: cover;
  border: 3px solid #123968;
  border-radius: 12px;
}

.result-title {
  margin: 0;
  color: var(--cyan);
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  font-size: 1.9rem;
}

.result-item:hover .result-title,
.result-title:hover {
  color: #05294c;
  text-decoration: underline;
}

.result-subtitle {
  margin: 0.3rem 0 0;
  color: #305786;
  font-weight: 600;
}

.emoji-strip {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.emoji-chip {
  width: 74px;
  height: 74px;
  border-radius: 10px;
  border: 5px solid #70d24f;
  background: #f2ffe9;
  display: grid;
  place-items: center;
  font-size: 2.25rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
}

.emoji-chip::before,
.emoji-chip::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 4px;
  background: #70d24f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  z-index: 0;
}

.emoji-chip::before {
  top: 6px;
  left: 6px;
}

.emoji-chip::after {
  right: 6px;
  bottom: 6px;
}

.emoji-chip.con {
  border-color: #d61c1c;
  background: #fff0f0;
}

.emoji-chip.con::before,
.emoji-chip.con::after {
  background: #d61c1c;
}

.emoji-chip.con::before {
  top: 6px;
  right: 6px;
  left: auto;
}

.emoji-chip.con::after {
  left: 6px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}

.emoji-chip > *,
.emoji-chip {
  z-index: 1;
}

.tab-strip {
  display: flex;
  gap: 0;
  border: 1px solid #c7d3e0;
  border-radius: 12px;
  overflow: hidden;
}

.tab-strip .nav-item {
  display: flex;
}

.tab-btn {
  width: 100%;
  border: 0;
  border-radius: 0 !important;
  font-weight: 800;
  color: #32557c;
  background: #e8eff6;
  padding: 0.8rem 0.6rem;
}

.tab-btn.active {
  background: var(--navy) !important;
  color: white !important;
}

.tab-content {
  border-radius: 12px;
  border: 1px solid #d4dde8;
  background: rgba(255, 255, 255, 0.9);
}

.uni-detail-hero {
  margin-bottom: 0.9rem;
  border-radius: 14px;
  overflow: hidden;
  border: 3px solid #113967;
  box-shadow: 0 10px 22px rgba(16, 42, 67, 0.24);
}

.uni-detail-hero img {
  width: 100%;
  max-height: 230px;
  object-fit: cover;
  display: block;
}

.weather-button {
  display: inline-block;
  margin: 0.55rem 0 0.95rem;
  padding: 1rem 1.35rem;
  border-radius: 12px;
  font-weight: 900;
  font-size: 1.03rem;
  color: #02070d;
  text-decoration: none;
  border: 3px solid #00142b;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.95);
  background-image: linear-gradient(115deg, rgba(255, 225, 72, 0.99), rgba(112, 200, 255, 0.98));
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 22px rgba(8, 41, 80, 0.28);
}

.weather-button:hover {
  color: #000;
  text-decoration: none;
}


.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.6rem;
  margin: 0.35rem 0 0.8rem;
}

.stat-card {
  position: relative;
  border-radius: 12px;
  border: 4px solid #7fc8ff;
  padding: 0.7rem;
  font-weight: 700;
  text-decoration: none;
  color: #0f2339;
  overflow: hidden;
}

.stat-card::before,
.stat-card::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  opacity: 0.85;
}

.stat-card::before {
  top: 7px;
  left: 7px;
}

.stat-card::after {
  right: 7px;
  bottom: 7px;
}

.stat-label {
  font-size: 0.87rem;
  opacity: 0.9;
  margin-bottom: 0.2rem;
}

.stat-value {
  font-size: 1rem;
  line-height: 1.2;
  margin-bottom: 0.15rem;
}

.stat-tag {
  font-size: 0.9rem;
  text-transform: capitalize;
}

.weather-low {
  background: #dff1ff;
  border-color: #85c5f8;
}

.weather-low::before,
.weather-low::after {
  background: #85c5f8;
}

.weather-high {
  background: #ffe9d2;
  border-color: #f3a14a;
}

.weather-high::before,
.weather-high::after {
  background: #f3a14a;
}

.weather-rain {
  background: #deebff;
  border-color: #4d80d8;
}

.weather-rain::before,
.weather-rain::after {
  background: #4d80d8;
}


.weather-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.weather-grid .stat-card {
  min-height: 142px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0.95rem 0.8rem;
}

.weather-grid .stat-label {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.weather-grid .stat-value {
  font-size: 1.25rem;
  font-weight: 900;
  margin-bottom: 0.28rem;
}

.weather-grid .stat-tag {
  font-size: 1rem;
  font-weight: 800;
}

.cost-card {
  background: linear-gradient(145deg, #3d4248, #121417);
  border-color: #a9b0bb;
  color: #f7f9fb;
  display: block;
}

.cost-card::before,
.cost-card::after {
  background: #a9b0bb;
}

.cost-card:hover {
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
}

.contact-card {
  border: 2px solid #cdd8e5;
  border-radius: 12px;
  background: #f9fbff;
  padding: 0.7rem;
  margin-bottom: 0.9rem;
}

.contact-card p {
  margin: 0 0 0.32rem;
}

.coop-card {
  width: 100%;
  background: linear-gradient(145deg, #7b39c8, #542b8d);
  color: #fff;
  border-color: #b488ff;
  margin-bottom: 0.4rem;
  text-align: left;
}

.coop-card::before,
.coop-card::after {
  background: #b488ff;
}

.coop-helper {
  display: inline-block;
  margin-left: 0.6rem;
  font-size: 0.9rem;
  opacity: 0.85;
}

.coop-link {
  display: inline-block;
  margin-bottom: 0.8rem;
}


.youtube-block {
  border: 1px solid #d9e1ec;
  background: #ffffff;
}

.video-card {
  display: block;
  border: 1px solid #d7e2ef;
  border-radius: 12px;
  padding: 0.6rem;
  background: #fff;
  text-decoration: none;
}

.video-card:hover {
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(16, 42, 67, 0.14);
}

.video-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  border: 1px solid #cfdced;
  margin-bottom: 0.7rem;
  max-height: 340px;
}

.video-meta {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0.7rem;
  align-items: start;
}

.channel-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #dce6f2;
}

.video-title {
  color: #0f1f33;
  font-size: 1.06rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.18rem;
}

.video-sub {
  color: #5f6f80;
  font-size: 0.88rem;
  line-height: 1.3;
  text-decoration: none;
}


.reddit-block {
  position: relative;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  border: 3px solid #ff5700;
  background: linear-gradient(165deg, #0e1113 0%, #12161c 58%, #14263b 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 87, 0, 0.12), 0 14px 30px rgba(9, 12, 15, 0.5);
  overflow: hidden;
}

.reddit-block::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 14% 28%, rgba(255,122,51,0.32) 0 4px, transparent 5px),
    radial-gradient(circle at 24% 74%, rgba(255,122,51,0.26) 0 4px, transparent 5px),
    radial-gradient(circle at 36% 46%, rgba(255,122,51,0.22) 0 3px, transparent 4px),
    radial-gradient(circle at 48% 82%, rgba(255,122,51,0.24) 0 4px, transparent 5px),
    radial-gradient(circle at 58% 34%, rgba(255,122,51,0.24) 0 3px, transparent 4px),
    radial-gradient(circle at 66% 60%, rgba(255,122,51,0.24) 0 4px, transparent 5px),
    radial-gradient(circle at 74% 22%, rgba(255,122,51,0.20) 0 3px, transparent 4px),
    radial-gradient(circle at 80% 76%, rgba(255,122,51,0.26) 0 4px, transparent 5px),
    radial-gradient(circle at 88% 44%, rgba(255,122,51,0.20) 0 3px, transparent 4px),
    radial-gradient(circle at 20% 54%, rgba(255,122,51,0.20) 0 3px, transparent 4px),
    radial-gradient(circle at 41% 20%, rgba(255,122,51,0.18) 0 3px, transparent 4px),
    radial-gradient(circle at 92% 68%, rgba(255,122,51,0.18) 0 3px, transparent 4px);
}

.reddit-block > * {
  position: relative;
  z-index: 1;
}

.reddit-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.reddit-title-row h3 {
  margin: 0;
  color: #ff8c4a;
  letter-spacing: 0.6px;
}

.reddit-info-wrap {
  position: relative;
}

.reddit-info-btn {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid #ff7a33;
  background: #161b20;
  color: #ffd8c4;
  font-weight: 800;
  line-height: 1;
}

.reddit-info-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 7px);
  width: 320px;
  background: #151b22;
  border: 1px solid #ff7a33;
  border-radius: 10px;
  padding: 0.55rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  font-size: 0.86rem;
  color: #ffdcca;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 12;
}

.reddit-info-wrap:hover .reddit-info-pop,
.reddit-info-wrap:focus-within .reddit-info-pop {
  opacity: 1;
  transform: translateY(0);
}

.reddit-quotes {
  margin: 0.2rem 0 0.8rem 1rem;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  color: #d9e5f2;
  font-size: 0.94rem;
}

.reddit-quotes li::marker {
  color: #ff7a33;
}

.reddit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 2px solid #ff7a33;
  color: #ffe7d6;
  background: linear-gradient(180deg, #2a1a11 0%, #1b1410 100%);
  font-weight: 800;
  padding: 0.62rem 0.92rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 0 0 1px rgba(255, 122, 51, 0.24);
}

.reddit-btn:hover {
  color: #fff1e7;
  text-decoration: none;
}

.reddit-btn img {
  width: 22px;
  height: 22px;
  object-fit: cover;
  border-radius: 50%;
}

.reddit-bottom-wrap {
  margin-top: auto;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 128px;
}



.emoji-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 18, 28, 0.52);
  display: grid;
  place-items: center;
  z-index: 1200;
  padding: 1rem;
}

.emoji-popup-card {
  width: min(560px, 94vw);
  border-radius: 16px;
  padding: 1rem 1rem 1.15rem;
  position: relative;
  border: 3px solid #70d24f;
  background: #f2ffe9;
  color: #11311c;
}

.emoji-popup-card.con {
  border-color: #d61c1c;
  background: #fff1f1;
  color: #4a1212;
}

.emoji-popup-dots {
  height: 34px;
  margin-right: 48px;
  background:
    linear-gradient(90deg, rgba(112,210,79,0.55) 0 0) 0% 70% / 9px 9px no-repeat,
    linear-gradient(90deg, rgba(112,210,79,0.45) 0 0) 13% 25% / 8px 8px no-repeat,
    linear-gradient(90deg, rgba(112,210,79,0.45) 0 0) 27% 80% / 8px 8px no-repeat,
    linear-gradient(90deg, rgba(112,210,79,0.45) 0 0) 41% 30% / 8px 8px no-repeat,
    linear-gradient(90deg, rgba(112,210,79,0.5) 0 0) 55% 72% / 9px 9px no-repeat,
    linear-gradient(90deg, rgba(112,210,79,0.45) 0 0) 68% 24% / 8px 8px no-repeat,
    linear-gradient(90deg, rgba(112,210,79,0.45) 0 0) 79% 72% / 8px 8px no-repeat,
    linear-gradient(90deg, rgba(112,210,79,0.5) 0 0) 92% 30% / 9px 9px no-repeat;
}

.emoji-popup-card.con .emoji-popup-dots {
  background:
    linear-gradient(90deg, rgba(214,28,28,0.55) 0 0) 0% 70% / 9px 9px no-repeat,
    linear-gradient(90deg, rgba(214,28,28,0.45) 0 0) 13% 25% / 8px 8px no-repeat,
    linear-gradient(90deg, rgba(214,28,28,0.45) 0 0) 27% 80% / 8px 8px no-repeat,
    linear-gradient(90deg, rgba(214,28,28,0.45) 0 0) 41% 30% / 8px 8px no-repeat,
    linear-gradient(90deg, rgba(214,28,28,0.5) 0 0) 55% 72% / 9px 9px no-repeat,
    linear-gradient(90deg, rgba(214,28,28,0.45) 0 0) 68% 24% / 8px 8px no-repeat,
    linear-gradient(90deg, rgba(214,28,28,0.45) 0 0) 79% 72% / 8px 8px no-repeat,
    linear-gradient(90deg, rgba(214,28,28,0.5) 0 0) 92% 30% / 9px 9px no-repeat;
}

.emoji-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 2px solid currentColor;
  background: transparent;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  line-height: 1;
  font-weight: 800;
}

.emoji-popup-title {
  text-align: center;
  font-weight: 900;
  margin: 0.25rem 0 0.8rem;
}

.emoji-popup-body {
  margin: 0;
  line-height: 1.5;
}

@keyframes shine-strong {
  0% { left: -42%; }
  55% { left: 124%; }
  100% { left: 124%; }
}

@keyframes search-pulse {
  0%,100% { opacity: 0.38; transform: scale(0.9); }
  50% { opacity: 0.9; transform: scale(1.03); }
}

@keyframes shine {
  0% {
    left: -30%;
  }
  60%,
  100% {
    left: 120%;
  }
}

@keyframes outward-glow {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.88);
  }
  20% {
    opacity: 0.42;
    transform: scale(1.02);
  }
  55% {
    opacity: 0;
    transform: scale(1.12);
  }
}

@keyframes spin-border {
  to { transform: rotate(1turn); }
}

@keyframes premium-shimmer-fast {
  0% { left: -45%; }
  100% { left: 125%; }
}

@keyframes premium-shimmer {
  0%,
  72%,
  100% {
    left: -45%;
  }
  84% {
    left: 120%;
  }
}

@media (max-width: 980px) {
  .weather-grid {
    grid-template-columns: 1fr;
  }

  .side-overlay {
    width: min(98%, 530px);
  }

  .logo-wordmark {
    font-size: clamp(1.4rem, 4.1vw, 2rem);
  }

  .top-nav {
    min-height: 92px;
  }

  .app-shell {
    height: calc(100vh - 92px);
  }

  .video-thumb {
    aspect-ratio: 16 / 9;
    height: auto;
  }
}
