:root{
  --bg:#0b0f2f;
  --panel:#12142b;
  --muted:rgba(255,255,255,0.7);
  --card:#111428;
  --accent:#4b4ff0;
  --accent-2:#5b4ff7;
}


*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: linear-gradient(180deg,#07081a 0%, #0f1630 100%);
  color:#fff;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}


.site-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:18px 28px;
  background:transparent;
}
.brand{display:flex;align-items:center;gap:10px}
.app-name{font-weight:700}
.header-controls{display:flex;align-items:center;gap:12px}
.units-toggle select{
  background:rgba(255,255,255,0.06);
  color:#fff;
  border:0;
  padding:8px 10px;
  border-radius:8px;
}

/* Page title + search */
.page{
  width:100%;
  max-width:1200px;
  margin:0 auto;
  padding:12px 20px 60px;
}
.page-title{
  text-align:center;
  font-size:32px;
  margin:6px 0 22px;
  font-weight:700;
}
.search-row{
  display:flex;
  justify-content:center;
  gap:12px;
  margin-bottom:22px;
}
.search-input{
  width:480px;
  max-width:70%;
  padding:14px 16px;
  border-radius:12px;
  border:0;
  background:rgba(255,255,255,0.04);
  color:#fff;
  outline:none;
}
.btn-primary{
  background:var(--accent);
  border:0;
  color:#fff;
  padding:12px 18px;
  border-radius:10px;
  cursor:pointer;
}


.content-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:20px;
  align-items:start;
  padding:10px 8px;
}


.left-column{display:flex;flex-direction:column;gap:18px}


.main-card{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  background:linear-gradient(135deg,#4b4ff0 0%, #2f2b6b 100%);
  border-radius:14px;
  padding:22px;
  box-shadow: 0 6px 30px rgba(17,18,46,0.6);
}
.main-card-left h2{font-size:20px;margin-bottom:6px}
.muted{opacity:0.85;font-size:13px}
.small-desc{opacity:0.9;font-size:14px;margin-top:6px}
.main-card-right{display:flex;flex-direction:column;align-items:center;gap:6px}
.main-card-right img{width:84px;height:84px}
.big-temp{font-size:44px;font-weight:700}


.stats-row{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}
.stat-card{
  background: rgba(255,255,255,0.03);
  padding:14px;
  border-radius:12px;
  min-width:110px;
  flex:1;
  max-width:220px;
}
.stat-label{opacity:0.85;font-size:13px;margin-bottom:6px}
.stat-value{font-weight:600;font-size:18px}


.daily-section .section-title{margin:6px 0 10px}
.daily-cards{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.daily-card{
  background: rgba(255,255,255,0.03);
  width:90px;
  border-radius:10px;
  padding:10px;
  text-align:center;
  cursor:pointer;
}
.daily-card .day{font-size:13px;opacity:0.9;margin-bottom:6px}
.daily-card .icon{font-size:20px;margin-bottom:6px}
.daily-card .temps{font-size:13px;opacity:0.9}


.right-column{display:flex;flex-direction:column;gap:14px}
.hourly-panel{
  background: rgba(255,255,255,0.03);
  padding:16px;
  border-radius:12px;
  min-width:260px;
}
.hourly-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.hourly-header h3{margin:0}
.hourly-controls select{
  border:0;background:rgba(255,255,255,0.04);color:#fff;padding:8px;border-radius:8px;
}
.hourly-list{display:flex;flex-direction:column;gap:10px;max-height:520px;overflow-y:auto;padding-right:6px}
.hour-row{
  display:flex;justify-content:space-between;align-items:center;padding:10px;border-radius:10px;background:rgba(255,255,255,0.02)
}
.hour-row .left{display:flex;align-items:center;gap:8px}
.hour-row img{width:28px;height:28px}
.hour-row .time{opacity:0.9}
.hour-row .temp{font-weight:600}


.page-footer{text-align:center;padding:20px 0 80px;color:rgba(255,255,255,0.6)}


@media(min-width:1000px){
  .content-grid{
    grid-template-columns: 2fr 360px;
    align-items:start;
  }
  .search-input{width:500px;max-width:520px}
  .daily-cards{flex-wrap:nowrap;overflow-x:auto;padding-bottom:6px}
}

@media(max-width:600px){
  .page-title{font-size:20px}
  .search-input{width:calc(100% - 140px)}
  .main-card{padding:16px}
  .main-card-right img{width:64px;height:64px}
  .big-temp{font-size:34px}
  .stat-card{min-width:140px}
  .daily-card{width:72px;padding:8px}
  .hourly-panel{min-width:auto}
  .right-column{order:3}
  .daily-section{order:2}
}

.sun-times {
  display: flex;
  justify-content: space-between;
  color: #f9fafb;
  font-size: 14px;
  margin-top: 10px;
}


select {
  background-color: #1e1e3f;
  color: #fff; 
  border: 1px solid #444; 
  border-radius: 8px; 
  padding: 6px 10px;
}

select option {
  background-color: #1e1e3f; 
  color: #fff;
}

#chatbot-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: 'Poppins', sans-serif;
}

#chatbot-icon {
  background: linear-gradient(135deg, #1e1e3f, #1e1e3f); /* blue → purple */
  color: white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#chatbot-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
}

#chatbot-window {
  display: none;
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  height: 480px;
  background: #101225;
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#chatbot-messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: white;
}


.chatbot-message {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}


.chatbot-message.bot {
  background-color: rgba(255, 255, 255, 0.08);
  color: #1e1e3f;
  align-self: flex-start;
  border-bottom-left-radius: 0;
}


.chatbot-message.user {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 0;
}


#chatbot-window > div:last-child {
  display: flex;
  align-items: center;
  background: #f9fafb; /* Light bar for contrast */
  padding: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}


#chatbot-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: #111;
  font-size: 14px;
  padding: 10px;
  border-radius: 8px;
}

#chatbot-input::placeholder {
  color: #777;
}


#chatbot-send {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s ease-in-out, transform 0.1s ease-in-out;
}

#chatbot-send:hover {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  transform: translateY(-2px);
}


#chatbot-messages::-webkit-scrollbar {
  width: 6px;
}
#chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}


@media (max-width: 480px) {
  #chatbot-window {
    width: 90vw;
    height: 70vh;
    right: 5vw;
  }
}

#chatbot-messages {
  display: flex;
  flex-direction: column; 
  gap: 10px; 
}


.chatbot-message {
  display: inline-block;
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}


.chatbot-message.bot {
  align-self: flex-start;
  text-align: left;
  background-color: #1e1e3f;
  color: #e5e7eb;
  border-bottom-left-radius: 0;
}


.chatbot-message.user {
  align-self: flex-end;
  text-align: right;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  border-bottom-right-radius: 0;
}


@media (max-width: 768px) {
  body,
  .forecast-container,
  .hourly-container,
  .main-container {
    background: #0b1120 !important; 
    background-image: none !important;
    box-shadow: none !important;
  }
}


.weekly-graph {
  background: rgba(20, 24, 50, 0.9);
  padding: 20px;
  border-radius: 14px;
  margin-top: 25px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  backdrop-filter: none !important; /* ❌ remove blur effect */
}

.weekly-graph h3 {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 30px;
}

#weeklyChart {
  width: 100% !important;
  height: 250px !important;
  background: transparent;
  display: block;
}

.chartjs-chart text,
canvas {
  color: #fff !important;
}

.chartjs-render-monitor {
  filter: none !important;
}

canvas {
  image-rendering: pixelated;
}

@media (max-width: 768px) {
  #weeklyChart {
    height: 220px !important;
  }
}
