:root {
  --bg-top: #a1c4fd;
  --bg-bottom: #c2e9fb;
  --glass: rgba(255, 255, 255, 0.15);
  --glass-strong: rgba(255, 255, 255, 0.25);
  --border: rgba(255, 255, 255, 0.4);
  --text: #15324a;
  --text-soft: #4b6a80;
  --accent: #4f8cff;
  --accent-2: #8fbcff;
  --shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
}
:root[data-theme="evening"] {
  --bg-top: #2c3e50;
  --bg-bottom: #34495e;
  --text: #ffffff;
  --text-soft: #d2dae2;
  --accent: #5e8cf5;
  --accent-2: #8aaaff;
  --border: rgba(255, 255, 255, 0.3);
  --glass: rgba(255, 255, 255, 0.1);
  --glass-strong: rgba(255, 255, 255, 0.2);
}

/* 1. Dark Mode Evening Overrides */
:root[data-theme="evening"] .app-title,
        :root[data-theme="evening"] .clothing-card > div:last-child > div:first-child,
        :root[data-theme="evening"] .section-title,
        :root[data-theme="evening"] .mood-question,
        :root[data-theme="evening"] .menu-item span,
        :root[data-theme="evening"] #screen-customize .header-left i,
        /* Hourly icons, Active Nav Buttons, Calendars */
        :root[data-theme="evening"] .app-title,
        :root[data-theme="evening"] .hourly-item svg,
        :root[data-theme="evening"] .mood-btn.active span,
        :root[data-theme="evening"] .mood-btn.active svg,
        :root[data-theme="evening"] #nav-to-calendar,
        :root[data-theme="evening"] #nav-to-calendar svg,
        :root[data-theme="evening"] .nav-btn.active,
        :root[data-theme="evening"] .nav-btn.active svg,
        :root[data-theme="evening"] .comm-tab.active,
        :root[data-theme="evening"] .sort-btn.active,
        :root[data-theme="evening"] #tab-customize.active,
        :root[data-theme="evening"] #tab-profile.active {
  color: #ffffff !important;
  stroke: #ffffff !important;
  border-color: #ffffff !important;
}

/* Inactive states fallback to match text-soft */
:root[data-theme="evening"] .mood-btn:not(.active) span,
:root[data-theme="evening"] .nav-btn:not(.active),
:root[data-theme="evening"] .nav-btn:not(.active) svg,
:root[data-theme="evening"] .comm-tab:not(.active),
:root[data-theme="evening"] .sort-btn:not(.active),
:root[data-theme="evening"] #tab-customize:not(.active),
:root[data-theme="evening"] #tab-profile:not(.active) {
  color: #d2dae2 !important;
  stroke: #d2dae2 !important;
  border-color: transparent !important;
}

:root[data-theme="evening"] .friend-del-btn svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

/* Camera & Clothing specific fixes */
:root[data-theme="evening"] #save-mascot-img-btn svg,
:root[data-theme="evening"] .clothing-card [data-lucide="shirt"] {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

:root[data-theme="evening"] .clothing-card > div:first-child {
  background: rgba(255, 255, 255, 0.2) !important;
}

/* Location and pickers modal override for evening mode to stay bright */
:root[data-theme="evening"] #location-modal .modal-content,
:root[data-theme="evening"] #year-picker-modal .modal-content,
:root[data-theme="evening"] #month-picker-modal .modal-content {
  background: #ffffff !important;
  color: #15324a !important;
}
:root[data-theme="evening"] #location-modal .modal-content .icon-btn i,
:root[data-theme="evening"] #location-modal .modal-content .search-box i,
:root[data-theme="evening"] #location-modal .modal-content .location-btn i {
  color: #15324a !important;
}
:root[data-theme="evening"] #location-modal .modal-content input,
:root[data-theme="evening"] #location-modal .modal-content .location-btn,
:root[data-theme="evening"] #year-grid button[style*="var(--text)"],
:root[data-theme="evening"] #month-grid button[style*="var(--text)"] {
  color: #15324a !important;
  background: rgba(0, 0, 0, 0.05) !important;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard",
    "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(
      circle at 15% 50%,
      rgba(255, 255, 255, 0.6) 0 60px,
      transparent 120px
    ),
    radial-gradient(
      circle at 85% 30%,
      rgba(255, 255, 255, 0.5) 0 40px,
      transparent 100px
    ),
    radial-gradient(
      circle at 70% 80%,
      rgba(255, 255, 255, 0.3) 0 80px,
      transparent 150px
    ),
    linear-gradient(135deg, var(--bg-top), var(--bg-bottom));
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 24px 14px;
}

.app {
  width: 100%;
  max-width: 420px;
  min-height: 860px;
  position: relative;
  border-radius: 36px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.screen {
  display: none;
  min-height: 100%;
  padding: 20px 18px 140px;
}

.screen.active {
  display: block;
}

.glass-card {
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
}

.header-left {
  justify-content: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--text-soft);
  font-weight: 700;
}

.header-right {
  justify-content: flex-end;
}

.app-title {
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
  font-size: 18px;
}

.hero {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 74px;
}

