:root {
  --primary: #000000;
  --secondary: #ffffff;
  --accent: #404040;
  --background: #ffffff;
  --text: #000000;
  --glow: 0 0 10px rgba(0, 0, 0, 0.15);
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: var(--background);
  color: var(--text);
  font-family: "Courier New", Courier, monospace;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  transition: all 0.3s;
  text-shadow: none;
  font-weight: 500;
}

.nav-link:hover {
  color: var(--accent);
  text-shadow: none;
}

.card {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  padding: 2rem;
  background: rgba(26, 26, 26, 0.1);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  min-height: fit-content;
  margin: 0;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: var(--glow);
}

.heading {
  font-size: 2.25rem;
  font-weight: bold;
  color: var(--primary);
  text-shadow: var(--glow);
  margin-bottom: 0.5rem;
  text-decoration: none;
  display: inline-block;
}

.tagline {
  font-size: 1.25rem;
  color: var(--accent);
  text-shadow: var(--glow);
  margin-bottom: 1.5rem;
  opacity: 0.9;
  text-align: center;
  width: 100%;
  display: block;
}

.subheading {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  text-shadow: var(--glow);
  margin-bottom: 1rem;
}

.description {
  font-size: 1.125rem;
  color: var(--text);
  line-height: 1.75;
  text-shadow: var(--glow);
  text-align: center;
  margin: 0 auto;
  max-width: 800px;
}

.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

@media (max-width: 640px) {
  .heading {
    font-size: 1.875rem;
  }
  .subheading {
    font-size: 1.25rem;
  }
  .description {
    font-size: 1rem;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  nav ul {
    gap: 1rem;
  }
}
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 100%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
}
header .site-title {
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  font-weight: bold;
  white-space: nowrap;
  transition: all 0.3s;
}
header .site-title:hover {
  color: var(--accent);
}
header nav {
  font-size: 0.9rem;
}
header nav ul {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 640px) {
  header .container {
    padding: 0.5rem;
  }
  header .site-title {
    font-size: 1rem;
    margin-left: 1rem;
  }
  header nav {
    font-size: 0.8rem;
  }
  header nav ul {
    gap: 1rem;
  }
}
.no-underline {
  text-decoration: none;
}

.grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

@media (max-width: 768px) {
  .grid-2col {
    grid-template-columns: 1fr;
    width: 85%;
    padding: 1rem;
    gap: 1.5rem;
  }
  .card {
    min-height: 250px;
  }
}
.heading, .subheading {
  text-align: center;
  width: 100%;
}

.description {
  text-align: center;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.contact-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--primary);
  color: var(--primary);
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  text-shadow: var(--glow);
  margin: 0 auto;
}
.contact-button:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}
.contact-button:active {
  transform: translateY(0);
}

.contact-button-container {
  display: flex;
  justify-content: center;
  width: 100%;
}

.terminal-container {
  width: 800px;
  height: 600px;
  background: var(--secondary);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
}

.terminal-header {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terminal-buttons {
  display: flex;
  gap: 0.5rem;
  margin-right: 1rem;
}

.terminal-button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.terminal-button.close {
  background: #ff5f56;
}
.terminal-button.minimize {
  background: #ffbd2e;
}
.terminal-button.maximize {
  background: #27c93f;
}

.terminal-title {
  color: var(--primary);
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.role-selector-button {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--primary);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.role-selector-button .dropdown-arrow {
  font-size: 0.8rem;
  opacity: 0.7;
  transform: rotate(0deg);
  transition: transform 0.3s ease;
  display: inline-block;
}
.role-selector-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
}
.role-selector-button:hover .dropdown-arrow {
  opacity: 1;
}

.role-selector-button:has(+ div) .dropdown-arrow {
  transform: rotate(180deg);
}

.role-selector-menu {
  position: absolute;
  top: 100%;
  right: 0;
  width: 200px;
  background: var(--secondary);
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 0.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-top: 0.5rem;
}

.role-option {
  background: transparent;
  border: none;
  color: var(--primary);
  padding: 0.75rem 1rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 4px;
  font-size: 0.9rem;
  opacity: 0.8;
  width: 100%;
  white-space: nowrap;
}
.role-option:hover {
  background: rgba(255, 255, 255, 0.1);
  opacity: 1;
}
.role-option.active {
  background: var(--accent);
  color: var(--background);
  opacity: 1;
}

.relative {
  position: relative;
}

.terminal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem;
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 1rem;
  padding-right: 0.5rem;
}
.chat-messages::-webkit-scrollbar {
  width: 6px;
}
.chat-messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}
.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.message {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 4px;
  max-width: 80%;
}
.message.system {
  background: rgba(255, 255, 255, 0.1);
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.message.user {
  background: rgba(0, 0, 0, 0.03);
  color: var(--text);
}
.message.ai {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text);
}

.chat-input-container {
  margin-top: auto;
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input {
  flex-grow: 1;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  padding: 0.75rem;
  color: var(--text);
  font-family: inherit;
}
.chat-input:focus {
  outline: none;
  border-color: rgba(0, 0, 0, 0.4);
}
.chat-input::placeholder {
  color: rgba(0, 0, 0, 0.5);
}

.send-button {
  background: var(--text);
  color: var(--background);
  border: none;
  border-radius: 4px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s;
}
.send-button:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-1px);
}
.send-button:active {
  transform: translateY(0);
}

@media (max-width: 640px) {
  .terminal-container {
    width: 95%;
    height: 70vh;
  }
  .message {
    max-width: 90%;
  }
}
main {
  padding-top: 6rem;
}

footer {
  background: var(--secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem 0;
  margin-top: auto;
}
footer a {
  transition: opacity 0.3s ease;
  text-decoration: none;
  color: var(--primary);
}
footer a:hover {
  opacity: 1;
}

#chat {
  min-height: calc(100vh - 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

@media (max-width: 840px) {
  .terminal-container {
    width: 95%;
    height: 80vh;
    margin: 1rem auto;
  }
}
.code-url {
  color: var(--accent);
  font-size: 0.9rem;
  opacity: 0.8;
  text-decoration: none;
  margin-top: auto;
  padding-top: 1rem;
  transition: all 0.3s;
  text-align: center;
  display: block;
}
.code-url:hover {
  opacity: 1;
  text-shadow: var(--glow);
}
