/* ============================================================
   1. GOOGLE CHROME
   ============================================================ */
.chrome-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  color: #202124;
}

[data-theme="dark"] .chrome-app {
  background: #202124;
  color: #e8eaed;
}

.chrome-tabbar {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 6px 8px 0;
  background: #dee1e6;
  height: 38px;
  flex-shrink: 0;
  overflow-x: auto;
}

[data-theme="dark"] .chrome-tabbar {
  background: #171717;
}

.chrome-tab {
  height: 32px;
  min-width: 110px;
  max-width: 220px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border-radius: 8px 8px 0 0;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.12s ease;
  position: relative;
}

.chrome-tab:hover {
  background: rgba(255, 255, 255, 0.45);
}

[data-theme="dark"] .chrome-tab:hover {
  background: rgba(255, 255, 255, 0.08);
}

.chrome-tab.active {
  background: #fff;
  box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .chrome-tab.active {
  background: #292a2d;
}

.chrome-tab-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chrome-tab-close {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: transparent;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.chrome-tab-close:hover {
  background: rgba(0, 0, 0, 0.12);
}

.chrome-new-tab-btn {
  width: 28px;
  height: 28px;
  margin-bottom: 2px;
  border-radius: 50%;
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chrome-new-tab-btn:hover {
  background: rgba(0, 0, 0, 0.09);
}

.chrome-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

[data-theme="dark"] .chrome-toolbar {
  background: #292a2d;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.chrome-nav-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chrome-nav-btn:hover {
  background: var(--bg-hover);
}

.chrome-omnibox {
  flex: 1;
  height: 30px;
  border-radius: 16px;
  background: #f1f3f4;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
}

[data-theme="dark"] .chrome-omnibox {
  background: #202124;
}

.chrome-omnibox:focus-within {
  background: #fff;
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.22);
}

[data-theme="dark"] .chrome-omnibox:focus-within {
  background: #171717;
}

.chrome-omnibox input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
}

.chrome-bookmarks {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  overflow-x: auto;
  flex-shrink: 0;
}

[data-theme="dark"] .chrome-bookmarks {
  background: #292a2d;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.chrome-bm-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 12px;
  border: none;
  background: transparent;
  font-size: 11.5px;
  cursor: pointer;
  white-space: nowrap;
}

.chrome-bm-btn:hover {
  background: var(--bg-hover);
}

.chrome-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.chrome-iframe-banner {
  background: #fef7e0;
  color: #5f4b00;
  padding: 6px 12px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f6dfa0;
  flex-shrink: 0;
}

.chrome-iframe-banner a {
  color: #1a73e8;
  font-weight: 600;
  text-decoration: none;
}

.chrome-iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: #fff;
}

/* Chrome New Tab Page */
.chrome-ntp {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

.chrome-google-logo {
  font-size: 56px;
  font-weight: 600;
  letter-spacing: -2px;
  margin-bottom: 24px;
  user-select: none;
}

.chrome-ntp-search {
  width: min(540px, 90%);
  height: 44px;
  border-radius: 24px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 10px;
  margin-bottom: 28px;
}

[data-theme="dark"] .chrome-ntp-search {
  background: #303134;
  border-color: rgba(255, 255, 255, 0.12);
}

.chrome-ntp-search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14.5px;
}

.chrome-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, 92px);
  gap: 12px;
}

.chrome-shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 6px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.chrome-shortcut:hover {
  background: var(--bg-hover);
}

.chrome-sc-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f1f3f4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

[data-theme="dark"] .chrome-sc-icon {
  background: #303134;
}

/* ============================================================
   2. FILE EXPLORER
   ============================================================ */
.explorer-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-surface);
}

.exp-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface-2);
}

.exp-btn {
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid transparent;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.exp-btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-subtle);
}

.exp-nav-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.exp-path-bar {
  flex: 1;
  height: 30px;
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  background: var(--bg-surface-2);
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 12.5px;
  gap: 6px;
}

.exp-search {
  width: 190px;
  height: 30px;
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  background: var(--bg-surface-2);
  padding: 0 10px;
  font-size: 12.5px;
  outline: none;
}

.exp-body {
  flex: 1;
  display: grid;
  grid-template-columns: 190px 1fr;
  overflow: hidden;
}

.exp-sidebar {
  border-right: 1px solid var(--border-subtle);
  padding: 8px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.exp-side-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 5px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 12.5px;
  text-align: left;
}

.exp-side-item:hover, .exp-side-item.active {
  background: var(--bg-hover);
}

.exp-side-item.active {
  font-weight: 600;
  color: var(--accent);
}

.exp-side-item img {
  width: 18px;
  height: 18px;
}

