/* fira-code-regular - latin */
@font-face {
  font-display: swap;
  font-family: 'Fira Code';
  font-style: normal;
  font-weight: 400;
  src: url('./fonts/fira-code-v27-latin-regular.woff2') format('woff2');
}

/* fira-code-500 - latin */
@font-face {
  font-display: swap;
  font-family: 'Fira Code';
  font-style: normal;
  font-weight: 500;
  src: url('./fonts/fira-code-v27-latin-500.woff2') format('woff2');
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 20px;
  margin: 0;
  background: radial-gradient(circle at center, #0a0a0a 0%, #000000 90%);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 20px;
}

.terminal {
  background-color: #111;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 0 25px rgba(0, 255, 100, 0.25);
  max-width: 650px;
  width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeIn 1.2s ease-out;
  box-sizing: border-box;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.title-bar {
  display: flex;
  align-items: center;
  align-self: flex-start;
  margin-bottom: 14px;
}

.dot {
  height: 13px;
  width: 13px;
  border-radius: 50%;
  margin-right: 8px;
}
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.typewriter {
  font-size: 1.6rem;
  margin-top: 18px;
  min-height: 4.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: normal;
  word-break: break-word;
  border-right: .15em solid #00ff88;
  animation: blink 0.7s infinite step-end alternate;
  color: #f8f8f8;
  text-align: center;
}

@keyframes blink {
  50% { border-color: transparent; }
}

.socials {
  display: flex;
  justify-content: center;
  margin-top: 25px;
  gap: 15px;
  flex-wrap: wrap;
}

.social-btn {
  background: transparent;
  border: 1px solid #00ff88;
  color: #00ff88;
  padding: 8px 18px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease-in-out;
}

.social-btn:hover {
  background: #00ff88;
  color: #111;
  box-shadow: 0 0 15px #00ff88;
}

.items-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 90%; 
  max-width: 650px; 
  margin-top: 25px;
  padding: 0;
  box-sizing: border-box;
  animation: fadeIn 1.5s ease-out;
  margin-bottom: 20px;
  direction: rtl;
}

.grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #e4e4e4;
  transition: transform 0.3s ease;
}

.grid-item:hover {
  transform: translateY(-5px);
}

.icon-box {
  width: 100%; 
  max-width: 100px;
  aspect-ratio: 1 / 1; 
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid #222;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.grid-item:hover .icon-box {
  border-color: #00ff88;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
  background-color: rgba(0, 255, 136, 0.05);
}

.icon-box img {
  width: 100%;
  height: auto;
  filter: grayscale(0.5);
  transition: filter 0.3s ease;
}

.grid-item:hover img {
  filter: grayscale(0);
}

.grid-item span {
  font-size: 0.85rem;
  font-family: 'Fira Code', monospace;
  text-align: center;
}

/* Modal / Popup Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  overflow-y: auto;
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  background-color: #111;
  margin: 5% auto;
  padding: 30px;
  border: 1px solid #00ff88;
  border-radius: 15px;
  width: 90%;
  max-width: 700px;
  position: relative;
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.2);
  color: #f8f8f8;
  direction: rtl;
  font-family: 'Fira Code', 'Tahoma', sans-serif;
}

.close-modal {
  position: absolute;
  top: 15px;
  left: 20px;
  color: #aaa;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.close-modal:hover {
  color: #00ff88;
}

.modal-body h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #00ff88;
}

/* Slideshow Styles */
.slideshow-container {
  position: relative;
  max-width: 100%;
  margin: 20px auto;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

#slides-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  background-color: #000;
}

#slides-wrapper img.active {
  display: block;
  animation: fadeEffect 0.5s;
}

@keyframes fadeEffect {
  from {opacity: 0.4} 
  to {opacity: 1}
}

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -22px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
  background-color: rgba(0,0,0,0.3);
  text-decoration: none;
}

.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.prev {
  left: 0;
  border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
  background-color: rgba(0,255,136,0.5);
}

#modal-description {
  line-height: 1.8;
  margin: 20px 0;
  text-align: justify;
  font-size: 0.95rem;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 25px;
}

.action-btn {
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s;
  border: 1px solid transparent;
  text-align: center;
  min-width: 120px;
}

.action-btn.preview {
  background: #00ff88;
  color: #111;
}

.action-btn.android {
  border-color: #00ff88;
  color: #00ff88;
}

.action-btn.market {
  border-color: #aaa;
  color: #aaa;
}

.action-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .items-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }
}

@media (max-width: 600px) {
  body {
    padding: 20px 15px;
    gap: 15px;
  }

  .terminal {
    width: 92%;
    padding: 25px 18px;
  }

  .typewriter {
    font-size: 1.1rem;
  }

  .modal-content {
    width: 80%;
    padding: 20px;
    margin: 10% auto;
  }
  
  .modal-actions {
    flex-direction: column;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .items-container {
    grid-template-columns: repeat(2, 1fr);
    width: 92%;
    gap: 20px;
  }
  
  .grid-item span {
    font-size: 0.75rem;
  }
}
