/* Day One Desktop - Bright illustrated style */

@font-face { font-family: 'DM Sans'; src: url('/static/day_one/fonts/DMSans-Light.ttf') format('truetype'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/static/day_one/fonts/DMSans-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/static/day_one/fonts/DMSans-Medium.ttf') format('truetype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/static/day_one/fonts/DMSans-SemiBold.ttf') format('truetype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/static/day_one/fonts/DMSans-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Tiempos'; src: url('/static/day_one/fonts/TiemposText-Semibold.otf') format('opentype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Tiempos'; src: url('/static/day_one/fonts/TiemposText-SemiboldItalic.otf') format('opentype'); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: 'Cascadia Code'; src: url('/static/day_one/fonts/CascadiaCode-VariableFont_wght.ttf') format('truetype'); font-weight: 200 700; font-style: normal; font-display: swap; }

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Mobile Gate */
.mobile-gate {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #FFD5FF;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.mobile-gate-content {
  text-align: center;
  color: #2D2D2D;
  max-width: 400px;
}

.mobile-gate-icon {
  color: #0254EC;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
}

.mobile-gate h1 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.mobile-gate p {
  color: #555;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.mobile-gate-hint {
  font-size: 0.875rem;
  color: #888;
}

/* Desktop */
.desktop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #FFD5FF;
  background-image: url('/static/day_one/assets/BG+Elements.svg');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

/* System Bar */
.system-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: #F595F5;
  border-bottom: 3px solid #2D2D2D;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 1000;
  user-select: none;
}

.system-bar-left,
.system-bar-right {
  flex: 1;
  display: flex;
  align-items: center;
}

.system-bar-right {
  justify-content: flex-end;
}

.system-bar-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.system-bar-logo {
  font-family: 'Tiempos', Georgia, serif;
  font-weight: 600;
  font-style: italic;
  font-size: 32px;
  color: #2D2D2D;
}

.system-bar-logo-img {
  height: 24px;
  width: auto;
  filter: brightness(0);
}

.system-bar-title {
  font-size: 14px;
  font-weight: 600;
  color: #2D2D2D;
}

.system-bar-time {
  font-size: 14px;
  font-weight: 500;
  color: #2D2D2D;
}

/* Windows Container */
.windows-container {
  position: fixed;
  top: 48px;
  left: 0;
  right: 0;
  bottom: 110px;
  overflow: hidden;
}

/* Dock */
.dock {
  position: fixed;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
}

.dock-container {
  display: flex;
  align-items: flex-end;
  gap: 28px;
  padding: 8px 16px;
  background: transparent;
  border-radius: 0;
  border: none;
}

.dock-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease;
}

.dock-item:hover {
  transform: scale(1.15) translateY(-4px);
}

.dock-item:active {
  transform: scale(1.05);
}

.dock-icon {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  box-shadow: none;
  background: none !important;
}

.dock-icon img {
  width: 70px;
  height: 70px;
}

.dock-icon svg {
  width: 28px;
  height: 28px;
}

.dock-icon-terminal,
.dock-icon-browser,
.dock-icon-notes,
.dock-icon-flag {
  background: none;
}

.dock-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
  margin-top: 4px;
  transition: background 0.2s ease;
}

.dock-indicator.active {
  background: #CC8FCC;
  border: 1px solid #2D2D2D;
}

.dock-divider {
  width: 1px;
  height: 40px;
  background: rgba(45, 45, 45, 0.3);
  margin: 0 4px;
}

/* Window */
.window {
  position: absolute;
  min-width: 400px;
  min-height: 300px;
  background: #2D2D2D;
  border-radius: 0;
  border: 3px solid #2D2D2D;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  overflow: visible;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.window.dragging iframe,
.window.resizing iframe {
  pointer-events: none;
}

.window.focused {
  box-shadow: none;
}

.window.minimized {
  display: none;
}

.window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: 0;
}

/* Window Titlebar */
.window-titlebar {
  height: 42px;
  background: #0254EC;
  border-bottom: 3px solid #2D2D2D;
  border-radius: 0;
  display: flex;
  align-items: center;
  padding: 0 14px;
  cursor: default;
  user-select: none;
  flex-shrink: 0;
}

.window.focused .window-titlebar {
  background: #0254EC;
}

.window:not(.focused) .window-titlebar {
  background: #6197FF;
}

.window-controls {
  display: flex;
  gap: 6px;
}

