:root {
  --os-font-ui: "LucidaGrande", "Lucida Grande", "Hiragino Sans",
    "Hiragino Sans GB", "Heiti SC", ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, sans-serif;
  --os-font-mono: Monaco, Menlo, monospace;
  --os-color-window-bg: #ececec;
  --os-color-menubar-bg: linear-gradient(to bottom, #f8f8f8, #d4d4d4);
  --os-color-menubar-border: rgba(0, 0, 0, 0.44);
  --os-color-menubar-text: #000000;
  --os-color-window-border: rgba(0, 0, 0, 0.4);
  --os-color-window-border-inactive: rgba(0, 0, 0, 0.08);
  --os-color-titlebar-border: rgba(0, 0, 0, 0.3);
  --os-color-titlebar-border-inactive: rgba(0, 0, 0, 0.2);
  --os-color-titlebar-active-bg: linear-gradient(
    to bottom,
    #e8e8e8 0%,
    #d0d0d0 100%
  );
  --os-color-titlebar-inactive-bg: linear-gradient(to bottom, #f6f6f6, #e0e0e0);
  --os-color-titlebar-text: #000000;
  --os-color-titlebar-text-inactive: #7f7f7f;
  --os-color-button-face: #ffffff;
  --os-color-button-highlight: #ffffff;
  --os-color-button-shadow: rgba(0, 0, 0, 0.4);
  --os-color-button-active-face: #e0e0e0;
  --os-color-traffic-light-close: #4a0a07;
  --os-color-traffic-light-minimize: #7a5915;
  --os-color-traffic-light-maximize: #10541a;
  --os-color-selection-bg: rgba(39, 101, 202, 0.88);
  --os-color-selection-text: #ffffff;
  --os-color-selection-glow: rgba(48, 103, 218, 0.5);
  --os-color-text-primary: #000000;
  --os-color-text-secondary: #4b4b4b;
  --os-color-text-disabled: #999999;
  --os-metrics-border-width: 0.5px;
  --os-metrics-titlebar-border-width: 1px;
  --os-metrics-radius: 0.45rem;
  --os-metrics-titlebar-height: 1.375rem;
  --os-metrics-menubar-height: 1.5rem;
  --os-window-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  --os-texture-toolbar-image: url("/assets/brushed-metal.jpg");
  --os-texture-toolbar-size: cover;
  --os-texture-toolbar-repeat: no-repeat;
  --os-texture-toolbar-position: center;
  --os-pinstripe-titlebar: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(219, 219, 219, 0.6) 70%,
    rgba(206, 206, 206, 0.7) 100%
  );
  --os-pinstripe-window: repeating-linear-gradient(
      0deg,
      transparent 0px,
      transparent 1.5px,
      rgba(255, 255, 255, 0.85) 1.5px,
      rgba(255, 255, 255, 0.85) 4px
    ),
    linear-gradient(to bottom, #ececec 0%, #ececec 100%);
  --os-pinstripe-menubar: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 1.5px,
    rgba(255, 255, 255, 0.55) 1.5px,
    rgba(255, 255, 255, 0.55) 4px
  );
}

.aqua-button {
  line-height: 1;
  height: 28px;
  padding: 0 16px;
  min-width: auto;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  cursor: default;
  outline: none;
  border: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
  font-smooth: auto;
}

.aqua-button.primary {
  background: linear-gradient(
    rgba(0, 65, 184, 0.625),
    rgba(45, 115, 199, 0.625),
    rgba(33, 160, 196, 0.625)
  );
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3), 0 1px 1px rgba(0, 78, 187, 0.5),
    inset 0 1px 3px rgba(0, 17, 49, 0.8),
    inset 0 2px 3px 1px rgba(0, 78, 187, 0.75);
}

.aqua-button.primary:focus,
.aqua-button.primary:active {
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3), 0 1px 1px rgba(0, 78, 187, 0.5),
    inset 0 1px 3px rgba(0, 17, 49, 0.8),
    inset 0 2px 3px 1px rgba(0, 78, 187, 0.75), 0 0 3px rgba(52, 106, 227, 0.5);
}

.aqua-button.primary:active {
  background: linear-gradient(
    rgba(0, 45, 144, 0.725),
    rgba(25, 95, 179, 0.725),
    rgba(13, 140, 176, 0.725)
  );
}

.aqua-button.secondary {
  background: linear-gradient(
    rgba(160, 160, 160, 0.625),
    rgba(255, 255, 255, 0.625)
  );
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2), 0 1px 1px rgba(0, 0, 0, 0.3),
    inset 0 1px 2px rgba(0, 0, 0, 0.4), inset 0 2px 3px 1px #bbbbbb;
}