.weather-copy {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.location-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
}

.location-change {
  border: none;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  font-size: 13px;
}

.temperature {
  font-size: 74px;
  line-height: 1;
  font-weight: 800;
  margin: 6px 0;
  letter-spacing: -0.05em;
}

.weather-meta {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--text-soft);
  font-size: 15px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
}

.meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(21, 50, 74, 0.35);
}

.mascot-wrap {
  margin: 26px auto 12px;
  width: 240px;
  height: 240px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sky-halo {
  position: absolute;
  inset: 30px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.34),
    rgba(255, 255, 255, 0.06) 65%,
    transparent 75%
  );
  filter: blur(8px);
}

.mascot-shadow {
  position: absolute;
  bottom: 20px;
  width: 120px;
  height: 24px;
  border-radius: 999px;
  background: rgba(88, 138, 176, 0.18);
  filter: blur(6px);
  animation: shadowPulse 4s ease-in-out infinite;
}

.mascot {
  position: relative;
  width: 150px;
  height: 180px;
  animation: float 4s ease-in-out infinite;
}

.body {
  position: absolute;
  inset: 0;
  border-radius: 46% 48% 44% 45% / 40% 42% 52% 50%;
  background: linear-gradient(145deg, #fffdf8 0%, #f7f1e7 58%, #eadfd0 100%);
  box-shadow:
    inset -14px -10px 20px rgba(214, 198, 179, 0.45),
    inset 10px 12px 18px rgba(255, 255, 255, 0.65),
    0 16px 30px rgba(79, 130, 166, 0.12);
  transform: rotate(-5deg);
}

.body::before {
  content: "";
  position: absolute;
  width: 42px;
  height: 70px;
  left: 28px;
  top: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  filter: blur(4px);
  transform: rotate(18deg);
}

.hand,
.foot {
  position: absolute;
  background: linear-gradient(145deg, #fffdf8 0%, #f2eadc 100%);
  box-shadow:
    inset 6px 6px 10px rgba(255, 255, 255, 0.55),
    inset -8px -6px 12px rgba(219, 204, 186, 0.4);
}

.hand {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  top: 78px;
}

.hand.left {
  left: -10px;
}

.hand.right {
  right: -10px;
}

.foot {
  width: 44px;
  height: 34px;
  border-radius: 40px;
  bottom: -6px;
}

.foot.left {
  left: 28px;
}

.foot.right {
  right: 22px;
}

.face {
  position: absolute;
  inset: 0;
}

.eye {
  position: absolute;
  width: 12px;
  height: 16px;
  border-radius: 50%;
  background: #272727;
  top: 68px;
  box-shadow: inset -1px -2px 0 rgba(255, 255, 255, 0.05);
}

.eye.left {
  left: 55px;
}

.eye.right {
  left: 96px;
}

.eye::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  top: 2px;
  left: 2px;
}

.blush {
  position: absolute;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 183, 199, 0.45);
  filter: blur(3px);
  top: 94px;
}

.blush.left {
  left: 34px;
}

.blush.right {
  right: 24px;
}

.mouth {
  position: absolute;
  width: 28px;
  height: 16px;
  border-bottom: 4px solid #7c6761;
  border-radius: 0 0 20px 20px;
  left: 68px;
  top: 98px;
  transform: rotate(3deg);
}

.sun-dots span {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: rgba(255, 211, 91, 0.9);
  box-shadow: 0 0 18px rgba(255, 211, 91, 0.3);
}

.sun-dots span:nth-child(1) {
  width: 20px;
  height: 20px;
  top: 22px;
  left: 28px;
}

.sun-dots span:nth-child(2) {
  width: 14px;
  height: 14px;
  top: 40px;
  right: 34px;
}

.sun-dots span:nth-child(3) {
  width: 10px;
  height: 10px;
  bottom: 56px;
  left: 16px;
}

.sun-dots span:nth-child(4) {
  width: 18px;
  height: 18px;
  bottom: 44px;
  right: 18px;
}

.section-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 24px 6px 14px;
}

.hourly-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

#weather-stats-buttons::-webkit-scrollbar,
.weather-tabs::-webkit-scrollbar {
  height: 6px;
}

#weather-stats-buttons::-webkit-scrollbar-track,
.weather-tabs::-webkit-scrollbar-track {
  background: transparent;
}

#weather-stats-buttons::-webkit-scrollbar-thumb,
.weather-tabs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}

.hourly-row::-webkit-scrollbar {
  display: none;
}

.hour-card {
  min-width: 92px;
  padding: 16px 12px;
  border-radius: var(--radius-lg);
  text-align: center;
}

.hour-time {
  font-size: 15px;
  color: var(--text-soft);
  font-weight: 700;
  margin-bottom: 10px;
}

.hour-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.hourly-item {
  min-width: 64px;
  padding: 14px 8px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  text-align: center;
}

.hourly-time {
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 700;
}

.hourly-temp {
  font-size: 16px;
  font-weight: 800;
}

.hour-temp {
  font-size: 16px;
  font-weight: 800;
}

.weekly-card {
  padding: 10px 14px;
  border-radius: var(--radius-xl);
  margin-top: 18px;
}

