/* Base Styles */
:root {
  --primary-color: #38bdf8; /* Light blue */
  --primary-hover: #0ea5e9;
  --background-color: #000000;
  --text-color: #ffffff;
  --border-color: rgba(59, 130, 246, 0.3);
}

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

html,
body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  direction: ltr; /* Changed from RTL to LTR */
  height: 100%;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #38bdf8, #0284c7);
  border-radius: 10px;
  border: 2px solid rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #0ea5e9, #0369a1);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
}

/* Scrollbar for Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #38bdf8 rgba(0, 0, 0, 0.3);
}

/* Container */
.container {
  position: relative;
  min-height: 100vh;
}

/* Canvas Background */
#networkCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Content */
.content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 1rem;
  min-height: 80vh;
}

.heading {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .heading {
    font-size: 3.5rem;
  }
}

.text-primary {
  color: var(--primary-color);
}

.text-white {
  color: var(--text-color);
}

.description {
  font-size: 1.125rem;
  color: #d1d5db;
  max-width: 900px;
  margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
  .description {
    font-size: 1.25rem;
  }
}

.divider {
  width: 5rem;
  height: 0.25rem;
  background-color: var(--primary-color);
  margin-bottom: 2.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  border-radius: 9999px;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #000000;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-color);
  border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: rgba(59, 130, 246, 0.1);
}

.mt-20 {
  margin-top: 5rem;
}

/* Footer */
.footer {
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border-color);
  padding: 3rem 1rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-heading {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.footer-text {
  color: #9ca3af;
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icon {
  color: var(--primary-color);
  transition: color 0.3s ease;
}

.social-icon:hover {
  color: var(--primary-hover);
}

.copyright {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: #6b7280;
}

/* Scroll to top button */
.scroll-top-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background-color: #38bdf8;
  color: #000000;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  z-index: 50;
  transition: all 0.3s ease;
  opacity: 0; /* Start hidden */
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
  padding: 0;
}

.scroll-top-btn:hover {
  background-color: #0ea5e9;
  transform: translateY(-3px);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.7);
}

.scroll-top-btn:active {
  transform: translateY(-1px);
}

.scroll-top-btn svg {
  width: 1.5rem;
  height: 1.5rem;
  stroke-width: 3;
}

/* Services Page */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.service-card {
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.1);
}

.service-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}

.service-description {
  color: #d1d5db;
  font-size: 0.875rem;
}

/* Add these styles to create a light blue glow around text */

/* Glow effect for headings */
.heading,
.footer-heading,
.service-title {
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.5), 0 0 20px rgba(56, 189, 248, 0.3);
}

/* Glow effect for primary colored text */
.text-primary {
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.6), 0 0 15px rgba(56, 189, 248, 0.4);
}

/* Subtle glow for normal text */
.description,
.footer-text,
.service-description {
  text-shadow: 0 0 5px rgba(56, 189, 248, 0.2);
}

/* Enhanced glow on hover for interactive elements */
.btn:hover,
.social-icon:hover {
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.7), 0 0 20px rgba(56, 189, 248, 0.5);
}

/* Add a subtle pulse animation to the main heading */
@keyframes pulse-glow {
  0% {
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.5), 0 0 20px rgba(56, 189, 248, 0.3);
  }
  50% {
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.7), 0 0 30px rgba(56, 189, 248, 0.5);
  }
  100% {
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.5), 0 0 20px rgba(56, 189, 248, 0.3);
  }
}

.heading .text-primary {
  animation: pulse-glow 3s infinite ease-in-out;
}

/* Menu Button and Dropdown Styles */
.menu-container {
  position: fixed;
  top: 20px;
  right: 20px; /* Keep on right side */
  z-index: 100;
}

.menu-button {
  background-color: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.menu-button:hover {
  background-color: rgba(56, 189, 248, 0.2);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}

.menu-dropdown {
  position: absolute;
  top: 60px;
  right: 0; /* Keep on right side */
  background-color: rgba(0, 0, 0, 0.9);
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  width: 200px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
  transform-origin: top right;
  transform: scale(0);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.menu-dropdown.active {
  transform: scale(1);
  opacity: 1;
}

.menu-item {
  padding: 15px;
  color: white;
  text-decoration: none;
  display: block;
  text-align: left; /* Changed from right to left */
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  transition: all 0.3s ease;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item:hover {
  background-color: rgba(56, 189, 248, 0.2);
  padding-left: 25px; /* Changed from right to left */
}

/* Animation for menu items */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px); /* Changed from 20px to -20px */
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.menu-dropdown.active .menu-item {
  animation: slideIn 0.3s forwards;
}

.menu-dropdown.active .menu-item:nth-child(1) {
  animation-delay: 0.1s;
}

.menu-dropdown.active .menu-item:nth-child(2) {
  animation-delay: 0.2s;
}

/* Discord button styles */
.discord-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(to right, #5865f2, #7289da);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-top: 20px;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(88, 101, 242, 0.5);
}

.discord-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(88, 101, 242, 0.7);
}

/* Projects grid */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
}