.aqua-button.secondary:focus,
.aqua-button.secondary:active {
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.2), 0 1px 1px rgba(0, 0, 0, 0.3),
    inset 0 1px 2px rgba(0, 0, 0, 0.4), inset 0 2px 3px 1px #bbbbbb,
    0 0 3px rgba(0, 0, 0, 0.25);
}

.aqua-button.secondary:active {
  background: linear-gradient(
    rgba(0, 45, 144, 0.725),
    rgba(25, 95, 179, 0.725),
    rgba(13, 140, 176, 0.725)
  );
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3), 0 1px 1px rgba(0, 78, 187, 0.5),
    inset 0 1px 3px rgba(0, 17, 49, 0.8),
    inset 0 2px 3px 1px rgba(0, 78, 187, 0.75), 0 0 3px rgba(52, 106, 227, 0.5);
}

.aqua-button:before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  height: 33%;
  max-height: 12px;
  background: linear-gradient(
    rgba(255, 255, 255, 0.9),
    rgba(255, 255, 255, 0.3)
  );
  width: calc(100% - 10px);
  border-radius: 12px 12px 2px 2px;
  top: 2px;
  filter: blur(0.5px);
  z-index: 2;
  pointer-events: none;
}

.aqua-button:after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  height: 33%;
  background: linear-gradient(rgba(255, 255, 255, 0), rgb(255, 255, 255, 0.5));
  width: calc(100% - 8px);
  border-radius: 4px;
  bottom: 2px;
  filter: blur(1px);
  pointer-events: none;
}

.aqua-button span,
.aqua-button {
  position: relative;
  z-index: 3;
  font-weight: 500;
}

.aqua-button.primary span,
.aqua-button.primary {
  text-shadow: 0 2px 2px rgba(30, 77, 161, 0.5);
  color: black;
}

.aqua-button.secondary span,
.aqua-button.secondary {
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.25);
  color: black;
}

.aqua-tab {
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 6px 6px 0 0;
  overflow: hidden;
  height: 28px;
  margin-top: 4px;
  background: linear-gradient(rgb(197 197 197), rgb(255 255 255));
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1),
    inset 0 2px 3px 1px rgba(187, 187, 187, 0.8), 0 1px 1px rgba(0, 0, 0, 0.3);
  color: black;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.25);
  font-size: 12px !important;
  cursor: default;
}

.aqua-tab:hover:not([data-state="active"]) {
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05),
    inset 0 2px 3px 1px rgba(187, 187, 187, 0.6), 0 1px 1px rgba(0, 0, 0, 0.2);
}

.aqua-tab[data-state=active] {
    z-index: 10;
    text-shadow: 0 2px 2px #1e4da180;
    transition: border-bottom 0;
    background: linear-gradient(#307bc9, #98bde4, #d2ffff);
    margin-top: 0;
    box-shadow: 0 0 #0000!important;
    border-bottom: 1px solid #d2ffff !important;
}

.aqua-tab:before {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  top: 1px;
  height: 15%;
  background: linear-gradient(
    rgba(255, 255, 255, 0.55),
    rgba(255, 255, 255, 0.25)
  );
  border-radius: 4px 4px 0 0;
  pointer-events: none;
  z-index: 10;
}

.aqua-tab:after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 0px;
  height: 20%;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.35));
  border-radius: 0 0 2px 2px;
  pointer-events: none;
  z-index: 10;
  filter: blur(1px);
}

.aqua-tab[data-state="active"]:before {
  background: linear-gradient(
    rgba(255, 255, 255, 0.8),
    rgba(255, 255, 255, 0.35)
  );
}

.aqua-tab[data-state="active"]:after {
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.45));
}

.aqua-tab-bar {
  justify-content: flex-start;
  position: relative;
  border-radius: 0 !important;
  align-items: flex-end !important;
  padding-bottom: 0 !important;
  padding: 0.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 0px;
  background-color: hsl(0 0% 89%)
  color: hsl(0 0% 45.1%);
  display: flex;
}

.aqua-tab-bar:after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 6px;
  z-index: 3;
  background: linear-gradient(
    to bottom,
    #2260a4 0%,
    #e2fbfd 8%,
    #aecef3 25%,
    #7aafee 40%,
    #98ceff 60%,
    #9dcfff 80%,
    #74deff 100%
  );
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.aqua-tab-content {
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-top: none;
  background: transparent;
}

