:root {
  --primary-color: #ee7e21;
  --success-color: #28a745;
  --error-color: #dc3545;
  --text-color: #333;
  --border-color: #ddd;
}

.admin-container {
  width: 100vw;
  height: auto;
  min-height: 100vh;
  background: url("../images/polaroids/polaroids_bg.jpg") fixed;
  background-size: contain;
  background-position: center;
  background-repeat: repeat-x;
  padding: 5% 0 5% 0;
  font-family: ITCNormal;
}

.admin {
  max-width: 800px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.admin .header {
  background: linear-gradient(135deg, #ee7e21 0%, #ee7e21 100%);
  color: white;
  padding: 30px;
  text-align: center;
  /* margin-top: 5%; */
}

.admin .header h1 {
  font-size: 2.5rem;
  font-weight: 300;
  margin-bottom: 10px;
  font-family: Bebas;
}

.admin .header p {
  opacity: 0.8;
  font-size: 1.1rem;
  font-family: ITCSemiBold;
}

.admin .form-container {
  padding: 40px;
}

.admin .form-group {
  margin-bottom: 25px;
}

.admin .form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2c3e50;
  font-size: 1.1rem;
  font-family: ITCBold;
}

.admin .form-group input,
.admin .form-group select {
  width: 100%;
  padding: 15px;
  border: 2px solid #e0e6ed;
  border-radius: 10px;
  font-size: 1rem;
  color: #ee7e21;
  transition: all 0.3s ease;
  background: #f8f9fa !important;
  font-family: ITCLight;
}

.admin .form-group input:focus,
.admin .form-group select:focus {
  outline: none;
  border-color: #ee7e21;
  background: white;
  border-radius: 10px 10px 0 0;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.admin .file-upload {
  position: relative;
  display: inline-block;
  width: 100%;
}

.admin .file-input {
  display: none;
}

.upload-container {
  margin-bottom: 15px;
}

.file-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 20px;
  border: 2px dashed #ee7e21;
  border-radius: 10px;
  background: #f8f9ff;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 80px;
}

.file-label:hover {
  border-color: #4c63d2;
  background: #f0f3ff;
  transform: translateY(-2px);
}

.file-label i {
  font-size: 2rem;
  margin-right: 10px;
  color: #ee7e21;
}

#uploadHeading {
  display: none;
  /* background-color: red;  */
}

/* Loading spinner */
.spinner {
  display: none;
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: #ee7e21;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Progress bar */
.progress-container {
  display: none;
  width: 100%;
  background-color: #f1f1f1;
  border-radius: 5px;
  margin: 10px 0;
}

.progress-bar {
  height: 10px;
  background-color: #ee7e21;
  border-radius: 5px;
  width: 0%;
  transition: width 0.3s ease;
}

/* Delete button */
.delete-btn {
  background-color: #dc3545;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 10px;
}

.delete-btn:hover {
  background-color: #c82333;
}

/* Content type indicators */
.content-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  margin-left: 10px;
}

.type-image {
  background-color: #4caf50;
  color: white;
}

.type-video {
  background-color: #2196f3;
  color: white;
}

/* File preview in list */
.file-preview-container {
  margin: 10px 0;
  text-align: center;
}

.file-preview {
  margin-top: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #e0e6ed;
  display: none;
}

#previewContent {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
  min-height: 100px;
  flex-direction: column-reverse;
}

#previewContent img,
#previewContent video {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
  object-fit: contain;
}

.preview-item {
  font-size: 0.9rem;
  color: #2c3e50;
  padding: 5px;
  background: #e8f2ff;
  border-radius: 5px;
}

.admin .file-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 20px;
  border: 2px dashed #ee7e21;
  border-radius: 10px;
  background: #f8f9ff;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 80px;
}

.admin .file-label:hover {
  border-color: #4c63d2;
  background: #f0f3ff;
  transform: translateY(-2px);
}

.admin .file-label i {
  font-size: 2rem;
  margin-right: 10px;
  color: #ee7e21;
}

.admin .file-preview {
  margin-top: 15px;
  padding: 10px;
  background: #e8f2ff;
  border-radius: 8px;
  display: none;
}

.admin .preview-item {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: #2c3e50;
}

.admin .submit-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #ee7e21 0%, #ee7e21 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
  font-family: Bebas;
}

.admin .submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.admin .submit-btn:active {
  transform: translateY(-1px);
}

.admin .success-message,
.admin .error-message {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: none;
  animation: slideIn 0.5s ease;
}

