/* ========================================
   AERO THEME - CSS VARIABLES
   ======================================== */

:root {
  /* === BASE COLORS === */
    --background: rgb(199 220 242);
  --foreground: #000000; /* Main text color */
--secondground: rgb(255, 255, 255);

  /* === BUTTON FACE COLORS === */
  --button-highlight: #ffffff;
  --button-face: #f2f2f2;
  --button-face-hover: #eaf6fd;
  --button-face-active: #c4e5f6;
  --button-face-disabled: #f4f4f4;

  /* === BUTTON SHADE COLORS === */
  --button-shade-light: #ebebeb;
  --button-shade-light-default: #c3dcea;
  --button-shade-light-hovered: #bee6fd;
  --button-shade-light-active: #98d1ef;
  --button-shade-dark: #cfcfcf;

  /* === BUTTON SHADOWS === */
  --button-shadow: inset 0 0 0 1px rgba(255, 255, 252, 1);
  --button-shadow-active: inset 1px 1px 0 rgba(0, 0, 0, 0.2), inset -1px 1px 0 rgba(0, 0, 0, 0.067);

  /* === BUTTON BORDERS === */
  --button-border: 1px solid;
  --button-border-color: #8e8f8f;
  --button-border-color-default: #5586a3;
  --button-border-color-hovered: #3c7fb1;
  --button-border-color-active: #6d91ab;
  --button-border-color-disabled: #aeb2b5;
  --button-text-color-disabled: #838383;

  /* === BUTTON GRADIENTS === */
  --button-gradient: linear-gradient(to bottom, var(--button-face) 45%, var(--button-shade-light) 45%, var(--button-shade-dark));
  --button-gradient-hovered: linear-gradient(to bottom, var(--button-face-hover) 45%, var(--button-shade-light-hovered) 45%, #a7d9f5);
  --button-gradient-active: linear-gradient(to bottom, #e5f4fc, var(--button-face-active) 30% 50%, var(--button-shade-light-active) 50%, #68b3db);

  /* === HIGHLIGHT COLORS === */
  --item-highlighted-border: #aaddfa;
  --item-highlighted-background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(230, 236, 245, 0.8) 90%, rgba(255, 255, 252, 0.8) 100%);

  /* === GLASS STRIPES PATTERN (for widgets and windows) === */
    --window-background-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.33) 70px, transparent 100px), linear-gradient(225deg, rgba(255, 255, 255, 0.33) 70px, transparent 100px), linear-gradient(54deg, rgba(0, 0, 0, 0.133) 0 4%, rgba(102, 102, 17, 0.067) 6% 6%, rgba(0, 0, 0, 0.133) 8% 10%, rgba(0, 0, 0, 0.133) 15% 16%, rgba(170, 170, 17, 0.067) 17% 18%, rgba(0, 0, 0, 0.133) 23% 24%, rgba(187, 187, 34, 0.133) 25% 26%, rgba(0, 0, 0, 0.133) 31% 33%, rgba(0, 0, 0, 0.133) 34% 34.5%, rgba(187, 187, 34, 0.133) 36% 40%, rgba(0, 0, 0, 0.133) 41% 41.5%, rgba(187, 187, 34, 0.133) 44% 45%, rgba(187, 187, 34, 0.133) 46% 47%, rgba(0, 0, 0, 0.133) 48% 49%, rgba(0, 0, 0, 0.133) 50% 50.5%, rgba(0, 0, 0, 0.133) 56% 56.5%, rgba(187, 187, 34, 0.133) 57% 63%, rgba(0, 0, 0, 0.133) 67% 69%, rgba(187, 187, 34, 0.133) 69.5% 70%, rgba(0, 0, 0, 0.133) 73.5% 74%, rgba(187, 187, 34, 0.133) 74.5% 79%, rgba(0, 0, 0, 0.133) 80% 84%, rgba(170, 170, 34, 0.133) 85% 86%, rgba(0, 0, 0, 0.133) 87%, rgba(187, 187, 17, 0.067) 90%) left center/100vw 100vh no-repeat fixed;
    --window-background-color: #4580c4;
    --window-background: linear-gradient(to right, #ffffff66, #0000001a, #ffffff33), var(--window-background-color);

    --window-border: 1px solid;
    --window-border-radius: 6px;
    --window-border-color: #000000b3;
    --window-before-background: linear-gradient(transparent 20%, #ffffffb3 40%, transparent 41%);

  /* === GLASS EFFECTS === */
  --aero-backdrop-blur: blur(4px);
  --aero-blur: blur(1px);
  --aero-box-shadow: 2px 2px 10px 1px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 250, 1);

  /* === BORDER SETTINGS === */
  --border-radius: 3px;
  --border-width: 1px;

  /* === RIPPLE COLORS === */
  --ripple-bg1: rgba(69, 128, 196, 0.8);
  --ripple-bg2: rgba(89, 148, 216, 0.6);
  --ripple-bg3: rgba(109, 168, 236, 0.4);
  --ripple-bg4: rgba(129, 188, 255, 0.3);
  --ripple-bg5: rgba(149, 208, 255, 0.2);
}