.candycane-progress {
  position: relative;
  height: 16px;
  background: linear-gradient(#d0d0d0, #f5f5f5);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18),
    inset 0 1px 2px rgba(0, 0, 0, 0.12), 0 1px 0 rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  overflow: hidden;
}

.candycane-fill {
  height: 100%;
  background: 
    linear-gradient(
      45deg,
      transparent 0%,
      transparent 25%,
      rgba(255, 255, 255, 1.0) 25%,
      rgba(255, 255, 255, 1.0) 50%,
      transparent 50%,
      transparent 75%,
      rgba(255, 255, 255, 1.0) 75%,
      rgba(255, 255, 255, 1.0) 100%
    ),
    linear-gradient(
      to bottom,
      #2260a4 0%,
      #e2fbfd 8%,
      #aecef3 25%,
      #7aafee 40%,
      #98ceff 60%,
      #9dcfff 80%,
      #74deff 100%
    );
  background-size: 20px 20px, 100% 100%;
  border-radius: 7px;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(0, 0, 0, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.3);
  animation: candycane-move 1s linear infinite;
}

@keyframes candycane-move {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 20px 0;
  }
}

.candycane-text {
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
  color: var(--os-color-text-secondary);
  font-family: var(--os-font-ui);
}

body {
  font-family: var(--os-font-ui) !important;
  -webkit-font-smoothing: antialiased !important;
  font-smooth: auto !important;
  font-size: 12px !important;
}

* {
  font-family: inherit;
}

.shadow-os-window {
  box-shadow: var(--os-window-shadow);
}

.shadow-os-window.is-foreground {
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
}

.no-select {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  cursor: default;
}

body {
    margin: 0;
    padding: 20px;
    background: linear-gradient(to bottom, #dbe6f2, #bed8f2);
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.window {
    width: 550px;
    min-height: 450px;
    border: var(--os-metrics-border-width) solid var(--os-color-window-border);
    border-radius: var(--os-metrics-radius);
    overflow: hidden;
    background-color: var(--os-color-window-bg);
    background-image: var(--os-pinstripe-window);
}

.title-bar {
    height: var(--os-metrics-titlebar-height);
    background: var(--os-color-titlebar-active-bg);
    background-image: var(--os-pinstripe-titlebar);
    border-bottom: var(--os-metrics-titlebar-border-width) solid var(--os-color-titlebar-border);
    display: flex;
    align-items: center;
    padding: 0 8px;
    position: relative;
}

.traffic-lights {
    display: flex;
    gap: 8px;
    margin-left: 4px;
}

.traffic-light {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.traffic-light::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 6px);
    height: 28%;
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.3));
    border-radius: 6px 6px 0 0;
    filter: blur(0.2px);
    z-index: 2;
}

.traffic-light::after {
    content: '';
    position: absolute;
    bottom: 1px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 3px);
    height: 33%;
    background: linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.5));
    border-radius: 0 0 6px 6px;
    filter: blur(0.3px);
}

.close {
    background: linear-gradient(rgb(193, 58, 45), rgb(205, 73, 52));
    box-shadow: 
        rgba(0, 0, 0, 0.5) 0px 2px 4px,
        rgba(0, 0, 0, 0.4) 0px 1px 2px,
        rgba(225, 70, 64, 0.5) 0px 1px 1px,
        rgba(0, 0, 0, 0.3) 0px 0px 0px 0.5px inset,
        rgba(150, 40, 30, 0.8) 0px 1px 3px inset,
        rgba(225, 70, 64, 0.75) 0px 2px 3px 1px inset;
}

.minimize {
    background: linear-gradient(rgb(202, 130, 13), rgb(253, 253, 149));
    box-shadow: 
        rgba(0, 0, 0, 0.5) 0px 2px 4px,
        rgba(0, 0, 0, 0.4) 0px 1px 2px,
        rgba(223, 161, 35, 0.5) 0px 1px 1px,
        rgba(0, 0, 0, 0.3) 0px 0px 0px 0.5px inset,
        rgb(155, 78, 21) 0px 1px 3px inset,
        rgb(241, 157, 20) 0px 2px 3px 1px inset;
}

.maximize {
    background: linear-gradient(rgb(111, 174, 58), rgb(138, 192, 50));
    box-shadow: 
        rgba(0, 0, 0, 0.5) 0px 2px 4px,
        rgba(0, 0, 0, 0.4) 0px 1px 2px,
        rgba(59, 173, 29, 0.5) 0px 1px 1px,
        rgba(0, 0, 0, 0.3) 0px 0px 0px 0.5px inset,
        rgb(53, 91, 17) 0px 1px 3px inset,
        rgb(98, 187, 19) 0px 2px 3px 1px inset;
}

