* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #1a1a2e;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#browser {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #16213e;
}

/* ── Chrome (top bar) ── */
#chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #0f3460;
  border-bottom: 1px solid #1a1a4e;
  flex-shrink: 0;
  z-index: 100;
}

#nav-buttons {
  display: flex;
  gap: 4px;
}

#nav-buttons button {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  color: #e0e0e0;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

#nav-buttons button:hover:not(:disabled) {
  background: rgba(255,255,255,0.18);
}

#nav-buttons button:disabled {
  opacity: 0.3;
  cursor: default;
}

#url-bar-container {
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: border-color 0.2s;
}

#url-bar-container:focus-within {
  border-color: #53a8ff;
}

#lock-icon {
  font-size: 12px;
  margin-right: 8px;
  opacity: 0.5;
}

#url-bar {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #e0e0e0;
  font-size: 14px;
  padding: 8px 0;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

#url-bar::placeholder {
  color: rgba(255,255,255,0.3);
}

#status-area {
  min-width: 100px;
  text-align: right;
}

#status-text {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  font-family: monospace;
}

/* ── Viewport ── */
#viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #ffffff;
}

#content-frame {
  width: 100%;
  height: 100%;
  overflow: auto;
  position: absolute;
  top: 0;
  left: 0;
}

#content-frame :link,
#content-frame :visited {
  /* let proxied pages keep their own link colors */
}

/* ── Loading bar ── */
#loading-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 50;
}

#loading-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #53a8ff, #00d2ff);
  animation: loading-slide 1.5s ease-in-out infinite;
  transition: width 0.3s;
}

@keyframes loading-slide {
  0%   { transform: translateX(-100%); }
  50%  { transform: translateX(0%); }
  100% { transform: translateX(100%); }
}

/* ── Welcome screen ── */
#welcome-screen {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.welcome-content {
  text-align: center;
  color: #e0e0e0;
}

.welcome-content h1 {
  font-size: 32px;
  margin-bottom: 12px;
  font-weight: 600;
}

.welcome-content p {
  font-size: 16px;
  opacity: 0.6;
  margin-bottom: 32px;
}

.quick-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.quick-link {
  padding: 10px 20px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: #e0e0e0;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-link:hover {
  background: rgba(83, 168, 255, 0.2);
  border-color: #53a8ff;
}

/* ── Scrollbar for content ── */
#content-frame::-webkit-scrollbar {
  width: 8px;
}

#content-frame::-webkit-scrollbar-track {
  background: #f1f1f1;
}

#content-frame::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

#content-frame::-webkit-scrollbar-thumb:hover {
  background: #555;
}