@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.project-card.animate {
  animation: fadeInUp 0.6s forwards;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.project-image {
  width: 100%;
  height: 180px;
  background-color: rgba(56, 189, 248, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-content {
  padding: 1.5rem;
}

.project-title {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}

.project-description {
  color: #d1d5db;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.project-tag {
  background-color: rgba(56, 189, 248, 0.1);
  color: var(--primary-color);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
}

/* Project files section */
.project-files {
  margin-top: 1rem;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 0.5rem;
  padding: 0.75rem;
  text-align: left;
}

.files-heading {
  font-size: 0.875rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.files-list {
  list-style: none;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #d1d5db;
  padding: 0.25rem 0;
}

/* Download button */
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--primary-color);
  color: #000000;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: bold;
  text-decoration: none;
  margin-top: 1rem;
  transition: all 0.3s ease;
}

.download-button:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

/* Code Examples Grid */
.code-examples-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
}

@media (min-width: 768px) {
  .code-examples-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .code-examples-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Code Card Styles */
.code-card {
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  overflow: hidden;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.code-card.animate {
  animation: fadeInUp 0.6s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.code-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.code-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.code-title {
  font-size: 1.125rem;
  font-weight: bold;
  color: var(--primary-color);
  margin: 0;
}

.code-language-badge {
  background-color: var(--primary-color);
  color: #000000;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: bold;
}

.code-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: rgba(0, 0, 0, 0.3);
}

.code-tag {
  background-color: rgba(56, 189, 248, 0.1);
  color: var(--primary-color);
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
}

.code-preview {
  padding: 1rem;
  background-color: rgba(0, 0, 0, 0.3);
  max-height: 150px;
  overflow: hidden;
}

.code-preview-content {
  font-family: monospace;
  font-size: 0.875rem;
  color: #d1d5db;
  white-space: pre-wrap;
  text-align: left;
}

.code-actions {
  display: flex;
  justify-content: space-between;
  padding: 1rem;
  border-top: 1px solid var(--border-color);
}

.view-code-btn,
.copy-code-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.view-code-btn:hover,
.copy-code-btn:hover {
  background-color: rgba(56, 189, 248, 0.1);
  transform: translateY(-2px);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  opacity: 1;
}

.modal-content {
  background-color: rgba(0, 0, 0, 0.9);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-content.show {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin: 0;
}

.close-modal {
  font-size: 1.5rem;
  color: var(--primary-color);
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-modal:hover {
  color: var(--primary-hover);
}

.modal-language {
  background-color: var(--primary-color);
  color: #000000;
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 0 0 0.5rem 0;
  font-size: 0.875rem;
  font-weight: bold;
  position: absolute;
  top: 0;
  right: 1rem;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: rgba(0, 0, 0, 0.3);
}

.code-block-wrapper {
  padding: 1rem;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-code-block {
  position: relative;
  margin: 0;
  padding: 1.5rem;
  border-radius: 0.5rem;
}

.modal-code-block pre {
  font-family: monospace;
  font-size: 0.875rem;
  color: #d1d5db;
  white-space: pre-wrap;
  text-align: left;
  overflow-x: auto;
}

/* Enhanced Copy Button */
.copy-button {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background-color: var(--primary-color);
  color: #000000;
  border: none;
  border-radius: 0.25rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  z-index: 10;
}

.copy-button:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

/* Code block styles */
.code-block {
  background-color: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  position: relative;
  text-align: left; /* Ensure code is left-aligned */
}

.code-block pre {
  font-family: monospace;
  color: #d1d5db;
  font-size: 0.875rem;
  direction: ltr; /* Ensure code is LTR */
}

.code-language {
  position: absolute;
  top: 0;
  right: 1rem;
  background-color: var(--primary-color);
  color: black;
  padding: 0.25rem 0.75rem;
  border-radius: 0 0 0.5rem 0.5rem;
  font-size: 0.75rem;
  font-weight: bold;
}

/* Add styles for code inline elements */
code {
  background-color: rgba(56, 189, 248, 0.1);
  color: var(--primary-color);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-family: monospace;
  font-size: 0.9em;
}