.window-controls-spacer {
  width: 68px;
}

.window-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #2D2D2D;
  cursor: pointer;
  background: #FFD5FF;
  transition: opacity 0.15s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.window-btn:hover {
  opacity: 0.85;
}

.window-btn-close {
  background: #FFD5FF;
}

.window-btn-minimize {
  background: #FFD5FF;
}

.window-btn-maximize {
  background: #FFD5FF;
}

.window-btn-close::after {
  content: "\00D7";
  font-size: 14px;
  font-weight: 700;
  color: #2D2D2D;
  line-height: 1;
}

.window-btn-minimize::after {
  content: "\2013";
  font-size: 12px;
  font-weight: 700;
  color: #2D2D2D;
  line-height: 1;
}

.window-btn-maximize::after {
  content: "";
  width: 8px;
  height: 8px;
  border: 1px solid #2D2D2D;
  border-radius: 1px;
}

.window:not(.focused) .window-btn {
  background: #FFD5FF;
  border-color: #2D2D2D;
}

.window:not(.focused) .window-btn::after {
  color: #2D2D2D;
}

.window-title {
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.window:not(.focused) .window-title {
  color: rgba(255, 255, 255, 0.7);
}

/* Window Content */
.window-content {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: #2D2D2D;
  border-radius: 0;
  user-select: text;
  -webkit-user-select: text;
}

.window-content::-webkit-scrollbar {
  width: 14px;
  display: block;
}
.window-content::-webkit-scrollbar-track {
  background: #FFFFFF;
}
.window-content::-webkit-scrollbar-thumb {
  background: #FFD5FF;
  border: 3px solid #FFFFFF;
  border-radius: 7px;
}
.window-content::-webkit-scrollbar-thumb:hover {
  background: #F0A0F0;
}

/* Corner Resize Handles */
.resize-handle {
  position: absolute;
  width: 20px;
  height: 20px;
  z-index: 20;
}

.resize-handle-se {
  bottom: 0;
  right: 0;
  cursor: se-resize;
}

.resize-handle-sw {
  bottom: 0;
  left: 0;
  cursor: sw-resize;
}

.resize-handle-ne {
  top: 0;
  right: 0;
  cursor: ne-resize;
}

.resize-handle-nw {
  top: 0;
  left: 0;
  cursor: nw-resize;
}

/* Terminal Window Styles */
.terminal-window .window-content {
  background: #1E1D26;
  padding: 0;
}

.terminal-window #terminal-container {
  width: 100%;
  height: 100%;
}

.terminal-window .xterm-viewport {
  overflow-y: auto !important;
}
.terminal-window .xterm-viewport::-webkit-scrollbar {
  width: 14px;
}
.terminal-window .xterm-viewport::-webkit-scrollbar-track {
  background: #1E1D26;
}
.terminal-window .xterm-viewport::-webkit-scrollbar-thumb {
  background: #FFD5FF;
  border: 3px solid #1E1D26;
  border-radius: 7px;
}
.terminal-window .xterm-viewport::-webkit-scrollbar-thumb:hover {
  background: #F0A0F0;
}

/* Browser Window Styles */
.browser-window .window-content {
  display: flex;
  flex-direction: column;
  background: transparent;
  border-radius: 0;
}

.browser-chrome {
  display: none;
}

.browser-iframe-container {
  flex: 1;
  position: relative;
}

.browser-iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Notes Window Styles */
.notes-window {
  min-width: 560px;
}

.notes-window .window-content {
  background: #FFFFFF;
  padding: 0;
  overflow: hidden;
  font-size: 13px;
}
.notes-window .window-content > div {
  padding: 20px 24px;
  padding-right: 16px;
  overflow-y: scroll !important;
}
.notes-window .window-content > div::-webkit-scrollbar {
  width: 14px;
  display: block;
}
.notes-window .window-content > div::-webkit-scrollbar-track {
  background: #FFFFFF;
}
.notes-window .window-content > div::-webkit-scrollbar-thumb {
  background: #FFD5FF;
  border: 3px solid #FFFFFF;
  border-radius: 7px;
}
.notes-window .window-content > div::-webkit-scrollbar-thumb:hover {
  background: #F0A0F0;
}

.notes-header {
  font-size: 16px;
  font-weight: 600;
  color: #2D2D2D;
  margin-bottom: 12px;
}

.notes-header .wiznt-logo {
  display: inline !important;
  height: 14px;
  width: auto;
  vertical-align: baseline;
  margin: 0 1px;
}

