/* Center the entire browser on the page */
body {
  background-color: black;
  margin: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.overlay-text.credits {
  position: absolute;     /* important for placement */
  top: 160%;              /* adjust up/down as needed */
  left: 50%;              /* move to center horizontally */
  transform: translateX(-50%);  /* actually center it */

  width: 40px;
  height: 40px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;
  font-size: 18px;
}

/* Main browser container styling */
.browser {
  width: 80%;
  max-width: 800px;
  aspect-ratio: 16/9;
  border: 2px solid white;
  position: relative;
  border-radius: 8px;
  background-color: #111;
  overflow: hidden;
}

/* Top browser bar containing tabs */
.browser-top-bar {
  width: 100%;
  height: 10%;
  background-color: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  padding: 0;
  border-bottom: 2px solid white;
  justify-content: space-between;
}

/* Container for tabs */
.tabs {
  display: flex;
  flex: 1;
  gap: 0;
  height: 100%;
}

/* Individual tab appearance */
.tab {
  flex: 1;
  background-color: rgba(255, 255, 255, 0.1);
  border-left: 1px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 0.9rem;
  height: 100%;
}

/* Remove left border on first tab */
.tab:first-child {
  border-left: none;
}

/* Add right border on last tab */
.tab:last-child {
  border-right: 1px solid white;
}

/* Control circles (red, yellow, green) */
.controls {
  display: flex;
  gap: 6px;
  margin-left: 6px;
  margin-right: 6px;
}

.circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.red {
  background-color: #ff5f57;
}

.yellow {
  background-color: #ffbd2e;
}

.green {
  background-color: #28c840;
}

/* Toolbar below tabs/favorites bar */
.browser-toolbar {
  width: 100%;
  height: 8%;
  background-color: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-bottom: 2px solid white;
}

/* Toolbar buttons appearance */
.browser-toolbar button {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid white;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hover effect on toolbar buttons */
.browser-toolbar button:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Extra space after last toolbar button */
.browser-toolbar button:last-child {
  margin-right: 20px;
}

/* URL bar inside toolbar */
.browser-toolbar .link-box {
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid white;
  border-radius: 12px;
  padding: 2px 10px;
  color: white;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  white-space: nowrap;
  flex: 1;
  margin: 0 6px;
}

/* Browser content container */
.browser-content {
  position: relative;
  width: 100%;
  height: 40%;
}

/* Boxes inside browser content */
.box {
  position: absolute;
  width: 80px;
  height: 40px;
  top: calc(20% - 5px);
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-weight: bold;
  border: 1px solid white;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}

/* Hover effect for content boxes */
.box:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Glow and hover effect for About and Projects buttons */
.overlay-text.about,
.overlay-text.projects {
  text-shadow: 2px 2px 8px rgb(255, 238, 160);
  transition: color 1s;
  cursor: pointer;
}

.overlay-text.about:hover,
.overlay-text.projects:hover {
  color: rgb(233, 188, 188);
}

/* Popup container styling */
.popup {
  position: absolute;
  top: 25%;
  left: 5%;
  right: 5%;
  bottom: 15%;
  background-color: #ccc;
  border: 1px solid white;
  border-radius: 12px;
  padding: 20px;
  color: black;
  text-align: center;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  display: none;
  z-index: 10;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

/* Show popup */
.popup.show {
  display: block;
}

/* Close button in popup */
.popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  background-color: #ff5f57;
  border: none;
  border-radius: 50%;
  color: white;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}

/* Hover effect on close button */
.popup-close:hover {
  background-color: #ff3b30;
}

/* Spinner element inside a tab */
.spinner {
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top: 2px solid white;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  animation: spin 1s linear infinite;
}

/* Spinner element inside a tab */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Background GIF */
.responsive-browser-image {
  position: absolute;
  top: calc(5% + 2px);
  left: 30%;
  transform: translateX(-50%);
  width: 43%;
  height: auto;
  z-index: 0;
}

/* GitHub Explorer inside Projects popup */
.explorer {
  max-width: 100%;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #c4c4c4;
  border-radius: 4px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.15);
}

.header,
.row {
  display: grid;
  grid-template-columns: 40px 1fr 160px 120px;
  padding: 8px 10px;
  border-bottom: 1px solid #ddd;
}

.header div,
.row div {
  padding: 2px 6px;
  cursor: pointer;
  text-align: left;
}

.row:hover {
  background: #eaf3ff;
}

.arrow-toggle {
  transition: 0.2s;
}

.arrow-open {
  transform: rotate(90deg);
}

.readme-box {
  grid-column: 1 / 5;
  padding: 10px;
  background: #fafafa;
  border-top: 1px solid #ddd;
  display: none;
}

.readme-box img {
  max-width: 100%;
  height: auto;
}

.readme-box pre {
  background: #1e1e1e;
  color: #fff;
  padding: 8px;
  overflow-x: auto;
  border-radius: 4px;
}


.typing-container {
  font-family: monospace;
  font-size: 14px;
  color: black;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  width: 100%;
  display: block;
}