.admin .success-message {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.admin .error-message {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.admin .content-list {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #e0e6ed;
}

.admin .content-item {
  background: #f8f9fa;
  padding: 20px;
  margin-bottom: 15px;
  border-radius: 10px;
  border-left: 4px solid #ee7e21;
  transition: all 0.3s ease;
}

.admin .content-item:hover {
  background: #e8f2ff;
  transform: translateX(5px);
}

.admin .content-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.admin .content-type {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.admin .type-image {
  background: #e3f2fd;
  color: #1565c0;
}

.admin .type-video {
  background: #fce4ec;
  color: #c2185b;
}

.show-Insta {
  display: block !important;
}

#content {
  display: none;
}

.hide-form {
  display: none !important;
}

@media (max-width: 768px) {
  .admin {
    margin: 10px;
    border-radius: 15px;
  }

  .admin .form-container {
    padding: 20px;
  }

  .admin .header {
    padding: 20px;
    /* filter: saturate(); */
  }

  .admin .header h1 {
    font-size: 2rem;
  }
}

#save-btn{
  display: none;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

#img-block{
  width: 100%;
  height: 100%;
  position: absolute;
  /* background: blue; */
}

#all-content-cont {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 5px;
  position: relative;
}

.product-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  cursor: pointer;
  aspect-ratio: 1;
  width: 235px;
  group: hover;
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  background: linear-gradient(
    45deg,
    rgba(147, 197, 253, 0.5),
    rgba(16, 185, 129, 0.5),
    rgba(251, 146, 60, 0.5),
    rgba(147, 197, 253, 0.5)
  );
  border-radius: inherit;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.product-card:hover::before {
  opacity: 1;
}

.product-card:hover {
  transform: scale(1.02);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

.image-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  /* border-radius: 24px; */
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  filter: brightness(0.9) contrast(1.1);
}

.product-card:hover .product-image {
  transform: scale(1.1);
  filter: brightness(0.7) contrast(1.2);
}

.image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.1) 30%,
    rgba(0, 0, 0, 0.8) 100%
  );
  opacity: 0;
  transition: opacity 0.6s ease;
}

.product-card:hover .image-overlay {
  opacity: 1;
}

.content-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  /* background-color: #2c1706cf; */
  background: linear-gradient(to top, #734118, black);
  height: 100%;
  padding: 1rem;
  color: white;
  transform: translateY(100%);
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.content-overlay-off {
  background: linear-gradient(to top, #727272, black) !important;
}

.product-card:hover .content-overlay {
  transform: translateY(0);
}

.product-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.2;
  text-wrap: nowrap;
  background: linear-gradient(135deg, #fff 0%, #e5e7eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #60a5fa;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.348);
  border-radius: 12px;
  border: 1px solid rgba(96, 165, 250, 0.2);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.product-link:hover {
  background: rgba(96, 165, 250, 0.2);
  border-color: rgb(96, 165, 250);
  transform: translateY(-2px);
  color: rgb(151, 199, 254);
  text-shadow: 0 2px #000000;
}

.product-date {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 400;
  margin-bottom: 1.5rem;
}

.action-buttons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* #instaSavePopup {

} */

.item-select-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 4px solid #ee7e21;
  background-color: white;
  /* background: linear-gradient(135deg, #ee7e21, #2ecc71); */
  /* color: white; */
  /* box-shadow: inset 0 0 20px 10px #ee7e21; */
  color: #ee7e21;
  padding: 30px 40px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.8);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.item-select-popup.show-popup {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.item-select-popup::before {
  content: "";
  display: block;
  font-size: 40px;
  margin-bottom: 10px;
  color: #fff;
}

.toggle-btn {
  flex: 1;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 16px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.toggle-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.toggle-btn:hover::before {
  transform: translateX(100%);
}

.toggle-btn.on {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.toggle-btn.off {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  color: white;
  box-shadow: 0 8px 25px rgba(107, 114, 128, 0.3);
}

.toggle-btn:hover {
  transform: translateY(-3px);
}

.toggle-btn.on:hover {
  box-shadow: 0 12px 35px rgba(16, 185, 129, 0.4);
}

.toggle-btn.off:hover {
  box-shadow: 0 12px 35px rgba(107, 114, 128, 0.4);
}

.delete-btn {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #ef3b3b 0%, #dc3333 100%);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.delete-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.delete-btn:hover::before {
  transform: translateX(100%);
}

.delete-btn:hover {
  transform: translateY(-3px) rotate(5deg);
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 12px 35px rgba(220, 38, 38, 0.5);
}

.status-indicator {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transition: all 0.3s ease;
  opacity: 0;
  z-index: 10;
  transform: scale(0);
}

.product-card:hover .status-indicator {
  opacity: 1;
  transform: scale(1);
}

.status-indicator.on {
  background: #10b981;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

.status-indicator.off {
  background: transparent;
  /* box-shadow: 0 0 12px rgba(107, 114, 128, 0.6); */
}

.icon {
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .container {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
  }

  .content-overlay {
    padding: 1.5rem;
  }

  .product-name {
    font-size: 1.3rem;
  }
}
