.f3d-wrap {
  font-family: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

.f3d-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: start;
}

.f3d-panel {
  background: rgba(8, 15, 34, 0.72);
  border: 1px solid rgba(90, 140, 255, 0.18);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.f3d-panel-title {
  margin: 0 0 18px;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #e9f1ff;
}

.f3d-dropzone {
  position: relative;
  min-height: 200px;
  border: 1.5px dashed rgba(120, 170, 255, 0.28);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(20, 32, 63, 0.68) 0%, rgba(8, 14, 30, 0.82) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
}

.f3d-dropzone.f3d-dz-hover {
  border-color: rgba(116, 188, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(88, 160, 255, 0.08);
}

.f3d-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.f3d-dz-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 340px;
  padding: 20px;
  pointer-events: none;
}

.f3d-dz-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f4f8ff;
}

.f3d-dz-subtitle {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: rgba(225, 235, 255, 0.76);
}

.f3d-browse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(120, 190, 255, 0.45);
  background: linear-gradient(90deg, #6dd3ff 0%, #6b95ff 100%);
  color: #081427;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 3;
  box-shadow: 0 8px 22px rgba(70, 130, 255, 0.22);
  transition:
    transform 0.15s ease,
    filter 0.15s ease,
    box-shadow 0.15s ease;
}

.f3d-browse-btn:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.f3d-browse-btn:active {
  transform: translateY(0);
}

.f3d-selected-file {
  font-size: 0.85rem;
  line-height: 1.35;
  color: rgba(220, 232, 255, 0.72);
  word-break: break-word;
}

.f3d-status {
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #eef4ff;
}

.f3d-error {
  background: rgba(200, 40, 40, 0.1);
  border-color: rgba(255, 110, 110, 0.25);
  color: #ffd1d1;
}

.f3d-breakdown {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
  color: #edf3ff;
}

.f3d-breakdown h4 {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(228, 237, 255, 0.78);
}

.f3d-breakdown ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.f3d-breakdown li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.f3d-breakdown li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.f3d-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.f3d-field {
  display: block;
}

.f3d-field-full {
  grid-column: 1 / -1;
}

.f3d-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  color: rgba(220, 232, 255, 0.74);
}

.f3d-field select,
.f3d-field input[type="number"] {
  -webkit-appearance: auto !important;
  appearance: auto !important;
  width: 100% !important;
  min-height: 46px !important;
  padding: 10px 14px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(120, 150, 220, 0.35) !important;
  background: #0c1327 !important;
  color: #f2f7ff !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
  box-shadow: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

.f3d-field select option {
  color: #111 !important;
  background: #fff !important;
}

.f3d-field select:focus,
.f3d-field input:focus {
  outline: none;
  border-color: rgba(105, 182, 255, 0.78);
  box-shadow: 0 0 0 3px rgba(90, 165, 255, 0.12);
}

.f3d-total-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.f3d-total-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.f3d-total-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(222, 234, 255, 0.68);
}

.f3d-total-value {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  color: #ffffff;
}

.f3d-btn-primary {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(90deg, #6dd3ff 0%, #6b95ff 100%);
  color: #081427;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    filter 0.15s ease,
    opacity 0.15s ease;
}

.f3d-btn-primary:hover:not(:disabled) {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.f3d-btn-primary:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .f3d-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .f3d-panel {
    padding: 18px;
  }

  .f3d-fields {
    grid-template-columns: 1fr;
  }

  .f3d-total-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .f3d-btn-primary {
    width: 100%;
  }
}

/* Preview block spacing */
.f3d-preview-wrap {
  margin-bottom: 18px;
}

/* Optional nicer header spacing */
.f3d-preview-head {
  margin-bottom: 10px;
}

/* Rounded dark preview frame */
.f3d-preview-canvas {
  width: 100%;
  height: 260px;
  background: linear-gradient(180deg, #0a1224 0%, #050b16 100%);
  border: 1px solid rgba(110, 160, 255, 0.14);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 10px 24px rgba(0, 0, 0, 0.28);
}

/* Make renderer fill and inherit rounded clipping cleanly */
.f3d-preview-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  border-radius: 16px;
}
