
body {
  font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
}

a {
  color: #00B7FF;
}

header{
  width: 100%;
  -webkit-box-shadow: -1px 5px 8px 0px rgba(34, 60, 80, 0.2);
  -moz-box-shadow: -1px 5px 8px 0px rgba(34, 60, 80, 0.2);
  box-shadow: -1px 5px 8px 0px rgba(34, 60, 80, 0.2);
  height: 60px;
  display: flex;
  flex-direction: row; 
  justify-content: center;
  align-items: center;
}

.input-container{
  height: 40px;
  margin: 0 20px;
  width: 350px;
  display: flex;
  align-items: center;
}

.input-text-search{
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0 10px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  background-color: #d8d8d8;
}

header h1{
  margin: 0;
  text-align: center;
  margin-left: 10px;
  font-size: 16px;
}

.header-counter{
  position: absolute;
  right: 0;
  margin-right: 20px;
  font-size: 18px;
}

.header-leave{
  position: absolute;
  left: 0;
  margin-left: 20px;
  font-size: 18px;
  cursor: pointer;
  transition: 0.5s;
}

.header-leave:hover{
  transform: scale(1.1);
}



.logo-header-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: 0.5s;
}

.logo-header-link:hover{
  transform: scale(1.1);
}

.logo-header-container{
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-left: 20px;
}

.logo-header-container a{
  color: black;
  text-decoration: none;
  transition: 0.5s;
  font-size: 16px;
  margin-left: 10px;
}

header img{
  width: 30px;
}

.buttons-header-container{
  display: flex;
  flex-direction: row;
  align-items: center;
}

.buttons-header-container a{
  color: black;
  text-decoration: none;
  transition: 0.5s;
}

.buttons-header-container a:hover{
  transform: scale(1.2);
}

.main-pictures-container {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 0 20px; 
  margin-top: 20px;
  margin-bottom: 20px;
  box-sizing: border-box;
}

.pictures-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px; 
  width: 100%; 
}

.picture {
  width: 100%; 
  height: 300px;
  background-color: #d8d8d8;
  cursor: pointer;
  transition: 0.5s;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

.picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.picture-plus{
  height: 50% !important; 
  width: 50% !important;
  opacity: 0.3;
  transition: 0.5s;
  transform-origin: center;
}

.picture:hover{
  transform: scale(1.05);
}

.text-picture-container{
  position: absolute;
  width: 100%;
  height: 100%;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  text-align: center;
  box-sizing: border-box;
  padding: 10px;
  box-sizing: border-box;
}

.picture:hover .text-picture-container {
  opacity: 1;
}

.text-picture-container p{
  margin: 0;
  margin-bottom: 15px;
  font-size: 16px;
  word-break: break-word;
  white-space: normal;
}




@media (max-width: 1119px) {
  .pictures-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 20px; 
    width: 100%; 
  }

  .picture {
    height: 270px;
  }
}

@media (max-width: 779px) {
  .pictures-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px; 
    width: 100%; 
  }

  .picture {
    height: 250px;
  }
}

@media (max-width: 699px) {
  .picture {
    height: 270px;
  }
}