.notes-body {
  color: #2D2D2D;
  line-height: 1.7;
}

.notes-body p {
  margin-bottom: 12px;
}

.notes-body .welcome-section {
  margin-bottom: 24px;
}

.notes-body .welcome-section .quote-block {
  background: #FFE0FF;
  padding: 2px 6px;
  border-radius: 3px;
  margin-bottom: 12px;
  display: inline-block;
}

.notes-body .welcome-section .quote-block p {
  margin-bottom: 0;
}

.notes-body h3 {
  font-size: 14px;
  font-weight: 700;
  color: #2D2D2D;
  margin-bottom: 8px;
  margin-top: 20px;
}

.notes-body ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.notes-body li {
  padding: 8px 0;
  border-bottom: 1px dashed #eee;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notes-body li:last-child {
  border-bottom: none;
}

.notes-body .task-icon {
  width: 16px;
  height: 16px;
  color: #0254EC;
  flex-shrink: 0;
}

.notes-body .challenge-list {
  background: #FFE0FF;
  padding: 16px;
  border-radius: 0;
  border: 1px solid #FFD5FF;
  margin-top: 12px;
}

.notes-body .challenge-title {
  font-weight: 600;
  font-style: italic;
  color: #0254EC;
  margin-bottom: 8px;
}

/* Flag Submission Modal */
.flag-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.flag-modal-content {
  background: #2D2D2D;
  border-radius: 0;
  border: 3px solid #2D2D2D;
  box-shadow: none;
  width: 100%;
  max-width: 520px;
  overflow: hidden;
}

.flag-modal-titlebar {
  height: 42px;
  background: #0254EC;
  border-bottom: 3px solid #2D2D2D;
  border-radius: 0;
  display: flex;
  align-items: center;
  padding: 0 14px;
  position: relative;
}

.flag-modal-titlebar .window-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #2D2D2D;
  background: #FFD5FF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flag-modal-titlebar .window-btn::after {
  content: "\00D7";
  font-size: 14px;
  font-weight: 700;
  color: #2D2D2D;
  line-height: 1;
}

.flag-modal-titlebar-title {
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.flag-modal-titlebar-spacer {
  width: 20px;
}

.flag-modal-header {
  display: none;
}

.flag-modal-body {
  padding: 24px;
}

.flag-modal-challenge {
  color: #aaa;
  font-size: 14px;
  margin-bottom: 16px;
}

.flag-input-group {
  display: flex;
  gap: 12px;
}

.flag-input {
  flex: 1;
  background: #fff;
  border: 3px solid #2D2D2D;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 14px;
  color: #2D2D2D;
  font-family: 'Cascadia Code', 'Menlo', 'Monaco', 'Courier New', monospace;
}

.flag-input:focus {
  outline: none;
  border-color: #0254EC;
}

.flag-input::placeholder {
  color: #999;
}

.flag-submit-btn {
  background: #FFD5FF;
  color: #2D2D2D;
  border: 3px solid #2D2D2D;
  border-radius: 6px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.flag-submit-btn:hover {
  background: #FFE6FF;
}

.flag-result {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
}

.flag-result.success {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.flag-result.error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Boot Screen */
.boot-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #FFD5FF;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.boot-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-content {
  text-align: center;
}

.boot-logo {
  margin-bottom: 40px;
}

.boot-logo-main {
  display: block;
  font-family: 'Tiempos', Georgia, serif;
  font-size: 48px;
  font-weight: 600;
  font-style: italic;
  letter-spacing: 2px;
  color: #2D2D2D;
}

.boot-logo-main-img {
  display: block;
  height: 40px;
  width: auto;
  margin: 0 auto;
}

.boot-logo-sub {
  display: block;
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 8px;
  color: rgba(45, 45, 45, 0.6);
  margin-top: 8px;
}

.boot-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 24px;
  border: 3px solid rgba(45, 45, 45, 0.15);
  border-top-color: #0254EC;
  border-radius: 50%;
  animation: bootSpin 1s linear infinite;
}

@keyframes bootSpin {
  to { transform: rotate(360deg); }
}

.boot-text {
  font-size: 14px;
  color: rgba(45, 45, 45, 0.5);
  letter-spacing: 1px;
}

/* Custom cursor */
.desktop,
.desktop * {
  cursor: url('/static/day_one/assets/Cursor.svg') 4 0, auto;
}
