
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: radial-gradient(circle at center, #006400, #013220 80%);
  color: #fff;
  text-align: center;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* держим блоки сверху */
  min-height: calc(100vh - 160px); /* 100% высоты минус header+footer */
  padding-top: 50px; /* отступ сверху */
}





header {
  padding: 30px;
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}


.auth-section {
  margin: 50px auto;
  padding: 40px;
  background: rgba(0,0,0,0.7);
  max-width: 420px;
  border-radius: 20px;
  box-shadow: 0 0 25px rgba(0,255,100,0.6);
  animation: fadeIn 1s ease-in-out;
}

.auth-section h2 {
  margin-bottom: 20px;
  font-size: 1.8rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.input-group {
  display: flex;
  align-items: center;
  background: #111;
  border-radius: 10px;
  padding: 10px;
}

.input-group i {
  color: #28a745;
  margin-right: 10px;
}

.input-group input {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  color: #fff;
  outline: none;
  font-size: 1rem;
}

.auth-form button {
  padding: 14px;
  background: linear-gradient(90deg, #28a745, #218838);
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.auth-form button:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 15px #28a745;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  gap: 15px;
}

.auth-links a {
  color: #00cfff;
  text-decoration: none;
  font-size: 0.9rem;
}

.auth-links a:hover {
  text-decoration: underline;
}

.error {
  color: #ff4444;
  margin-top: 15px;
  font-weight: bold;
  visibility: hidden; /* изначально скрыто */
  min-height: 24px;   /* фиксируем высоту, чтобы блок занимал место всегда */
}



.catalog {
  margin: 10px auto;
}


.custom-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.95rem;
  color: #fff;
  user-select: none;
}

.custom-checkbox input {
  display: none; 
}

.custom-checkbox .checkmark {
  width: 16px;
  height: 16px;
  background: #111;
  border: 2px solid #28a745;
  border-radius: 4px;
  margin-right: 10px;
  position: relative;
}

.custom-checkbox input:checked + .checkmark {
  background: #28a745;
}

.custom-checkbox .checkmark::after {
  content: '';
  position: absolute;
  display: none;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.custom-checkbox input:checked + .checkmark::after {
  display: block;
}


.products {
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}

.card { 
  background: rgba(0,0,0,0.8);
  border-radius: 15px;
  padding: 20px;
  width: 250px;
  box-shadow: 0 0 15px rgba(0,0,0,0.6);
  transition: transform 0.3s, box-shadow 0.3s;

  display: flex;             
  flex-direction: column;     
  justify-content: space-between; 
}

.card p {
  flex: 1; 
}



.card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(255,255,255,0.3);
}

.card img {
  width: 100%;
  border-radius: 10px;
}

.card h3 {
  margin: 15px 0 10px;
}

.card button {
  padding: 12px;
  background: linear-gradient(90deg, #ff4500, #e63e00);
  border: none;
  border-radius: 10px;
  color: white;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
}

.card button:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 15px #ff4500;
  background: linear-gradient(90deg, #ff6347, #e63e00);
}


.auth-links a {
  display: inline-block;
  padding: 8px 15px;
  background: linear-gradient(135deg, #28a745, #00cfff);
  color: #fff;
  text-decoration: none; 
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.auth-links a:hover {
  background: linear-gradient(135deg, #00cfff, #28a745);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
  text-decoration: none; 
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
  width: 100%;
  margin: 10px 0;
}

footer {
  background: rgba(0,0,0,0.8);
  padding: 20px;
  margin-top: 40px;
  font-size: 0.9rem;
}


@keyframes fadeIn {
  from {opacity: 0; transform: translateY(30px);}
  to {opacity: 1; transform: translateY(0);}
}


@media (max-width: 768px) {

  header h1 {
    font-size: 1.8rem;
  }
  
   
  
  main {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* как раз фикс */
    min-height: calc(100vh - 160px);
  }

  .auth-section {
    width: 100%;
    max-width: 400px;
    margin: 20px auto;         /* центрирование */
    padding: 25px;
    box-sizing: border-box;    /* чтобы паддинги не ломали ширину */
  }

  .products {
    flex-direction: column;
    align-items: center;
  }

  .card {
    width: 90%;
  }
  
}

