form {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background: #0d0d0d;
  padding: 2.5rem 2rem;
  border-radius: 28px;
  margin-top: 6rem;
  width: 100%;
  max-width: 650px;
  height: 480px; 
  max-height: 480px;
  border: 1px solid #1a1a1a;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  animation: fadeInUp 0.9s ease-out;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 1px;

  color: #ededed;
  text-align: center;
}

.drop-zone-wrapper {
  position: relative;
  width: 100%;
  flex-grow: 1;
  background: #090909;
  border: 1px solid #181818;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  overflow: hidden; 
}

.drop-zone-wrapper::before {
  content: '';
  position: absolute;
  left: 0;
  width: 100%; 
  height: 1px;
  background: 
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.25) 0px, rgba(255, 255, 255, 0.25) 1px, transparent 1px, transparent 4px),
    linear-gradient(90deg, transparent 0%, rgba(0, 242, 254, 0.4) 15%, #ffffff 50%, rgba(0, 242, 254, 0.4) 85%, transparent 100%);
  background-size: 6px 100%, 100% 100%;

  box-shadow: 0 0 10px #00f2fe, 0 0 4px rgba(0, 242, 254, 0.8);
  z-index: 1;

  filter: blur(0.8px); 

  animation: 
    laserScan 6s linear infinite, 
    grainJitter 0.1s steps(3) infinite;
}

.drop-zone-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 2; 
}

.upload-icon-circle {
  width: 64px;
  height: 64px;
  background-color: #1a1a1a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border: 1px solid #262626;
  transition: all 0.3s ease;
}

.upload-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: #756562;
  letter-spacing: 2px;
  transition: color 0.3s ease;
}

input[type="file"] {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  cursor: pointer;
}

.drop-zone-wrapper:hover .upload-icon-circle {
  background-color: #222;
  border-color: #1393a6;
  transform: scale(1.05);
}

.drop-zone-wrapper:hover .upload-text {
  color: #1393a6;
}

button {
  background: #050505;
  color: #1aaeb8;
  border: 1px solid #16363a;
  padding: 0.85rem 3.5rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: auto;
  min-width: 220px;
}

button:hover:not(:disabled) {
  background: #0e2024;
  border-color: #10ceda;
  color: #ffffff;
  box-shadow: 0 0 15px rgba(16, 206, 218, 0.4);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

button:active:not(:disabled) {
  transform: scale(0.98);
}


@keyframes laserScan {
  0% {
    top: 0%;
    opacity: 0;
  }
  50% {
    opacity: 1; 
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

@keyframes grainJitter {
  0% { background-position: 0px 0, 0 0; }
  25% { background-position: -3px 0, 0 0; }
  50% { background-position: 2px 0, 0 0; }
  75% { background-position: -1px 0, 0 0; }
  100% { background-position: 4px 0, 0 0; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
  form {
    height: 420px;
    padding: 1.5rem;
  }
  h2 {
    font-size: 1.5rem;
  }
}

#previewContainer {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
  min-height: 0; 
}

.preview-box {
  position: relative; 
  width: 120px;
  min-height: 120px; 
  height: auto;
  border-radius: 12px;
  border: 1px solid #16363a;
  background: #050505;
  overflow: visible; 
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.15);
  animation: fadeInUp 0.4s ease-out;
  padding: 12px 8px 8px 8px;
  text-align: center;
}

.preview-box img, 
.preview-box video {
  max-height: 85px;
  width: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.preview-box.audio-box {
  width: 260px; 
  min-height: 85px;
  height: auto;
}

.preview-box audio {
  width: 100%;
  height: 32px;
  outline: none;
}

.generic-file-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
}

.generic-file-tile svg {
  fill: #1393a6;
  filter: drop-shadow(0 0 4px rgba(19, 147, 166, 0.4));
}

.generic-file-name {
  font-size: 0.7rem;
  color: #888;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  width: 100%;
  padding: 0 4px;
}


.clickable-preview {
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.clickable-preview:hover {
  transform: scale(1.03);
  filter: brightness(1.15);
}

.clear-preview-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  background: #ff3b30;
  color: #ffffff;
  border-radius: 50%;
  font-size: 14px;
  line-height: 18px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, background 0.2s ease;
  user-select: none;
}

.clear-preview-btn:hover {
  background: #ff453a;
  transform: scale(1.15);
}

#modalCloseBtn {
  transition: transform 0.2s ease, color 0.2s ease;
}

#modalCloseBtn:hover {
  color: #00f2fe;
  transform: scale(1.05);
}