/* ========================================
   DARK THEME VARIABLES
   ======================================== */

.dark {
  /* === DARK BASE COLORS === */
  --background: #1a1a2e;
  --foreground: #ffffff;
  --secondground: rgba(48, 48, 48, 0.95);
  
  /* === DARK BUTTON COLORS === */
  --button-face: #3a3a3a;
  --button-face-hover: #4a4a4a;
  --button-face-active: #2a2a2a;
  --button-shade-light: #4a4a4a;
  --button-shade-dark: #1a1a1a;
  --button-border-color: #666666;
  --button-border-color-hovered: #888888;
  --button-border-color-active: #555555;

  /* === DARK BUTTON GRADIENTS === */
  --button-gradient: linear-gradient(to bottom, var(--button-face) 45%, var(--button-shade-light) 45%, var(--button-shade-dark));
  --button-gradient-hovered: linear-gradient(to bottom, var(--button-face-hover) 45%, #5a5a5a 45%, #2a2a2a);
  --button-gradient-active: linear-gradient(to bottom, #2a2a2a, var(--button-face-active) 30% 50%, #3a3a3a 50%, #1a1a1a);
  
  /* === DARK HIGHLIGHT COLORS === */
  --item-highlighted-border: #4a6fa5;
  --item-highlighted-background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(100, 100, 150, 0.3) 90%, rgba(255, 255, 255, 0.05) 100%);
  
  /* === DARK BUTTON FACE COLORS === */
  --button-highlight: #4a4a4a;
  --button-face-disabled: #2a2a2a;
  --button-shade-light-default: #555555;
  --button-shade-light-hovered: #666666;
  --button-shade-light-active: #333333;
  --button-border-color-default: #666666;
  --button-border-color-disabled: #444444;
  --button-text-color-disabled: #666666;

  /* === DARK BUTTON SHADOWS === */
  --button-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  --button-shadow-active: inset 1px 1px 0 rgba(0, 0, 0, 0.3), inset -1px 1px 0 rgba(0, 0, 0, 0.1);

  /* === DARK WINDOW/WIDGET COLORS === */
    --window-background-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 70px, transparent 100px), linear-gradient(225deg, rgba(255, 255, 255, 0.1) 70px, transparent 100px), linear-gradient(54deg, rgba(0, 0, 0, 0.2) 0 4%, rgba(64, 64, 64, 0.1) 6% 6%, rgba(0, 0, 0, 0.2) 8% 10%, rgba(0, 0, 0, 0.2) 15% 16%, rgba(64, 64, 64, 0.1) 17% 18%, rgba(0, 0, 0, 0.2) 23% 24%, rgba(80, 80, 80, 0.2) 25% 26%, rgba(0, 0, 0, 0.2) 31% 33%, rgba(0, 0, 0, 0.2) 34% 34.5%, rgba(80, 80, 80, 0.2) 36% 40%, rgba(0, 0, 0, 0.2) 41% 41.5%, rgba(80, 80, 80, 0.2) 44% 45%, rgba(80, 80, 80, 0.2) 46% 47%, rgba(0, 0, 0, 0.2) 48% 49%, rgba(0, 0, 0, 0.2) 50% 50.5%, rgba(0, 0, 0, 0.2) 56% 56.5%, rgba(80, 80, 80, 0.2) 57% 63%, rgba(0, 0, 0, 0.2) 67% 69%, rgba(80, 80, 80, 0.2) 69.5% 70%, rgba(0, 0, 0, 0.2) 73.5% 74%, rgba(80, 80, 80, 0.2) 74.5% 79%, rgba(0, 0, 0, 0.2) 80% 84%, rgba(64, 64, 64, 0.2) 85% 86%, rgba(0, 0, 0, 0.2) 87%, rgba(80, 80, 80, 0.1) 90%) left center/100vw 100vh no-repeat fixed;
    --window-background-color: #1a1a2e;
    --window-background: linear-gradient(to right, #ffffff1a, #0000003a, #ffffff0a), var(--window-background-color);
    --window-border-color: #000000d9;
    --window-before-background: linear-gradient(transparent 20%, #ffffff57 40%, transparent 41%);

  /* === DARK GLASS EFFECTS === */
  --aero-backdrop-blur: blur(6px);
  --aero-blur: blur(2px);
  --aero-box-shadow: 2px 2px 15px 2px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  
  /* === DARK RIPPLE COLORS === */
  --ripple-bg1: rgba(69, 128, 196, 0.6);
  --ripple-bg2: rgba(89, 148, 216, 0.4);
  --ripple-bg3: rgba(109, 168, 236, 0.3);
  --ripple-bg4: rgba(129, 188, 255, 0.2);
  --ripple-bg5: rgba(149, 208, 255, 0.1);
}

/* ========================================
   BODY AND BASE STYLES
   ======================================== */

/* === MAIN BODY STYLE === */
body {
  font-family: "Segoe UI", "SegoeUI", "Noto Sans", sans-serif;
}

/* === BACKGROUND IMAGES === */
body {
    background: url("/images/frutiger-aero-1.webp") no-repeat center center fixed;
    background-size: cover;
}

.dark body {
  background: url("/images/aero-dark.png") no-repeat center center fixed;
  background-size: cover;
}

/* ========================================
   BUTTONS AND CONTROLS
   ======================================== */

/* === BASIC BUTTONS === */
button,
.control-btn,
.topButton {
  background: var(--button-gradient);
  border: var(--button-border) var(--button-border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--button-shadow);
  box-sizing: border-box;
  color: var(--foreground);
  font-family: "Segoe UI", "SegoeUI", "Noto Sans", sans-serif;
  font-size: 9pt;
  min-height: 23px;
  min-width: 75px;
  padding: 0 12px;
  position: relative;
  text-align: center;
  z-index: 0;
  transition: all 0.3s ease;
  color: var(--foreground) !important;
  cursor: default !important;
}

/* === BUTTON HOVER STATES === */
button:hover,
.control-btn:hover,
.topButton:hover {
  background: var(--button-gradient-hovered);
  border-color: var(--button-border-color-hovered);
  transition: border-color 0.3s;
  transform: none;
}

/* === BUTTON ACTIVE STATES === */
button:active,
.control-btn:active,
.control-btn.active,
.topButton:active {
  background: var(--button-gradient-active);
  border-color: var(--button-border-color-active);
  box-shadow: var(--button-shadow-active);
  transition: border-color 0.3s;
}

/* === BUTTON FOCUS STATES === */
button:focus-visible,
.control-btn:focus-visible,
.topButton:focus-visible {
  box-shadow: inset 0 0 0 2px var(--button-shade-light-active);
  outline: 1px dotted #000;
  outline-offset: -4px;
}

/* === BUTTON DISABLED STATES === */
button:disabled,
.control-btn:disabled,
.topButton:disabled {
  background: var(--button-face-disabled);
  border-color: var(--button-border-color-disabled);
  color: var(--button-text-color-disabled);
}

/* === TOP BUTTONS === */
.topButton {
  padding: 10px 12px;
}

/* ========================================
   INPUT FIELDS AND FORM ELEMENTS
   ======================================== */

/* === TEXT INPUTS === */
input[type=text],
input[type=email],
input[type=password],
input[type=url],
input[type=number],
textarea {
  background-color: var(--button-highlight);
  border: 1px solid #ccc;
  border-radius: 2px;
  border-top: 1px solid var(--button-border-color);
  box-sizing: border-box;
  font-family: "Segoe UI", "SegoeUI", "Noto Sans", sans-serif;
  font-size: 9pt;
  padding: 3px 4px 5px;
  height: 23px;
  transition: all 0.2s ease;
}

/* === INPUT FOCUS STATES === */
input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus,
input[type=url]:focus,
input[type=number]:focus,
textarea:focus {
  border-color: var(--button-shade-light-hovered);
  border-top-color: var(--button-shade-light-active);
  outline: none;
}

/* ========================================
   HEADER AND NAVIGATION
   ======================================== */

/* === HEADER STYLING === */
.header {
    background: var(--window-background-glass);
    backdrop-filter: var(--aero-backdrop-blur);
    -webkit-backdrop-filter: var(--aero-backdrop-blur);
    border-bottom: var(--window-border) var(--window-border-color);
    box-shadow: 2px 2px 10px 1px var(--window-border-color), inset 0 0 0 1px #fffa;
    position: relative;
}

.header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--window-before-background), var(--window-background);
    background-color: var(--window-background-color);
    opacity: 0.6;
    z-index: -1;
}