.exp-main {
  padding: 14px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  align-content: start;
  gap: 8px;
}

.exp-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: default;
  text-align: center;
}

.exp-item:hover {
  background: var(--bg-hover);
}

.exp-item.selected {
  background: var(--accent-light);
  border-color: var(--accent);
}

.exp-item img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.exp-item span {
  font-size: 12px;
  word-break: break-word;
}

.exp-statusbar {
  height: 26px;
  padding: 0 12px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* ============================================================
   3. SETTINGS
   ============================================================ */
.settings-app {
  display: grid;
  grid-template-columns: 220px 1fr;
  height: 100%;
  background: var(--bg-surface-2);
}

.set-sidebar {
  padding: 14px 10px;
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
}

.set-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  margin-bottom: 10px;
}

.set-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
}

.set-nav-btn {
  padding: 9px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.set-nav-btn:hover {
  background: var(--bg-hover);
}

.set-nav-btn.active {
  background: var(--bg-active);
  font-weight: 600;
  position: relative;
}

.set-nav-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}

.set-content {
  padding: 24px 28px;
  overflow-y: auto;
}

.set-page-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 18px;
}

.set-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.set-card strong {
  display: block;
  font-size: 13.5px;
  margin-bottom: 2px;
}

.set-card small {
  color: var(--text-secondary);
  font-size: 12px;
}

.wp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.wp-thumb {
  height: 76px;
  border-radius: 7px;
  background-size: cover;
  background-position: center;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.wp-thumb:hover { transform: scale(1.03); }
.wp-thumb.active { border-color: var(--accent); }

.set-btn {
  padding: 7px 14px;
  border-radius: 5px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface-2);
  cursor: pointer;
  font-size: 12.5px;
}

.set-btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

/* ============================================================
   4. NOTEPAD
   ============================================================ */
.notepad-app {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.np-menubar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface-2);
}

.np-menubar button {
  padding: 4px 10px;
  border: none;
  border-radius: 4px;
  background: transparent;
  font-size: 12.5px;
  cursor: pointer;
}

.np-menubar button:hover {
  background: var(--bg-hover);
}

.np-editor {
  flex: 1;
  border: none;
  resize: none;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  background: var(--bg-surface);
  outline: none;
}

.np-status {
  height: 26px;
  padding: 0 14px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* ============================================================
   5. CALCULATOR
   ============================================================ */
.calc-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 10px;
  background: var(--bg-surface-2);
}

.calc-display {
  padding: 16px 12px 12px;
  text-align: right;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 106px;
}

.calc-expr {
  font-size: 13px;
  color: var(--text-secondary);
  min-height: 20px;
}

.calc-val {
  font-size: 40px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calc-keys {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.calc-key {
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.1s ease;
}

.calc-key:hover { background: var(--bg-hover); }
.calc-key.op { background: var(--bg-surface-3); font-size: 15px; }
.calc-key.eq { background: var(--accent); color: #fff; border-color: transparent; }

/* ============================================================
   6. TERMINAL
   ============================================================ */
.term-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #0c0c0c;
  color: #cccccc;
  font-family: var(--font-mono);
  font-size: 13.5px;
  padding: 12px 14px;
  overflow-y: auto;
  cursor: text;
}

.term-output {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

.term-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.term-prompt {
  color: #60cdff;
  white-space: nowrap;
}

.term-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: inherit;
  font-size: inherit;
}

/* ============================================================
   7. PAINT
   ============================================================ */
.paint-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-surface-2);
}

.paint-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.paint-bar button {
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  cursor: pointer;
  font-size: 12px;
}

.paint-bar button.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.paint-canvas-wrap {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--bg-surface-3);
}

.paint-canvas {
  background: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
  cursor: crosshair;
}

/* ============================================================
   8. PHOTOS, CLOCK & TASK MANAGER
   ============================================================ */
.photos-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #141414;
  color: #fff;
}

.photos-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #1f1f1f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.photos-toolbar button {
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
}

.photos-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 16px;
}

.photos-stage img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
  transition: transform 0.25s ease;
}

.photos-strip {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: #1b1b1b;
  overflow-x: auto;
}

.photos-strip img {
  width: 68px;
  height: 44px;
  object-fit: cover;
  border-radius: 5px;
  cursor: pointer;
  opacity: 0.65;
  border: 2px solid transparent;
}

.photos-strip img.active {
  opacity: 1;
  border-color: #60cdff;
}

.tm-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 14px;
  gap: 14px;
  overflow-y: auto;
}

.tm-graphs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.tm-card {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 12px;
}

.tm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.tm-table th, .tm-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

.clock-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 18px;
  padding: 20px;
  text-align: center;
}

.clock-big {
  font-size: 54px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
