:root {
  --bg-color: #16213e;
  --text-color: #ffffff;
  --accent-color: #ff6f61;
  --secondary-color: #e0e0e0;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  --card-bg: #1c2a4e;
  --gradient-bg: linear-gradient(135deg, #16213e, #2a3a6b);
  --code-bg: #0f1b38;
}

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

body {
  font-family: 'Poppins', sans-serif;
  background: var(--gradient-bg);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

#canvas-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  opacity: 0.4;
  pointer-events: none;
}

nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(22, 33, 62, 0.95);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

nav.hidden {
  transform: translateY(-100%);
}

nav .logo img {
  width: 40px;
  height: 40px;
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

nav ul li a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease, background-color 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 5px;
}

nav ul li a:hover, nav ul li a:focus {
  color: var(--accent-color);
  background-color: rgba(255, 111, 97, 0.1);
  outline: none;
}

.hamburger {
  display: none;
  font-size: 1.8rem;
  color: var(--secondary-color);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
}

.hamburger:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.nav-menu {
  display: flex;
}

.nav-menu.active {
  display: flex;
  flex-direction: column;
  align-items: center;
}

header {
  text-align: center;
  padding: calc(80px + 3rem) 1rem 4rem;
  z-index: 1;
  animation: fadeIn 1s ease-in;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: center;
}

.header-title img {
  width: 80px;
  height: 80px;
  transition: transform 0.3s ease;
}

.header-title img:hover {
  transform: scale(1.1);
}

h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--secondary-color);
  max-width: 700px;
  margin: 1.5rem auto;
  line-height: 1.7;
}

main {
  max-width: 1400px;
  width: 100%;
  padding: 2rem;
  margin: 0 auto;
  box-sizing: border-box;
}

.content {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.card {
  background: var(--card-bg);
  border-radius: 15px;
  padding: 2rem;
  flex: 1 1 280px;
  max-width: 320px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--accent-color);
  position: relative;
  overflow: hidden;
  opacity: 1;
  animation: slideUp 0.5s ease-in;
}

.card.highlight-card {
  border: 2px solid var(--accent-color);
  background: linear-gradient(135deg, var(--card-bg), rgba(255, 111, 97, 0.1));
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(255, 111, 97, 0.2));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(255, 111, 97, 0.4);
}

.card i {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
}

.card:hover i {
  transform: scale(1.2);
}

.card h2, .card h3 {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.6rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.card p, .card ul, .card ol {
  font-size: 0.95rem;
  color: var(--secondary-color);
  font-weight: 300;
  line-height: 1.6;
}

.card ul, .card ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.card pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.9rem;
  color: var(--secondary-color);
  margin: 1rem 0;
}

.card code {
  font-family: 'Consolas', 'Monaco', monospace;
}

.command-card p strong {
  color: var(--accent-color);
}

.command-card.search-highlight {
  border: 2px solid var(--accent-color);
  background: linear-gradient(135deg, var(--card-bg), rgba(255, 111, 97, 0.1));
}

#commands-search {
  margin: 2rem 0;
  text-align: center;
}

#command-search-input {
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid var(--accent-color);
  background: var(--card-bg);
  color: var(--text-color);
  font-size: 1.1rem;
  width: 100%;
  max-width: 600px;
  transition: box-shadow 0.3s ease;
}

#command-search-input:focus {
  box-shadow: 0 0 10px rgba(255, 111, 97, 0.4);
  outline: none;
}

.cta-container {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 3rem auto;
}

.cta-button {
  display: inline-block;
  padding: 1.2rem 3.5rem;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--accent-color);
  color: var(--bg-color);
  border-radius: 50px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: pulse 2s infinite;
}

.cta-button.secondary {
  background: transparent;
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
}

.cta-button:hover, .cta-button:focus {
  transform: scale(1.1);
  box-shadow: 0 10px 20px rgba(255, 111, 97, 0.6);
  outline: none;
}

footer {
  text-align: center;
  padding: 3rem 1rem;
  font-size: 1.1rem;
  color: var(--secondary-color);
  background: rgba(22, 33, 62, 0.9);
  width: 100%;
  z-index: 1;
}

footer a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

footer a:hover, footer a:focus {
  color: #ff877b;
}

/* Animações */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes highlightFade {
  0% { box-shadow: 0 0 20px rgba(255, 111, 97, 0.5); }
  50% { box-shadow: 0 0 30px rgba(255, 111, 97, 0.8); }
  100% { box-shadow: 0 0 20px rgba(255, 111, 97, 0.5); }
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after {
    animation: none !important;
    transition: none !important;
  }
}

/* Responsividade */
@media (max-width: 1200px) {
  .card {
    flex: 1 1 300px;
    max-width: 45%;
  }
  .header-title img {
    width: 70px;
    height: 70px;
  }
  h1 {
    font-size: 2.8rem;
  }
  header p {
    font-size: 1.2rem;
  }
}

@media (max-width: 992px) {
  .card {
    flex: 1 1 400px;
    max-width: 100%;
  }
  h1 {
    font-size: 2.5rem;
  }
  header p {
    font-size: 1.1rem;
  }
  .cta-button {
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(22, 33, 62, 0.95);
    flex-direction: column;
    padding: 1.5rem;
    box-shadow: var(--shadow);
  }
  .nav-menu.active {
    display: flex;
    align-items: center;
  }
  nav ul li {
    margin: 1.2rem 0;
  }
  nav ul li a {
    font-size: 1.3rem;
    padding: 0.8rem;
  }
  header {
    padding: calc(70px + 2rem) 1rem 3rem;
  }
  .header-title img {
    width: 60px;
    height: 60px;
  }
  h1 {
    font-size: 2.2rem;
  }
  header p {
    font-size: 1rem;
    max-width: 90%;
  }
  .content {
    gap: 1.5rem;
  }
  .card {
    padding: 1.5rem;
  }
  .cta-button {
    padding: 0.8rem 2rem;
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  header {
    padding: calc(60px + 1.5rem) 1rem 2rem;
  }
  h1 {
    font-size: 1.8rem;
  }
  header p {
    font-size: 0.9rem;
  }
  .header-title img {
    width: 50px;
    height: 50px;
  }
  .card h2, .card h3 {
    font-size: 1.4rem;
  }
  .card p, .card ul, .card ol, .card pre {
    font-size: 0.85rem;
  }
  .card pre {
    padding: 0.8rem;
  }
  .cta-button {
    padding: 0.7rem 1.8rem;
    font-size: 0.9rem;
  }
  #command-search-input {
    font-size: 0.9rem;
    padding: 0.8rem;
  }
  .content {
    gap: 1rem;
    padding: 0.5rem;
  }
}

@media (max-width: 360px) {
  nav {
    padding: 0.7rem 1rem;
  }
  .hamburger {
    font-size: 1.5rem;
  }
  .header-title {
    gap: 1rem;
  }
  h1 {
    font-size: 1.6rem;
  }
  header p {
    font-size: 0.8rem;
  }
  .card {
    padding: 1.2rem;
    flex: 1 1 100%;
  }
  .card h2, .card h3 {
    font-size: 1.2rem;
  }
  .card p, .card ul, .card ol, .card pre {
    font-size: 0.8rem;
  }
}