.header > div:nth-child(1) {
  backdrop-filter: none;
}

/* === NAVIGATION CONTAINER === */
.nav {
  gap: 1em;
}

/* === SPECIFIC NAVIGATION ELEMENTS === */
.header nav a {
  background: var(--button-gradient) !important;
  border: var(--button-border) var(--button-border-color) !important;
  border-radius: var(--border-radius) !important;
  box-shadow: var(--button-shadow) !important;
  padding: 4px 12px !important;
  color: var(--foreground) !important;
  font-family: "Segoe UI", "SegoeUI", "Noto Sans", sans-serif !important;
  font-size: 9pt !important;
  font-weight: 400 !important;
}

.header nav a:hover {
  background: var(--button-gradient-hovered) !important;
  border-color: var(--button-border-color-hovered) !important;
  color: var(--foreground) !important;
  text-decoration: none !important;
}

.header nav a.active {
    background: var(--button-gradient-active) !important;
    border-color: var(--button-border-color-active) !important;
    box-shadow: var(--button-shadow-active) !important;
    color: var(--foreground) !important;
}

/* === PREVENT CHILD ELEMENTS FROM LOOKING LIKE BUTTONS === */
.nav a:hover p, .nav .active p {
    transform: none;
    background: none;
    color: inherit;
    font-weight: inherit;
}