.window-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    font-weight: 500;
    color: var(--os-color-titlebar-text);
    text-shadow: rgba(0, 0, 0, 0.25) 0px 2px 3px;
    white-space: nowrap;
}

.window-content {
    padding: 20px;
    height: calc(100% - var(--os-metrics-titlebar-height) - var(--os-metrics-titlebar-border-width));
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--os-color-text-primary);
}

.text-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 2px;
    font-size: 12px;
    font-family: var(--os-font-ui);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 
        rgba(0, 0, 0, 0.1) 0px 1px 2px inset,
        rgba(255, 255, 255, 0.5) 0px 1px 0px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.text-input:focus {
    outline: none;
    border-color: rgba(59, 153, 252, 0.8);
    box-shadow: 
        rgba(0, 0, 0, 0.1) 0px 1px 2px inset,
        var(--os-color-selection-glow) 0px 0px 0px 3px;
}

.select-input {
    padding: 4px 6px;
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 2px;
    font-size: 11px;
    font-family: var(--os-font-ui);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 
        rgba(0, 0, 0, 0.1) 0px 1px 2px inset,
        rgba(255, 255, 255, 0.5) 0px 1px 0px;
    cursor: pointer;
    min-width: 100px;
}

.select-input:focus {
    outline: none;
    border-color: rgba(59, 153, 252, 0.8);
    box-shadow: 
        rgba(0, 0, 0, 0.1) 0px 1px 2px inset,
        var(--os-color-selection-glow) 0px 0px 0px 3px;
}

.checkbox-input {
    width: 13px;
    height: 13px;
    cursor: pointer;
    vertical-align: middle;
}

.options-row {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-top: 8px;
}

.textarea {
    min-height: 120px;
    resize: vertical;
    font-family: var(--os-font-mono);
    flex: 1;
}

.button-group {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: flex-end;
}

.info-text {
    font-size: 11px;
    color: var(--os-color-text-secondary);
    font-family: var(--os-font-ui);
}

.drop-zone {
    border: 2px dashed rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.2s;
    min-height: 119px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-zone:hover {
    border-color: var(--os-color-selection-bg);
    background: rgba(255, 255, 255, 0.7);
}

.drop-zone.dragover {
    border-color: var(--os-color-selection-bg);
    background: var(--os-color-selection-bg);
    color: var(--os-color-selection-text);
}

.file-info {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    padding: 12px;
    margin-top: 16px;
}

.view-content {
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.9);
    max-height: 300px;
    overflow: auto;
    margin-top: 1rem;
}

.code-view {
    font-family: var(--os-font-mono);
    font-size: 11px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.media-view {
    text-align: center;
}

.media-view img, .media-view video, .media-view audio {
    max-width: 100%;
    border-radius: 4px;
}

.hidden {
    display: none;
}

.url-display {
    background: rgba(240, 240, 240, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    padding: 8px 12px;
    font-family: var(--os-font-mono);
    font-size: 11px;
    margin-bottom: 12px;
    word-wrap: break-word;
    word-break: break-all;
    white-space: normal;
    min-height: 36px;
    line-height: 1.5;
    cursor: pointer;
}

.url-display:hover {
    background: rgba(230, 230, 230, 0.8);
}

.tab-content {
    height: calc(100% - 40px);
    overflow-y: auto;
}

.tab-content-inner {
    padding: 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 320px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-overlay.hidden {
    display: none;
}

.modal-window {
    width: 400px;
    min-height: 150px;
    border: var(--os-metrics-border-width) solid var(--os-color-window-border);
    border-radius: var(--os-metrics-radius);
    overflow: hidden;
    background-color: var(--os-color-window-bg);
    background-image: var(--os-pinstripe-window);
}

.modal-content {
    padding: 20px;
}

.modal-message {
    margin-bottom: 20px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--os-color-text-primary);
    white-space: pre-line;
}

.modal-window .button-group {
    justify-content: center;
    margin-top: 0;
}

.traffic-light.disabled {
    opacity: 0.3;
    cursor: default;
}

.footer-info {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-link {
    cursor: pointer;
    text-decoration: underline;
}

.footer-link:hover {
    color: rgba(0, 0, 0, 0.7);
}

.footer-separator {
    color: rgba(0, 0, 0, 0.3);
}