/* style.css */

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Fullscreen */
body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #000;
  color: #fff;
  font-family: 'Raleway', 'Segoe UI', sans-serif;
  font-size: 20pt;
}

/* Main wrapper */
#main-body {
  display: flex;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* Mirror sections */
.mirror {
  flex: 1;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  animation: fadeInMirror 2s ease forwards;
}

@keyframes fadeInMirror {
  to {
    opacity: 1;
  }
}

#left-mirror {
  text-align: left;
  align-items: flex-start;
}

#center-mirror {
  text-align: center;
  align-items: center;
}

#right-mirror {
  text-align: right;
  align-items: flex-end;
}

/* Divider (small) */
.divider {
  width: 20px;
  height: 10px;
  background-color: white;
  margin: 20px 0;
}

/* Greeting message */
#greeting {
  position: absolute;
  top: 40%;
  width: 100%;
  text-align: center;
  font-size: 48px;
  font-weight: bold;
  opacity: 0;
  z-index: 10;
}

#identity-indicator {
  position: absolute;
  bottom: 20px;
  right: 20px;
  font-size: 24px;
  font-weight: 500;
  color: white;
  opacity: 0.6;
  text-align: right;
}

/* Clock (datetime) */
#datetime {
  position: relative;
  top: -30px;
  font-size: 22pt;
  font-variant: small-caps;
  font-family: 'Raleway', sans-serif;
  text-align: left;
  color: #fff;
  width: 100%;
  z-index: 2;
  margin-bottom: 20px;
}

.date {
  font-size: 24pt;
}

.time {
  font-size: 82pt;
  vertical-align: middle;
}

#s {
  font-size: 26pt;
  vertical-align: 2px;
}

/* Reminders */
/* Container that holds the reminders */
#reminders {
  font-size: 12pt;
  font-variant: small-caps;
  font-family: 'Raleway', sans-serif;
  width: 80%;
  margin-bottom: 20px;
}

/* Individual reminders with animated "shine" */
.reminder {
  background: linear-gradient(40deg, 
    rgba(255, 245, 100, 1) 0%, 
    rgba(255, 255, 150, 1) 50%, 
    rgba(200, 180, 50, 1) 60%, 
    rgba(100, 80, 0, 1) 90%
  );
  background-size: 400% 400%;
  animation: reminder-shine 8s ease infinite;
  
  color: #000;
  padding: 8px;
  margin-bottom: 8px;
  border-radius: 5px;
  font-size: 11pt;
  width: 100%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Keyframes for shining effect */
@keyframes reminder-shine {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}


/* Appointments */
#appointments-container {
  position: relative;
  width: 380px;
  overflow-y: none;
  color: #fff;
  font-family: Arial, sans-serif;
  border: none;
  padding: 10px;
  font-size: 10pt;
  box-sizing: border-box;
}

/* Header for each day */
.date-header {
  font-weight: bold;
  margin-top: 15px;
  margin-bottom: 8px;
  border-bottom: 1px solid #444;
  padding-bottom: 4px;
  font-size: 12pt;
}

/* Each appointment "card" */
.appointment-card {
  border-left: 5px solid #666; /* Will be overridden by user color */
  margin: 3px 0;
  padding: 8px 8px;
  background: #111;
  border-radius: 5px;
  width: 100%;
}

.appointment-user {
  display: inline-block;
  font-weight: bold;
  margin-right: 10px;
  font-size: 11pt;
}

.appointment-time,
.appointment-location,
.appointment-attendees,
.appointment-description {
  display: block;
  font-size: 10pt;
  margin: 2px 0;
}

.appointment-description {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.appointment-highlight {
  transform: scale(1.05);
  background: linear-gradient(90deg, rgba(52,152,219,0.2) 0%, rgba(255,255,255,0.05) 100%);
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(52,152,219,0.3);
  transition: all 0.3s ease;
}

.appointment-faded {
  opacity: 0.6;
  transition: opacity 0.5s ease;
}

/* Market Container */
#market-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: auto;
  margin-bottom: 20px;
}

.market-box {
  width: 380px;
  box-sizing: border-box;
}

/* Market Status Banner */
#market-status .market-closed-banner {
  width: 100%;
  background-color: rgba(200, 200, 200, 0.15);
  color: #ccc;
  text-align: center;
  font-size: 10pt;
  padding: 4px 0;
  border-radius: 4px;
}

/* Market Table */
#market-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 14pt;
  font-family: Arial, sans-serif;
  /* background: rgba(255, 255, 255, 0.05); */
  border-radius: 8px;
  box-sizing: border-box;
}

#market-table th {
  padding: 2px 16px;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}

.market-symbol {
  text-align: left;
  font-weight: bold;
  width: 45%;
}

.market-correction {
  text-align: right;
  font-weight: bold;
  width: 27.5%;
}

.market-price {
  text-align: right;
  width: 27.5%;
}

.market-color-green {
  color: #2ecc71;
}

.market-color-red {
  color: #e74c3c;
}

/* Weather */

#weather {
  position: relative;
  font-size: 16pt;
  font-variant: small-caps;
  font-family: 'Raleway', sans-serif;
  text-align: right;
}

#weather-now-city {
  font-size: 18pt;
}

#weather-now-temp {
  font-size: 82pt;
}

#weather-forecast {
  font-size: 12pt;
  margin-top: 20px;
}

.weather-forecast-desc {
  font-size: 12pt;
}

.weather-ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.weather-li {
  padding: 5px 0;
}

li font {
  font-size: 12pt;
}

.fade-overlay {
  position: absolute; /* or relative, depending on context */
  bottom: 0px;
  left: 0px;
  width: 400px;
  height: 500px;
  z-index: 1;
  pointer-events: none; /* Let clicks pass through */
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0) 75%,
    rgba(0, 0, 0, 1) 100%
  );
}

#connection-status {
  position: fixed;
  bottom: 10px;
  right: 10px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: red;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1000; /* On top of everything */
}

#greeting-face {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Allow clicks to pass through */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5; /* Behind greeting text but above general content */
  opacity: 0;
  transition: opacity 3.5s ease;
}

#greeting-face-img {
  max-width: 60%;
  max-height: 80%;
  object-fit: contain;
  filter: brightness(1.2) contrast(1.1) opacity(0.8) drop-shadow(0 0 40px rgba(0,0,0,0.7));
  mask-image: radial-gradient(circle at center, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
  -webkit-mask-image: radial-gradient(circle at center, rgba(0,0,0,1) 60%, rgba(0,0,0,0) 100%);
}

/* Snapshot is older than expected (e.g. a vendor outage): keep showing it, dimmed. */
.stale {
  opacity: 0.4;
}

#worldmap .worldmap-img {
  width: 100%;
}