.add-art-container{
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.form-container{
  width: 80%;
  display: flex;
  flex-direction: column;
}

.form-container p{
  margin: 0;
  margin-bottom: 5px;
  margin-top: 20px;
  font-size: 16px;
}

.form-container input{
  height: 30px;
  font-size: 18px;
  border-radius: 5px;
  background-color: #D8D8D8;
  border: none;
}

input[type="file"] {
  font-size: 16px;
  height: 30px;
  color: #333;
  background-color: #D8D8D8;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  width: 20%;
}

.checkboxes-container{
  display: flex;
  flex-wrap: wrap;

}


.checkbox-container{
  width: 20%;
  height: 50px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.checkbox-container p{
  width: 80%;
  margin: 0;
  margin: 0 10px;
  word-break: break-word;
  font-size: 14px;
}

input[type="checkbox"] {
  width: 30px;
  appearance: none;
  background-color: #D8D8D8;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
}

input[type="checkbox"]:checked {
  background-color: #4CAF50;
  border-color: #449a47;
}

@media (max-width: 740px) {
  .checkbox-container{
    width: 25%;
  }
}

@media (max-width: 450px) {
  .checkbox-container{
    width: 50%;
  }
}

.button-container{
  margin: auto;
  width: 200px;
  margin-top: 50px;
  margin-bottom: 50px;
  height: 40px;
  background-color: #4CAF50;
  border: 2px solid #449a47;
  border-radius: 5px;
  transition: 0.5s;
  cursor: pointer;
}

.button-container.disable{
  background-color: #797979;
  border: 2px solid #848484;
  cursor: not-allowed;
}

.button-container.error{
  background-color: #df1b1b;
  border: 2px solid #c21616;
  cursor: pointer;
}

.button-container:hover{
  transform: scale(1.1);
}

.button-container a{
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
  text-decoration: none;
  font-size: 16px;
  color: white;
}

.modal {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.8);

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-image-wrapper {
  position: relative;
  display: inline-block;
  max-width: 90%;
  max-height: 80vh;
  opacity: 0;
  transition: opacity 0.3s ease; 
}

.modal.show .modal-image-wrapper {
  opacity: 1;
}

.download-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  transition: 0.5s;
  filter: brightness(0) invert(1);
}

.download-icon:hover {
  transform: scale(1.2);
}

.modal-content {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

.download-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 18px;
  color: #333;
  text-decoration: none;
  z-index: 10;
  opacity: 0; 
  transition: transform 2.3s ease, opacity 0.6s ease;
}

.modal.show .download-btn {
  opacity: 1;
}

.picture-buttons-container{
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-top: 10px;
  margin-right: 10px;
}

.picture-btn-delete{
  height: 20px !important;
  width: 20px !important;
  transition: 0.5s;
  filter: brightness(0) invert(1);
  margin-left: 5px;
}

.picture-btn-mark{
  height: 29px !important;
  width: 29px !important;
  transition: 0.5s;
  filter: brightness(0) invert(1);
  margin-right: 2px;
}

.picture-btn-edit{
  height: 20px !important;
  width: 20px !important;
  transition: 0.5s;
  filter: brightness(0) invert(1);
}

.picture-btn-delete:hover{
  transform: scale(1.2);
}
.picture-btn-mark:hover{
  transform: scale(1.2);
}

.picture-btn-edit:hover{
  transform: scale(1.2);
}

.confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease; /* Плавное появление */
}

.confirm-modal.show {
  opacity: 1;
  visibility: visible;
}

.confirm-modal-content {
  background: white;
  padding: 20px 30px;
  border-radius: 10px;
  text-align: center;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.confirm-buttons {
  margin-top: 20px;
  display: flex;
  justify-content: space-around;
}

.confirm-buttons button {
  padding: 8px 16px;
  font-size: 16px;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  transition: 0.5s;
}

.confirm-buttons button:hover {
  transform: scale(1.1);
}

#confirm-delete {
  background-color: #d9534f;
  color: white;
}

#mark-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#mark-modal.show {
  opacity: 1;
  visibility: visible;
}

#mark-modal .confirm-modal-content {
  display: flex;
  flex-direction: column;
  background: white;
  width: 400px;
  border-radius: 10px;
  align-items: center;
  justify-items: center;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

#mark-modal textarea {
  max-width: 90%;
  width: 90%;
  height: 80px;
  padding: 10px;
  font-size: 14px;
  border-radius: 10px;
  background-color: #d8d8d8;
  border: none;
}

#confirm-mark {
  background-color: #5cbc5d;
  color: rgb(255, 255, 255);
}

.picture.marked {
  border:  3px solid rgb(235, 68, 8);
  border-radius: 3px;
}

#edit-modal .confirm-modal-content {
  display: flex;
  flex-direction: column;
  background: white;
  width: 400px;
  border-radius: 10px;
  align-items: center;
  justify-items: center;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

#edit-modal .confirm-modal-content input, select{
  border: none;
  background-color: #d8d8d8;
  width: 80%;
  height: 35px;
  margin-bottom: 20px;
  border-radius: 10px;
  padding: 0 10px;
  box-sizing: border-box;
}

.material-select{
  height: 170px !important;
}

#confirm-edit {
  background-color: #5cbc5d;
  color: rgb(255, 255, 255);
}



/* ===== LOGIN PAGE ===== */

.login-body {
  margin: 0;
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #f4f6f8;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.login-container {
  width: 100%;
  max-width: 360px;
  padding: 32px;
  background: #ffffff;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.08),
    0 2px 6px rgba(0, 0, 0, 0.04);
  transition: max-height 0.25s ease;
  overflow: hidden;
}

.login-container h1 {
  margin: 0 0 8px;
  text-align: center;
  font-size: 22px;
  color: #1f2937;
}

.login-container form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-container input {
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  outline: none;
  background: #ffffff;
  color: #000000;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-container input::placeholder {
  color: #9ca3af;
}

.login-container input:focus {
  border-color: #066f09a5;
  box-shadow: 0 0 0 3px rgba(54, 129, 68, 0.15);
}

.login-container button {
  margin-top: 8px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: #066f0a;
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.05s ease;
}

.login-container button:hover {
  background: #046507;
}

.login-container button:active {
  transform: translateY(1px);
}

.login-error {
  padding: 10px;
  border-radius: 10px;
  background: #fee2e2;
  color: #991b1b;
  text-align: center;
  font-size: 14px;
}