.weekly-row {
  display: grid;
  grid-template-columns: 1fr 40px 70px;
  align-items: center;
  gap: 16px;
  padding: 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text-soft);
}

.weekly-row:last-child {
  border-bottom: none;
}

.weekly-day {
  font-size: 17px;
  font-weight: 800;
}

.weekly-icon {
  font-size: 22px;
  text-align: center;
  display: flex;
  justify-content: center;
}

.weekly-temp {
  font-size: 17px;
  font-weight: 800;
  display: grid;
  grid-template-columns: 1fr 1fr;
  text-align: center;
  gap: 8px;
}

.low {
  color: rgba(21, 50, 74, 0.45);
  font-weight: 700;
}

.mood-card,
.community-card,
.customize-card {
  padding: 20px 18px;
  border-radius: var(--radius-xl);
  margin-top: 18px;
}

.mood-question {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 14px;
}

.mood-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.mood-btn {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
}

.mood-btn.active {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--accent);
}

.muted {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.5;
}

.community-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.community-card-item {
  background: rgba(255, 255, 255, 0.4);
  border: none;
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
  overflow: hidden;
  height: 200px;
}

.community-card-item:active {
  transform: scale(0.96);
}

.community-card-item .mascot-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%) scale(0.38);
  transform-origin: center center;
  margin: 0;
  pointer-events: none;
}

.community-name {
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
  text-align: left;
}

.community-card-item .muted {
  display: none;
}

.like-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.2s;
}

.like-btn.liked {
  color: #ff4757;
}

.like-btn svg {
  width: 16px;
  height: 16px;
  color: var(--text-soft);
  transition: transform 0.2s;
}

.like-btn.liked svg,
.post-likes.liked svg {
  fill: #ff4757;
  color: #ff4757;
  transform: scale(1.1);
}

.card-footer-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  z-index: 2;
}

.customize-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.pill {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

.bottom-nav {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  border-radius: 28px;
  padding: 12px 10px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* Changed to 2 from 3 */
  gap: 10px;
  z-index: 10;
}

.nav-btn {
  border: none;
  background: transparent;
  border-radius: 18px;
  padding: 12px 8px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-soft);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.nav-btn.active {
  background: rgba(255, 255, 255, 0.24);
  color: var(--accent);
}

.nav-icon {
  font-size: 20px;
  line-height: 1;
}

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

  50% {
    transform: translateY(-12px);
  }
}

@keyframes shadowPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.25;
  }

  50% {
    transform: scale(0.88);
    opacity: 0.16;
  }
}

.clothing-recommendation {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 8px 16px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(38, 91, 130, 0.08);
}

.modal {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 999;
  display: none;
  align-items: flex-end;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 36px;
  overflow: hidden;
  pointer-events: auto;
}

.modal.open {
  display: flex;
}

.modal-content {
  width: 100%;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-radius: 32px 32px 0 0;
  padding: 24px;
  padding-bottom: 40px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  pointer-events: auto;
}

.modal.open .modal-content {
  transform: translateY(0);
}

.modal.center {
  align-items: center;
  justify-content: center;
}

.modal-center-content {
  width: auto;
  min-width: 280px;
  margin: 0 24px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-radius: 32px;
  padding: 32px 24px;
  transform: scale(0.95);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.6);
  pointer-events: auto;
  position: relative;
  overflow: visible;
  text-align: center;
}

.modal.open .modal-center-content {
  transform: scale(1);
  opacity: 1;
}

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 12px;
  gap: 10px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  flex: 1;
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
  pointer-events: auto;
}

.location-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  text-align: left;
  margin-bottom: 8px;
  font-family: inherit;
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: all 0.2s;
  pointer-events: auto;
  position: relative;
  z-index: 1001;
}

.location-btn:active {
  transform: scale(0.98);
}

.current-loc-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(79, 140, 255, 0.3);
}

.search-results {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: none;
}

/* Chat Attach Buttons - Light Mode */
.chat-attach-btn {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(79, 140, 255, 0.15);
  color: #4f8cff;
}
.chat-attach-btn svg {
  color: #4f8cff !important;
  stroke: #4f8cff !important;
}

/* Chat Attach Buttons - Dark Mode */
:root[data-theme="evening"] .chat-attach-btn {
  background: white;
  box-shadow: 0 3px 12px rgba(255, 255, 255, 0.08);
  color: #4b6a80;
}
:root[data-theme="evening"] .chat-attach-btn svg {
  color: #4b6a80 !important;
  stroke: #4b6a80 !important;
}

/* Dark mode chat message sender icon */
:root[data-theme="evening"] #chat-messages-container .chat-msg-avatar {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
}
:root[data-theme="evening"] #chat-messages-container .chat-msg-avatar svg {
  color: rgba(255, 255, 255, 0.7) !important;
  stroke: rgba(255, 255, 255, 0.7) !important;
}

/* Dark mode send button area */
:root[data-theme="evening"] #chat-messages-container svg {
  color: rgba(255, 255, 255, 0.7) !important;
  stroke: rgba(255, 255, 255, 0.7) !important;
}
