@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  color-scheme: light;
  font-size: 16px; /* 1rem = 16px */
  --primary-color: rgba(195, 45, 45, 1);
  --colors-secondary: color-mix(in srgb, var(--primary-color) 20%, light-dark(white, black) 80%);
  --text-color: light-dark(#3C3C3C,#DDDDDD);
  --transparent-text-color: light-dark(rgba(0, 0, 0, .5), rgba(255, 255, 255, .5));
  --glass-background: light-dark(rgba(0, 0, 0, .025), rgba(255, 255, 255, .025));
  --glass-background-hover: light-dark(rgba(0, 0, 0, .05), rgba(255, 255, 255, .05));
  --glass-background-active: light-dark(rgba(0, 0, 0, .1), rgba(255, 255, 255, .1));
  @media (prefers-color-scheme: dark) { color-scheme: dark; }
}

#content {
  opacity: 0;
  transition: opacity 0.3s ease;
}

#content.loaded {
  opacity: 1;
}


body {
  background-color: light-dark(#F0F0F0,#171717);
  color: light-dark(black,white);
  margin: 0;
  font-family: "Roboto";
  padding-top: 3rem;
}

a {
  cursor: pointer;
  text-decoration: none;
  color: var(--text-color);
  transition: .3s;
}

/* Bar */
.bar-button {
  color: color-mix(in srgb, var(--primary-color) 50%, white 50%);
  position: relative;
  margin: 0 0.2rem;
}
.bar-button:hover {
  color: var(--primary-color);
  transition: .3s;
}
.bar-button::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.125rem;
  width: 100%;
  height: 0.125rem;
  background: var(--primary-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.bar-button:hover::after {
  transform: scaleX(1);
}

/* Header */
header.bar {
  display: flex;
  top: 0;
  position: fixed;
  right: 0;
  align-items: center;
  padding: 1rem 7rem;
  z-index: 1000;
  backdrop-filter: blur(0.6rem);
  justify-content: space-between;
}
header.bar .icon {
  display: flex;
}
header.bar .icon img {
  margin-right: 0.3rem;
  filter: drop-shadow(0.125rem 0.125rem 0.25rem rgba(0,0,0,0.5));
}

header.bar:not(.docs) {
  left: 0;
}

/* Hero */
.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
}
.hero {
  text-align: left;
  padding: 4rem 2rem 2rem 2rem;
  max-width: 50rem;
  margin: 0 auto;
}
.hero h1 {
  font-size: 2.3rem;
  color: light-dark(#3C3C37,#DDDDD4);
}
.hero p {
  font-size: 1.4rem;
  margin: 0.3rem 0 0 0;
  color: light-dark(rgba(0, 0, 0, 0.87), rgba(235, 235, 245, 0.6));
  font-weight: 500;
}
.hero h1 span {
  font-size: 2.5rem;
}
.hero .buttons {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.button {
  padding: 0.5rem 1rem;
  border: 0;
  color: var(--text-color);
  border-radius: 0.6rem;
  background: var(--glass-background);
  cursor: pointer;
  font-size: 1rem;
  transition: .3s;
}
.button:hover {
  background: var(--glass-background-hover);
}
.button:active {
  background: var(--glass-background-active);
}

/* Inputs */
input[type=number] {
  background: var(--glass-background);
  border: 0;
  outline: 0;
  padding: 0.5rem;
  border-radius: 0.45rem;
}

input[type=number]:focus {
  background: var(--glass-background-hover);
  border: 0;
  outline: 0;
  padding: 0.5rem;
  border-radius: 0.45rem;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
  background: var(--glass-background) !important;
}

/* Screenshots */
.screenshot {
  margin: 2rem auto;
  max-width: 90%;
  background: #111;
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
}
.screenshot-placeholder {
  width: 100%;
  height: 25rem;
  background: repeating-linear-gradient(
    45deg,
    #222,
    #222 0.6rem,
    #333 0.6rem,
    #333 1.25rem
  );
  border-radius: 0.75rem;
}

/* Menu */
.menu {
  background: var(--glass-background);
  max-width: 50rem;
  width: 100%;
  min-height: 10rem;
  margin: 5rem auto;
  padding: 1.25rem;
  border-radius: 1.25rem;
}
.selection-menu {
  gap: 1.25rem;
  grid-template-columns: 1fr 1fr;
  display: grid;
}
.link-item {
  background: var(--glass-background);
  height: 22rem;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: .3s;
}
.link-item:hover {
  background: var(--glass-background-hover);
}
.link-item i {
  color: var(--glass-background-active);
  font-size: 8rem;
  margin-top: 10%;
  text-align: center;
}
.link-item img {
  max-width: 14rem;
  margin: auto;
  display: block;
  filter: drop-shadow(0.125rem 0.125rem 0.25rem rgba(0,0,0,0.5));
}
.link-item div {
  height: 30%;
  background: var(--glass-background);
  border-radius: 0 0 1rem 1rem;
}
.link-item div p {
  font-size: 1.5rem;
  text-align: center;
  margin: 0.3rem;
  color: var(--text-color);
}

/* Arrow */
#arrow {
  fill: color-mix(in srgb, var(--primary-color) 50%, white 50%);
  margin-left: 0.3rem;
}
#arrow:hover {
  fill: var(--primary-color);
  transition: .3s;
  transform: translateX(0.6rem);
}

/* Shell Info */
.shell-info {
  position: relative;
  max-width: 50rem;
  margin: 0 auto;
  padding: 1.25rem;
  overflow: hidden;
}
.shell-info div::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  margin-bottom: 3.75rem;
  height: 7.5rem;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, light-dark(#F0F0F0,#171717) 80%);
  pointer-events: none;
}

/* Misc */
.who {
  color: var(--text-color);
  margin: 0 auto;
  max-width: 50rem;
}
.more {
  text-align: center;
  margin: 0 auto;
}

/* Masaüstü: flex ile yan yana */
.hero-container {
  display: flex;
  margin: 2.5rem 16rem;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.hero-logo {
  filter: drop-shadow(0.125rem 0.125rem 0.25rem rgba(0,0,0,0.5));
  margin: 4rem 2rem 0 0;
  height: auto;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 2rem auto;
  max-width: 95%;
}
.gallery img {
  width: 100%;
  max-width: 500px; /* Masaüstünde daha büyük */
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}
.gallery img:hover {
    transform: scale(1.05);
}

.bar.docs {
  background: light-dark(#F0F0F0,#171717);
}

/* RESPONSIVE (Mobile) */
@media (max-width: 48rem) {
  body {
    padding-top: 5rem;
  }
  header.bar {
    padding: 1rem 2rem;
  }
  .hero {
    text-align: center;
    padding: 0 1rem;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero p {
    font-size: 1.1rem;
  }
  .hero .buttons {
    justify-content: center;
  }
  .selection-menu {
    grid-template-columns: 1fr; /* tek kolon */
    gap: 1rem;
    width: 100%; /* ekran genişliğini kapla */
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 1rem; /* kenarlardan boşluk */
    margin: 0 auto; /* ortala */
  }

  .menu {
    width: 100%;
    max-width: 100%;
    padding: 1rem;
    margin: 2rem auto; /* yatay ortala */
    box-sizing: border-box;
  }
  .hero-container {
    flex-direction: column;
    margin: 2rem 1rem;
    text-align: center;
  }
  .hero-logo {
    order: -1;   /* resmi yazıların üstüne taşıyor */
    margin: 1rem auto 0 auto;
    width: 15rem;
  }
  header.bar nav {
    display: flex;
    flex-wrap: wrap; /* butonlar yan yana sığmazsa alt satıra geçer */
    justify-content: center; /* ortala */
    gap: 0.5rem; /* butonlar arasında boşluk */
    margin-top: 0.5rem; /* header ile aradaki boşluk */
  }

  .bar-button {
    flex: 1 1 auto; /* genişliklerini eşit dağıt */
    text-align: center;
    margin: 0.25rem 0; /* üst-alt boşluk */
    min-width: 6rem; /* çok küçük olmaması için */
  }

  header.bar {
    flex-direction: column; /* logo ve nav alt alta */
    align-items: center;
    padding: 1rem 1rem;
  }

  header.bar .icon {
    margin-bottom: 0.5rem;
  }
  .gallery {
    flex-direction: column;
    align-items: center;
  }
  .gallery img {
    max-width: 90%;
  }
}

#error-message {
  text-align: center;
  color: #ff4c4c;
  font-size: 1.5rem;
  margin-top: 3rem;
  animation: shake 0.3s ease;
}

#error-message i {
  font-size: 2rem;
  display: block;
  margin-bottom: 1rem;
  color: #ff4c4c;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

/* Hover olduğunda animasyonla gelsin */
.bar-logos > a:hover .logo {
  opacity: 1;
  transform: translateX(0);
}

.bar-logos {
  display: flex;
  gap: 10px;
  align-items: center;
}

.bar-logos > a {
  display: flex;
  align-items: center;
  overflow: hidden; /* logo görünmeyince gizle */
  padding: 5px;
  text-decoration: none;
  color: inherit;
  width: 30px; /* sadece ikon kadar genişlik */
  transition: 0.3s ease;
}

.bar-logos > a:hover {
  width: auto;
}

/* ikonu sabit bırak */
.bar-logos > a img {
  width: 30px;
  height: auto;
  flex-shrink: 0;
}

/* logo başlangıçta görünmez */
.bar-logos > a .logo {
  opacity: 0;
  transform: translateX(-12px);
  margin-left: 8px;
  white-space: nowrap;
  transition:
      opacity 0.25s ease,
      transform 0.25s ease;
}

/* hover ile kayarak + fade ile gelsin */
.bar-logos > a:hover .logo {
  opacity: 1;
  transform: translateX(0);
}
