*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, "Segoe UI", Tahoma, sans-serif;
  background: #808080;
}

.browser-window {
  width: 100vw;
  height: 100vh;
  background: #dedad5;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.browser-titlebar {
  height: 34px;
  background: linear-gradient(to bottom, #d7d0c6 0%, #c9c0b2 100%);
  border-bottom: 1px solid #a8a094;
  display: flex;
  align-items: flex-end;
  padding: 5px 6px 0 6px;
  gap: 8px;
}

.window-buttons {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 4px;
  margin-left: auto;
}

.wb-btn {
  width: 26px;
  height: 22px;
  border-radius: 2px;
  border: none;
  background: transparent;
  font-size: 12px;
  line-height: 1;
  color: #4a453d;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.wb-btn:hover {
  background: rgba(0, 0, 0, 0.08);
}

.wb-close:hover {
  background: #e0442e;
  color: #fff;
}

.browser-tabbar {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 0;
  height: 100%;
  min-width: 0;
  overflow: hidden;
}

.tab {
  position: relative;
  height: 26px;
  min-width: 110px;
  max-width: 180px;
  padding: 0 10px 0 12px;
  margin-right: -8px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(to bottom, #c7bfb2 0%, #bab093 100%);
  border: 1px solid #a39a89;
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: #4a453d;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 100%, 0 100%);
  z-index: 1;
}

.tab.active {
  background: #f4f1ec;
  border-color: #a39a89;
  z-index: 2;
  color: #24211c;
}

.tab-icon {
  flex-shrink: 0;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b6155;
}

.tab.active .tab-icon {
  color: #4a453d;
}

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

.tab-close {
  font-size: 9px;
  opacity: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tab:hover .tab-close {
  opacity: 0.55;
}

.tab-close:hover {
  opacity: 1 !important;
  background: rgba(0, 0, 0, 0.15);
}

.tab-new {
  width: 22px;
  height: 20px;
  margin-bottom: 3px;
  margin-left: 4px;
  border-radius: 4px;
  border: 1px solid #a39a89;
  background: linear-gradient(to bottom, #d7d0c6, #c2b9aa);
  font-size: 13px;
  line-height: 1;
  color: #4a453d;
  flex-shrink: 0;
}

.tab-new:active {
  background: linear-gradient(to bottom, #c2b9aa, #d7d0c6);
}

.browser-toolbar {
  height: 42px;
  background: linear-gradient(to bottom, #ece8e2 0%, #ddd7cc 100%);
  border-bottom: 1px solid #b7ae9e;
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 8px;
}

.nav-buttons {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: #6b6155;
  font-size: 14px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.08);
}

.nav-btn:active {
  background: rgba(0, 0, 0, 0.12);
}

.nav-btn-refresh {
  font-size: 23px;
  line-height: 1;
  padding-bottom: 2px;
}

.address-bar {
  flex: 1;
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #b0a998;
  padding: 0 10px;
  height: 28px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
}

.address-input {
  flex: 1;
  border: none;
  outline: none;
  height: 100%;
  font-size: 13px;
  padding: 0;
  background: transparent;
  color: #22252b;
  min-width: 0;
}

.ab-dropdown {
  font-size: 9px;
  color: #9a927f;
  margin-left: 6px;
  flex-shrink: 0;
}

.go-btn {
  display: none;
}

.progress-bar {
  height: 3px;
  width: 100%;
  background: transparent;
  overflow: hidden;
  display: none;
}

.progress-bar.active {
  display: block;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: #2f6fd6;
  border-radius: 2px;
  transition: width 0.18s linear;
}

.browser-content {
  background: #ffffff;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.page {
  display: none;
  flex: 1;
  flex-direction: column;
}

.page.visible {
  display: none;
}

.page-toolbar {
  height: 26px;
  background: linear-gradient(#f3f4f7, #d1d4db);
  border-bottom: 1px solid #b4b7bf;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 11px;
  color: #3c4045;
}

.page-body {
  flex: 1;
  padding: 10px;
  overflow: hidden;
  font-size: 13px;
  color: #22252b;
}

.browser-iframe {
  display: block;
  border: none;
  width: 100%;
  height: 100%;
}

.page-body h1,
.page-body h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.page-body p {
  margin: 0 0 10px;
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.link-list li {
  padding: 4px 0;
  color: #1f4b8f;
  text-decoration: underline;
}

.browser-statusbar {
  height: 20px;
  background: #ece8e2;
  border-top: 1px solid #b7ae9e;
  display: flex;
  align-items: center;
  padding: 0 6px;
  font-size: 10px;
  color: #4a453d;
  gap: 6px;
}

#statusText {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-zoom {
  padding: 0 6px;
  border-radius: 3px;
  border: 1px solid #b0a998;
  background: #ddd7cc;
}

button {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  font-family: inherit;
}

button:focus {
  outline: none;
}

@media (max-width: 480px) {
  .browser-window {
    max-width: 100vw;
    max-height: 100vh;
  }

  .tab {
    min-width: 80px;
  }
}
