/* Colors : pink: #ff00ea. */
:root {
  --primary1: #db0000;
  --primary1-dark: #bd0000;
  --primary2: #1a5d8c;
  --primary2-dark: #13466a;
}

* {
  box-sizing: border-box;
  transition: background-color 300ms ease, color 300ms ease;
}

*:focus {
  outline: none;
}

html,
body {
  /* background-color: var(--navbar); */
  /* background: var(--color1-1); */
  background: linear-gradient(90deg, var(--navbar) 0%, rgb(235, 235, 235) 50%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  color: var(--color2-dark);
  font-family: "Cairo", sans-serif;
  font-size: 18px;
  margin: 0;
  padding: 0;

  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.primary1 {
  color: var(--primary1);
  border-color: var(--primary1) !important;
}

.bg-primary1 {
  background-color: var(--primary1);
  border-color: var(--primary1) !important;
}

.bg-primary1:hover {
  background-color: var(--primary1-dark);
}

.primary2 {
  color: var(--primary2);
  border-color: var(--primary2) !important;
}

.bg-primary2 {
  background-color: var(--primary2);
  border-color: var(--primary2) !important;
}

.bg-primary2:hover {
  background-color: var(--primary2-dark);
}

/***
  * Code Styling
  ***/

/* Container holding the terminal */
.code-container {
  background: #000; /* Pure black background */
  border-radius: 12px;
  padding: 1.5rem;
  border: 2px solid #003300; /* Dark green border */
  box-shadow: 0 0 20px rgba(0, 255, 70, 0.2);
  margin-left: -1rem;
  margin-right: -1rem;
}

/** matrix-code style */
.code-block {
  background: transparent;
  color: #00ff41; /* Classic Matrix Green */
  font-family: "JetBrains Mono", "Courier New", monospace;
  font-size: 16px;
  line-height: 1.6;
  white-space: pre; /* Keeps the spacing/indentation of your code */
  text-shadow: 0 0 5px rgba(0, 255, 70, 0.7); /* Glowing effect */
  direction: ltr;
  text-align: left;
}

/* Optional: Adding a cursor effect to the end */
.code-block::after {
  content: "_";
  animation: blink 1s infinite;
}

@keyframes blink {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@media (max-width: 576px) {
  .code-container {
    padding-left: 0rem;
    padding-right: 0rem;
  }
  .code-block,
  .output-block {
    font-size: 14px;
  }
}
/** matrix-code style END */

.output-block {
  background: transparent;
  color: #ffffff; /* Classic Matrix Green */
  font-family: "JetBrains Mono", "Courier New", monospace;
  font-size: 16px;
  line-height: 1.6;
  white-space: pre; /* Keeps the spacing/indentation of your code */
  text-shadow: 0 0 5px rgba(0, 255, 70, 0.7); /* Glowing effect */
  direction: ltr;
  text-align: left;
}

.explanation-step {
  background: #f8fafc;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  position: relative;
}

.step-number {
  position: absolute;
  top: -10px;
  right: 20px;
  background: #3b82f6;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
}

.explanation-step p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

.btn-lg {
  padding: 12px 30px;
  font-size: 16px;
}

.math_formula {
  /* Layout & RTL Fixes */
  direction: ltr;
  display: inline-block;
  unicode-bidi: isolate;
  vertical-align: middle;

  /* Look & Feel */
  background-color: #f0fff1; /* Very light blue/indigo */
  color: #065808; /* Deep indigo for high contrast */
  border: 1px solid #c7d2fe;
  padding: 2px 10px;
  border-radius: 6px;

  /* Typography */
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 0.95em;

  /* Subtle "Digital" polish */
  box-shadow: 2px 2px 0px #e0e7ff;
  margin: 0 4px;
}

/***
  * Code Styling END
  ***/

/*******************/
/* Competition     */

.competition-card {
  border-radius: 20px;
  background: linear-gradient(135deg, #ffffff, #f1f8ff);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.competition-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

#competition h2 {
  color: #0d6efd;
}

#competition .btn {
  border-radius: 30px;
  padding: 12px 26px;
}

/* Card Base */
.project-card {
  border: none;
  border-radius: 12px;
  transition: transform 0.2s ease-in-out;
  background: #fff;
}

.project-card:hover {
  transform: translateY(-5px);
}

/* Image takes 80% of the card */
.project-img-container {
  height: 320px; /* Fixed height for consistency */
  overflow: hidden;
  border-radius: 12px 12px 0 0;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Body Styling */
.project-body {
  padding: 0.75rem !important;
  background: #fdfdfd;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-title {
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 65%;
}

.badge-vote {
  font-size: 0.75rem;
  background: #f0f0f0;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Compact Buttons */
.project-actions {
  display: flex;
  gap: 5px;
}

.btn-modern-primary,
.btn-modern-success {
  flex: 1;
  font-size: 0.7rem !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 5px 0;
  font-weight: 600;
  border-radius: 6px;
}

.btn-modern-primary {
  border: 1.5px solid #007bff;
  color: #007bff;
  background: transparent;
}

.btn-modern-primary:hover {
  background: #007bff;
  color: #fff;
}

/* .btn-modern-success {
  background: #28a745;
  color: white;
  border: none;
} */

.text-xs {
  font-size: 0.7rem;
  display: block;
  text-align: center;
  width: 100%;
}

/*******************/
/* Competition End */
