:root {
  --bg-primary: light-dark(rgba(255, 255, 255, 0.6), rgba(0, 0, 0, 0.4));
  --bg-secondary: light-dark(rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.2));
  --border: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.2));
  --text: light-dark(#000, #fff);
  --green: light-dark(#4affbd, #6bffd1);
  --blue: light-dark(#409cff, #7bb3f0);
  --gray: light-dark(#999, #ccc);
  --gold: light-dark(#daa520, #f4d03f);
  --shadow: light-dark(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.5));
  --hover: light-dark(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
}

@media (prefers-color-scheme: dark) {
  .app-toolbar-button,
  #app-sidebar-button {
    filter: invert(1);
  }
}
@media (prefers-color-scheme: light) {
  .app-toolbar-button,
  #app-sidebar-button {
    filter: invert(0);
  }
}

#app {
  position: fixed;
  top: 60%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 25px;
  outline: 2px solid var(--border);
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;

  @media screen and (max-width: 600px) {
    top: 45%;
    max-height: 50vh;
  }
}

#app-ui {
  width: 850px;
  max-width: 95vw;
  height: fit-content;
  background: var(--bg-primary);
  border-radius: 25px;
  box-shadow: 0 8px 40px var(--shadow);
  outline: 1px solid var(--border);
  backdrop-filter: blur(30px);
  display: flex;
  overflow: hidden;
}

/* Sidebar */
#app-sidebar {
  width: 250px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  backdrop-filter: blur(200px);
  border-radius: 15px;
  margin: 8px 0 8px 8px;

  @media screen and (max-width: 600px) {
    display: none;
  }
}

#app-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/*  Header & Toolbar */
.app-header {
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
}

.app-sidebar-header {
  height: 30px;
  padding: 5px;
}

/* Window Controls */
#app-window-controls {
  display: flex;
  gap: 4px;
}

.app-window-button {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.app-window-button:hover {
  background-color: var(--hover);
}

.close {
  background-color: #ff5f56;
}
.minimize {
  background-color: #ffbd2e;
}
.maximize {
  background-color: #27c93f;
}

/* Toolbar */
#app-tab-bar,
.app-toolbar-group {
  background-color: var(--bg-secondary);
  outline: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 7px;
  border-radius: 20px;
  gap: 10px;
}

.app-toolbar-button {
  width: 24px;
  height: 24px;
  background-size: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

/* Icons  */
.app-notifications {
  background-image: url("https://img.icons8.com/sf-regular/50/appointment-reminders.png");
}
.app-settings {
  background-image: url("https://img.icons8.com/sf-regular/50/settings.png");
}
.app-clear-button {
  background-image: url("https://img.icons8.com/sf-regular/50/wind.png");
}
#app-sidebar-button {
  background-image: url("https://img.icons8.com/fluency-systems-regular/48/show-left-side-panel.png");
  width: 24px;
  height: 24px;
  background-size: cover;
  cursor: pointer;
}

/* icon filters for theme */
@media (prefers-color-scheme: dark) {
  .app-toolbar-button,
  #app-sidebar-button {
    filter: invert(1);
  }
}

@media (prefers-color-scheme: light) {
  .app-toolbar-button,
  #app-sidebar-button {
    filter: invert(0);
  }
}

.app-sidebar-item {
  margin: 20px auto;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background-color: var(--bg-secondary);
  outline: 1px solid var(--border);
  border-radius: 12px;
  width: fit-content;
  transition: background-color 0.3s ease;
}

#app-phone {
  background-color: var(--bg-secondary);
  outline: 1px solid var(--border);
  border-radius: 25px;
  margin: 10%;
  width: 70%;
  aspect-ratio: 9/21;
  padding: 5%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#phone-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: Roboto, "SF Pro Display", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text);
  line-height: 0.9;
}

#clock-hours,
#clock-minutes {
  font-size: clamp(6rem, 3vw, 2rem);
  font-weight: 200;
  letter-spacing: 0.01em;
}

.app-sidebar-bottom-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px auto;
  gap: 10px;
}

.app-sidebar-bottom-buttons .app-sidebar-item {
  height: 25px;
  border-radius: 25px;
  margin: 0;
  transition: transform 0.3s ease;
}

.hspacertext {
  width: 10px;
}

#app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px;
}

.app-notifications-tab {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  padding: 5px;
  height: fit-content;
  overflow-x: hidden;
}

/* Base Notification Styles */
.app-notification {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  backdrop-filter: blur(200px);
  border-radius: 20px;
  padding: 12px;
  display: flex;
  gap: 12px;
  transition: all 0.2s ease;
  text-align: left;
  color: var(--text);
  position: relative;
  text-decoration: none;
}

.app-notification:hover {
  background-color: var(--hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--shadow);
}

/* CTA Notifications */
.cta-notification {
  border: 2px solid;
  animation: pulse 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.cta-notification::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--hover), transparent);
  transition: left 0.5s ease;
}

.cta-notification:hover::before {
  left: 100%;
}

.cta-notification {
  border-color: var(--green);
  background: var(--bg-secondary);
}
.cta-notification .notification-title {
  color: var(--green);
}

.cta-notification.mac-app {
  border-color: var(--blue);
  background: light-dark(rgba(64, 156, 255, 0.1), rgba(123, 179, 240, 0.2));
}
.cta-notification.mac-app .notification-title {
  color: var(--blue);
}

.cta-notification.android-app {
  border-color: var(--green);
  background: light-dark(rgba(74, 255, 189, 0.1), rgba(107, 255, 209, 0.2));
}
.cta-notification.android-app .notification-title {
  color: var(--green);
}

.cta-notification.development {
  border-color: var(--gray);
}
.cta-notification.development .notification-title {
  color: var(--gray);
}

.cta-notification.premium {
  border-color: var(--gold);
}
.cta-notification.premium .notification-title {
  color: var(--gold);
}

/* Notification Content */
.notification-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
}

.notification-icon img {
  width: 90%;
  height: 90%;
  border-radius: 12px;
  object-fit: cover;
}

.notification-icon .material-symbols-rounded {
  font-size: 20px;
  color: var(--text);
}

.notification-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.notification-title {
  font-weight: 600;
  font-size: 13px;
  line-height: 1.2;
}

.notification-message {
  font-size: 12px;
  opacity: 0.8;
  line-height: 1.3;
  word-wrap: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notification-time {
  font-size: 10px;
  opacity: 0.6;
  margin-top: 2px;
}

/* Notification Actions */
.notification-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.notification-action-button {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 11px;
  font-weight: 500;
}

.notification-action-button:hover {
  background-color: var(--hover);
  transform: scale(1.02);
}

/* Dismiss Button */
.notification-dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
}

.notification-dismiss:hover {
  background: var(--hover);
}

.app-notification:hover .notification-dismiss {
  opacity: 1;
}

/* Scrollbar */
.app-notifications-tab::-webkit-scrollbar {
  width: 4px;
}

.app-notifications-tab::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 2px;
}

.app-notifications-tab::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.app-notifications-tab::-webkit-scrollbar-thumb:hover {
  background: var(--hover);
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 4px 12px var(--shadow), 0 0 0 0 currentColor;
  }
  50% {
    box-shadow: 0 4px 12px var(--shadow), 0 0 0 4px transparent;
  }
}
