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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #1a1a1a;
  color: #fff;
  height: 100vh;
  overflow: hidden;
}

#surf-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Toolbar */
#toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(to bottom, #2d2d2d, #1a1a1a);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.toolbar-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 4px;
}

.toolbar-spacer {
  flex: 1;
}

#toolbar button {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

#toolbar button:hover:not(:disabled) {
  background: rgba(100, 200, 255, 0.3);
  border-color: #64c8ff;
}

#toolbar button:active:not(:disabled) {
  transform: scale(0.95);
}

#toolbar button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#toolbar button.active {
  background: rgba(100, 200, 255, 0.4);
  border-color: #64c8ff;
}

#file-info {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

/* Landing zone */
#landing {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
}

#landing.active {
  display: flex;
}

.landing-content {
  text-align: center;
  padding: 40px;
}

.landing-content .icon {
  font-size: 80px;
  display: block;
  margin-bottom: 20px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.landing-content h2 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 12px;
  background: linear-gradient(90deg, #2dd4bf, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-content p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
}

/* HTML iframe */
#html-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: #fff;
}

#html-frame.hidden {
  display: none;
}

/* Source view */
#source-view {
  flex: 1;
  overflow: auto;
  background: #0d0d0d;
  padding: 16px;
}

#source-view.hidden {
  display: none;
}

#source-code {
  font-family: 'SF Mono', Monaco, Consolas, 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: #d4d4d4;
  white-space: pre-wrap;
  word-wrap: break-word;
  tab-size: 2;
}