/* ========================================
   WIDGETS AND COMPONENTS
   ======================================== */

/* === WIDGET CONTAINERS === */
.pwa-popup, .widget {
  background: var(--window-background-glass);
  backdrop-filter: var(--aero-backdrop-blur);
  -webkit-backdrop-filter: var(--aero-backdrop-blur);
  border: var(--window-border) var(--window-border-color);
  box-shadow: 2px 2px 10px 1px var(--window-border-color), inset 0 0 0 1px #fffa;
  border-radius: var(--window-border-radius);
}
.pwa-popup::before, .widget::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--window-before-background), var(--window-background);
  background-color: var(--window-background-color);
  border-radius: var(--window-border-radius);
  box-shadow: inset 0 0 0 1px #fffd;
  opacity: 0.6;
  z-index: -1;
}

.widget * {
  border-radius: var(--window-border-radius) !important;
}

.music > div > img {
  border-radius: 100% !important;
}

/* === WIDGET HEADERS === */
.widget h3, .page-title {
  color: var(--foreground);
  text-shadow: 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff;
}

.dark .widget h3, .dark .page-title {
  color: var(--foreground);
  text-shadow: 0 0 10px #000, 0 0 10px #000, 0 0 10px #000, 0 0 10px #000, 0 0 10px #000, 0 0 10px #000, 0 0 10px #000, 0 0 10px #000;
}

@media (max-width: 768px) {
  .nav {
    gap: 0;
  }

  .header {
    position: static;
    backdrop-filter: none;
    background-color: var(--window-background-color);
  }

  .header::before {
    display: none;
  }
}